diff options
author | Jim Miller <jaggies@google.com> | 2012-06-18 13:34:59 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-18 13:34:59 -0700 |
commit | 048311ca379d4265a0fcbfdd67d968e88ca0aa67 (patch) | |
tree | 0793d7d67289a88769ee60770b8558110e75004b /policy | |
parent | d0aebd900913a6308398f088e32b83fb9f3bb700 (diff) | |
parent | a10b1a738dfa8fcf094fec555e7d85dba179f5fc (diff) | |
download | frameworks_base-048311ca379d4265a0fcbfdd67d968e88ca0aa67.zip frameworks_base-048311ca379d4265a0fcbfdd67d968e88ca0aa67.tar.gz frameworks_base-048311ca379d4265a0fcbfdd67d968e88ca0aa67.tar.bz2 |
am a10b1a73: am 12da2c5e: Merge "Fix 6665117: ACTION_ASSIST visual improvements" into jb-dev
* commit 'a10b1a738dfa8fcf094fec555e7d85dba179f5fc':
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) { |