diff options
author | Adrian DC <radian.dc@gmail.com> | 2017-12-07 22:42:34 +0100 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2019-10-21 20:56:52 +0200 |
commit | 657c31ba7639910fe3a565a205d1ce9252990101 (patch) | |
tree | 41c84473ef9248c8207c07232e06181f2c1ba092 | |
parent | 9db155928c59b32108a41918d44fa382cff99bd7 (diff) | |
download | android_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.tar.gz android_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.tar.bz2 android_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.zip |
Trebuchet: Hide Notification Dots on low RAM devices
* As the feature is not available for low RAM devices,
hide it from the Settings to avoid confusion
* Acquire ActivityManager service to read isLowRamDevice
Change-Id: I34a6ee1b4838f31194c89327e301d4fd39670c02
Signed-off-by: Adrian DC <radian.dc@gmail.com>
-rw-r--r-- | src/com/android/launcher3/settings/SettingsActivity.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher3/settings/SettingsActivity.java b/src/com/android/launcher3/settings/SettingsActivity.java index 6209c5ef0..6dafd7d37 100644 --- a/src/com/android/launcher3/settings/SettingsActivity.java +++ b/src/com/android/launcher3/settings/SettingsActivity.java @@ -22,6 +22,7 @@ import static com.android.launcher3.states.RotationHelper.getAllowRotationDefaul import static com.android.launcher3.util.SecureSettingsObserver.newNotificationSettingsObserver; import android.app.Activity; +import android.app.ActivityManager; import android.app.DialogFragment; import android.app.Fragment; import android.content.ComponentName; @@ -199,6 +200,7 @@ public class SettingsActivity extends Activity switch (preference.getKey()) { case NOTIFICATION_DOTS_PREFERENCE_KEY: if (!Utilities.ATLEAST_OREO || + getContext().getSystemService(ActivityManager.class).isLowRamDevice() || !getResources().getBoolean(R.bool.notification_dots_enabled)) { return false; } |