summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-06-15 17:26:28 -0700
committerJim Miller <jaggies@google.com>2012-06-15 18:11:00 -0700
commit20039ad17b94873ee40fdd61c3d1d1aa590010df (patch)
tree8f32124cf4b2df6139bcc5505e57b4ca230a8ece /policy
parentd2ee4960c492259665adc2c6630e1a59642677b9 (diff)
downloadframeworks_base-20039ad17b94873ee40fdd61c3d1d1aa590010df.zip
frameworks_base-20039ad17b94873ee40fdd61c3d1d1aa590010df.tar.gz
frameworks_base-20039ad17b94873ee40fdd61c3d1d1aa590010df.tar.bz2
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
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/LockScreen.java21
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) {