diff options
author | Chris Craik <ccraik@google.com> | 2015-05-05 21:30:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-05 21:30:08 +0000 |
commit | 356b1777092e7da3ac5eae0bc94bd21e1cf9319a (patch) | |
tree | 2036beb26312765c0dbba76f8409a8cc95bf39a3 /packages | |
parent | d6abbd29b7f453397036cf602655534bbd6c0430 (diff) | |
parent | 2507c34d91bb0d722b6012e85cb47387b2aa6873 (diff) | |
download | frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.zip frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.gz frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.bz2 |
Merge "Cleanup properties" into mnc-dev
Diffstat (limited to 'packages')
3 files changed, 7 insertions, 32 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index 1001feb..ad97f91 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -39,7 +39,6 @@ import com.android.systemui.R; import com.android.systemui.recents.misc.DebugTrigger; import com.android.systemui.recents.misc.ReferenceCountedTrigger; import com.android.systemui.recents.misc.SystemServicesProxy; -import com.android.systemui.recents.misc.Utilities; import com.android.systemui.recents.model.RecentsTaskLoadPlan; import com.android.systemui.recents.model.RecentsTaskLoader; import com.android.systemui.recents.model.Task; @@ -392,15 +391,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView filter.addAction(Intent.ACTION_SCREEN_OFF); filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED); registerReceiver(mSystemBroadcastReceiver, filter); - - // Private API calls to make the shadows look better - try { - Utilities.setShadowProperty("ambientRatio", String.valueOf(1.5f)); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } } /** Inflates the debug overlay if debug mode is enabled. */ diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java index 84544ff..e810410 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java +++ b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java @@ -22,27 +22,11 @@ import android.graphics.Matrix; import android.graphics.Rect; import android.view.View; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.ArrayList; /* Common code */ public class Utilities { - // Reflection methods for altering shadows - private static Method sPropertyMethod; - static { - try { - Class<?> c = Class.forName("android.view.DisplayListCanvas"); - sPropertyMethod = c.getDeclaredMethod("setProperty", String.class, String.class); - if (!sPropertyMethod.isAccessible()) sPropertyMethod.setAccessible(true); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } - } - /** Scales a rect about its centroid */ public static void scaleRectAboutCenter(Rect r, float scale) { if (scale != 1.0f) { @@ -163,12 +147,6 @@ public class Utilities { (1f - overlayAlpha) * Color.blue(overlayColor))); } - /** Sets some private shadow properties. */ - public static void setShadowProperty(String property, String value) - throws IllegalAccessException, InvocationTargetException { - sPropertyMethod.invoke(null, property, value); - } - /** * Cancels an animation ensuring that if it has listeners, onCancel and onEnd * are not called. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index a1d66d4..4e46854 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -76,6 +76,7 @@ import android.view.Display; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; +import android.view.ThreadedRenderer; import android.view.VelocityTracker; import android.view.View; import android.view.ViewGroup.LayoutParams; @@ -857,6 +858,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, // listen for USER_SETUP_COMPLETE setting (per-user) resetUserSetupObserver(); + // disable profiling bars, since they overlap and clutter the output on app windows + ThreadedRenderer.overrideProperty("disableProfileBars", "true"); + + // Private API call to make the shadows look better for Recents + ThreadedRenderer.overrideProperty("ambientRatio", String.valueOf(1.5f)); + return mStatusBarView; } |