Disable bubbles for low ram devices
Fixes: 167677013 Test: set low ram true => bubble settings hidden Test: make -j80 RunSettingsRoboTests ROBOTEST_FILTER="Bubble" Change-Id: I1c40a05404ea7c78cc82102b33e4bc3cb3528075
This commit is contained in:
@@ -20,6 +20,7 @@ import static android.app.NotificationManager.BUBBLE_PREFERENCE_ALL;
|
||||
import static android.app.NotificationManager.BUBBLE_PREFERENCE_NONE;
|
||||
import static android.provider.Settings.Global.NOTIFICATION_BUBBLES;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
@@ -99,7 +100,8 @@ public class BubbleSummaryPreferenceController extends NotificationPreferenceCon
|
||||
}
|
||||
|
||||
private boolean isGloballyEnabled() {
|
||||
return Settings.Global.getInt(mContext.getContentResolver(),
|
||||
ActivityManager am = mContext.getSystemService(ActivityManager.class);
|
||||
return !am.isLowRamDevice() && Settings.Global.getInt(mContext.getContentResolver(),
|
||||
NOTIFICATION_BUBBLES, ON) == ON;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user