微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt6735 在Music中长按一首歌,执行"添加到播放列表"时,屏幕会闪两次

mt6735 在Music中长按一首歌,执行"添加到播放列表"时,屏幕会闪两次

时间:10-02 整理:3721RD 点击:
[DESCRIPTION]
在Music中,长按一首歌,在弹出的菜单中执行“添加到播放列表”菜单此时屏幕会闪两次
[SOLUTION]
請將 PhoneWindow.DialogMenuCallback 裡所有的用到 mSubMenuHelper 註釋掉, 就可以解決這個問題
詳細修改如下
private final class DialogMenuCallback implements MenuBuilder.Callback,
MenuPresenter.Callback {
private int mFeatureId;
//private MenuDialogHelper mSubMenuHelper;
public DialogMenuCallback(int featureId) {
mFeatureId = featureId;
}
public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
if (menu.getrootMenu() != menu) {
onCloseSubMenu(menu);
}
if (allMenusAreClosing) {
Callback callback = getCallback();
if (callback != null && !isDestroyed()) {
callback.onPanelClosed(mFeatureId, menu);
}
if (menu == mContextMenu) {
dismissContextMenu();
}
// Dismiss the submenu, if it is showing
//if (mSubMenuHelper != null) {
// mSubMenuHelper.dismiss();
// mSubMenuHelper = null;
//}
}
}
public void onCloseSubMenu(MenuBuilder menu) {
Callback callback = getCallback();
if (callback != null && !isDestroyed()) {
callback.onPanelClosed(mFeatureId, menu.getRootMenu());
}
}
public boolean onMenuItEMSelected(MenuBuilder menu, MenuItem item) {
Callback callback = getCallback();
return (callback != null && !isDestroyed())
&& callback.onMenuItemSelected(mFeatureId, item);
}
public void onMenuModeChange(MenuBuilder menu) {
}
public boolean onOpenSubMenu(MenuBuilder subMenu) {
if (subMenu == null) return false;
// Set a SIMple callback for the submenu
subMenu.setCallback(this);
// M: ListMenuPresenter create sub menu dialog there
// The window manager will give us a valid window token
//mSubMenuHelper = new MenuDialogHelper(subMenu);
//mSubMenuHelper.show(null);
return true;
}
}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top