Loading packages/SystemUI/src/com/android/systemui/SearchPanelView.java +8 −15 Original line number Diff line number Diff line Loading @@ -181,17 +181,6 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, } } private boolean hasItemsToShow() { for (int i = 0; i < mTargetViews.size(); i++) { View v = mTargetViews.get(i); View parent = (View) v.getParent(); if (parent.getVisibility() == View.VISIBLE) { return true; } } return false; } public void replaceDrawable(ImageView v, ComponentName component, String name) { if (component != null) { try { Loading Loading @@ -235,7 +224,7 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, } public void show(final boolean show, boolean animate) { if (show && (mInEditMode || hasItemsToShow())) { if (show) { if (getVisibility() != View.VISIBLE) { setVisibility(View.VISIBLE); vibrate(); Loading Loading @@ -425,7 +414,7 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, mPicker.cleanup(); } else if (v == mLogo || v == mLogoLeft || v == mLogoRight) { mSelectedView = (ImageView) v; mPicker.pickShortcut(); mPicker.pickShortcut(v != mLogo); } } } Loading Loading @@ -464,11 +453,11 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, private void updateDrawables() { mTargetActivities = NavigationRingHelpers.getTargetActions(mContext); boolean assistantAvailable = isAssistantAvailable(); for (int i = 0; i < NavigationRingHelpers.MAX_ACTIONS; i++) { ImageView target = mTargetViews.get(i); String action = mTargetActivities[i]; if (assistantAvailable && ((TextUtils.isEmpty(action) && target == mLogo) if (isAssistantAvailable() && ((TextUtils.isEmpty(action) && target == mLogo) || ACTION_ASSIST.equals(action))) { maybeSwapSearchIcon(target); continue; Loading @@ -483,6 +472,10 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, private void updateTargetVisibility() { for (int i = 0; i < mTargetViews.size(); i++) { View v = mTargetViews.get(i); // Special case, middle target never be invisible if (v == mLogo) { continue; } View parent = (View) v.getParent(); String action = mTargetActivities[i]; boolean visible = mInEditMode Loading packages/SystemUI/src/com/android/systemui/cm/ShortcutPickHelper.java +6 −4 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ public class ShortcutPickHelper { dialog.show(); } public void pickShortcut() { public void pickShortcut(boolean showNone) { if (mFetchAppsTask == null) { mFetchAppsTask = new FetchAppsTask(); mFetchAppsTask.execute(); Loading @@ -230,9 +230,11 @@ public class ShortcutPickHelper { filter.addDataScheme("package"); mContext.registerReceiver(mReceiver, filter); } if (showNone) { mActions.addAction(ACTION_NONE, R.string.navring_action_none, 0); } else { mActions.removeAction(ACTION_NONE); } AlertDialog.Builder builder = new AlertDialog.Builder(mContext) .setTitle(mContext.getString(R.string.navbar_dialog_title)) .setItems(mActions.getEntries(), new DialogInterface.OnClickListener() { Loading Loading
packages/SystemUI/src/com/android/systemui/SearchPanelView.java +8 −15 Original line number Diff line number Diff line Loading @@ -181,17 +181,6 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, } } private boolean hasItemsToShow() { for (int i = 0; i < mTargetViews.size(); i++) { View v = mTargetViews.get(i); View parent = (View) v.getParent(); if (parent.getVisibility() == View.VISIBLE) { return true; } } return false; } public void replaceDrawable(ImageView v, ComponentName component, String name) { if (component != null) { try { Loading Loading @@ -235,7 +224,7 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, } public void show(final boolean show, boolean animate) { if (show && (mInEditMode || hasItemsToShow())) { if (show) { if (getVisibility() != View.VISIBLE) { setVisibility(View.VISIBLE); vibrate(); Loading Loading @@ -425,7 +414,7 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, mPicker.cleanup(); } else if (v == mLogo || v == mLogoLeft || v == mLogoRight) { mSelectedView = (ImageView) v; mPicker.pickShortcut(); mPicker.pickShortcut(v != mLogo); } } } Loading Loading @@ -464,11 +453,11 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, private void updateDrawables() { mTargetActivities = NavigationRingHelpers.getTargetActions(mContext); boolean assistantAvailable = isAssistantAvailable(); for (int i = 0; i < NavigationRingHelpers.MAX_ACTIONS; i++) { ImageView target = mTargetViews.get(i); String action = mTargetActivities[i]; if (assistantAvailable && ((TextUtils.isEmpty(action) && target == mLogo) if (isAssistantAvailable() && ((TextUtils.isEmpty(action) && target == mLogo) || ACTION_ASSIST.equals(action))) { maybeSwapSearchIcon(target); continue; Loading @@ -483,6 +472,10 @@ public class SearchPanelView extends FrameLayout implements StatusBarPanel, private void updateTargetVisibility() { for (int i = 0; i < mTargetViews.size(); i++) { View v = mTargetViews.get(i); // Special case, middle target never be invisible if (v == mLogo) { continue; } View parent = (View) v.getParent(); String action = mTargetActivities[i]; boolean visible = mInEditMode Loading
packages/SystemUI/src/com/android/systemui/cm/ShortcutPickHelper.java +6 −4 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ public class ShortcutPickHelper { dialog.show(); } public void pickShortcut() { public void pickShortcut(boolean showNone) { if (mFetchAppsTask == null) { mFetchAppsTask = new FetchAppsTask(); mFetchAppsTask.execute(); Loading @@ -230,9 +230,11 @@ public class ShortcutPickHelper { filter.addDataScheme("package"); mContext.registerReceiver(mReceiver, filter); } if (showNone) { mActions.addAction(ACTION_NONE, R.string.navring_action_none, 0); } else { mActions.removeAction(ACTION_NONE); } AlertDialog.Builder builder = new AlertDialog.Builder(mContext) .setTitle(mContext.getString(R.string.navbar_dialog_title)) .setItems(mActions.getEntries(), new DialogInterface.OnClickListener() { Loading