diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-10-07 17:22:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-07 17:22:44 +0000 |
commit | 21d89fbf8c444c64a4c85d25a25bbe3b79719de9 (patch) | |
tree | 90dd8ff1e25b18b3c2d3b0d01d8ab23a78497c59 /src/com/android/launcher3/InvariantDeviceProfile.java | |
parent | 79d0ac937ba6d6f332e3c43fe9db43b008a04d14 (diff) | |
parent | 0abb36f6920733f813e22ad984bb7d48f0924698 (diff) | |
download | android_packages_apps_Trebuchet-21d89fbf8c444c64a4c85d25a25bbe3b79719de9.tar.gz android_packages_apps_Trebuchet-21d89fbf8c444c64a4c85d25a25bbe3b79719de9.tar.bz2 android_packages_apps_Trebuchet-21d89fbf8c444c64a4c85d25a25bbe3b79719de9.zip |
Merge "Fixing overscroll effect when the navigation bar is opaque" into ub-launcher3-burnaby-polish
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/InvariantDeviceProfile.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 9e46a84e7..631333b2d 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -17,6 +17,7 @@ package com.android.launcher3; import android.annotation.TargetApi; +import android.app.ActivityManager; import android.content.Context; import android.graphics.Point; import android.os.Build; @@ -84,6 +85,9 @@ public class InvariantDeviceProfile { DeviceProfile landscapeProfile; DeviceProfile portraitProfile; + // On Marshmallow the status bar is no longer opaque, when drawn on the right. + public boolean isRightInsetOpaque; + InvariantDeviceProfile() { } @@ -116,7 +120,7 @@ public class InvariantDeviceProfile { defaultLayoutId = dlId; } - @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) + @TargetApi(Build.VERSION_CODES.M) InvariantDeviceProfile(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); @@ -167,6 +171,9 @@ public class InvariantDeviceProfile { largeSide, smallSide, true /* isLandscape */); portraitProfile = new DeviceProfile(context, this, smallestSize, largestSize, smallSide, largeSide, false /* isLandscape */); + + isRightInsetOpaque = !Utilities.ATLEAST_MARSHMALLOW || + context.getSystemService(ActivityManager.class).isLowRamDevice(); } ArrayList<InvariantDeviceProfile> getPredefinedDeviceProfiles() { |