diff options
author | Jim Miller <jaggies@google.com> | 2012-06-18 13:32:05 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-18 13:32:05 -0700 |
commit | a10b1a738dfa8fcf094fec555e7d85dba179f5fc (patch) | |
tree | 1cc69257d51d0a895978a7612ff6fc0d64994d9d /policy | |
parent | a5bcf814166b68ac0cec0d76acb61d49c2e03dc2 (diff) | |
parent | 12da2c5eeeadd6c23da5d3003d0da3b6b73d5052 (diff) | |
download | frameworks_base-a10b1a738dfa8fcf094fec555e7d85dba179f5fc.zip frameworks_base-a10b1a738dfa8fcf094fec555e7d85dba179f5fc.tar.gz frameworks_base-a10b1a738dfa8fcf094fec555e7d85dba179f5fc.tar.bz2 |
am 12da2c5e: Merge "Fix 6665117: ACTION_ASSIST visual improvements" into jb-dev
* commit '12da2c5eeeadd6c23da5d3003d0da3b6b73d5052':
Fix 6665117: ACTION_ASSIST visual improvements
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockScreen.java | 21 |
1 files changed, 14 insertions, 7 deletions
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) { |