summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian DC <radian.dc@gmail.com>2017-12-07 21:42:34 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-10-21 18:56:52 (GMT)
commit657c31ba7639910fe3a565a205d1ce9252990101 (patch)
tree41c84473ef9248c8207c07232e06181f2c1ba092
parent9db155928c59b32108a41918d44fa382cff99bd7 (diff)
downloadandroid_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.zip
android_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.tar.gz
android_packages_apps_Trebuchet-657c31ba7639910fe3a565a205d1ce9252990101.tar.bz2
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.java2
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 6209c5e..6dafd7d 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;
}