From 20039ad17b94873ee40fdd61c3d1d1aa590010df Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 15 Jun 2012 17:26:28 -0700 Subject: Fix 6665117: ACTION_ASSIST visual improvements - add generic icon for search providers that don't supply one - change alpha weighting factor for glow - don't show ring background Change-Id: I86c86dc2d623c25ec7b91e206fac8ad9cd60faac --- .../android/internal/policy/impl/LockScreen.java | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java index 4af66ce..33dda09 100644 --- a/policy/src/com/android/internal/policy/impl/LockScreen.java +++ b/policy/src/com/android/internal/policy/impl/LockScreen.java @@ -301,10 +301,17 @@ class LockScreen extends LinearLayout implements KeyguardScreen { if (searchManager != null) { ComponentName component = searchManager.getGlobalSearchActivity(); if (component != null) { - if (!mGlowPadView.replaceTargetDrawablesIfPresent(component, - ASSIST_ICON_METADATA_NAME, - com.android.internal.R.drawable.ic_lockscreen_search)) { - Slog.w(TAG, "Couldn't grab icon from package " + component); + // XXX Hack. We need to substitute the icon here but haven't formalized + // the public API. The "_google" metadata will be going away, so + // DON'T USE IT! + boolean replaced = mGlowPadView.replaceTargetDrawablesIfPresent(component, + ASSIST_ICON_METADATA_NAME + "_google", + com.android.internal.R.drawable.ic_action_assist_generic); + + if (!replaced && !mGlowPadView.replaceTargetDrawablesIfPresent(component, + ASSIST_ICON_METADATA_NAME, + com.android.internal.R.drawable.ic_action_assist_generic)) { + Slog.w(TAG, "Couldn't grab icon from package " + component); } } else { Slog.w(TAG, "No search icon specified in package " + component); @@ -315,7 +322,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { } setEnabled(com.android.internal.R.drawable.ic_lockscreen_camera, !mCameraDisabled); - setEnabled(com.android.internal.R.drawable.ic_lockscreen_search, !mSearchDisabled); + setEnabled(com.android.internal.R.drawable.ic_action_assist_generic, !mSearchDisabled); } public void onGrabbed(View v, int handle) { @@ -329,7 +336,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { public void onTrigger(View v, int target) { final int resId = mGlowPadView.getResourceIdForTarget(target); switch (resId) { - case com.android.internal.R.drawable.ic_lockscreen_search: + case com.android.internal.R.drawable.ic_action_assist_generic: Intent assistIntent = getAssistIntent(); if (assistIntent != null) { launchActivity(assistIntent); @@ -535,7 +542,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { : false; boolean searchTargetPresent = (mUnlockWidgetMethods instanceof GlowPadViewMethods) ? ((GlowPadViewMethods) mUnlockWidgetMethods) - .isTargetPresent(com.android.internal.R.drawable.ic_lockscreen_search) + .isTargetPresent(com.android.internal.R.drawable.ic_action_assist_generic) : false; if (disabledByAdmin) { -- cgit v1.1