summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-05-05 21:30:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-05 21:30:08 +0000
commit356b1777092e7da3ac5eae0bc94bd21e1cf9319a (patch)
tree2036beb26312765c0dbba76f8409a8cc95bf39a3 /packages
parentd6abbd29b7f453397036cf602655534bbd6c0430 (diff)
parent2507c34d91bb0d722b6012e85cb47387b2aa6873 (diff)
downloadframeworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.zip
frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.gz
frameworks_base-356b1777092e7da3ac5eae0bc94bd21e1cf9319a.tar.bz2
Merge "Cleanup properties" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java7
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;
}