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:
@@ -18,6 +18,7 @@ package com.android.settings.notification;
|
||||
|
||||
import static android.provider.Settings.Global.NOTIFICATION_BUBBLES;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.database.ContentObserver;
|
||||
@@ -81,7 +82,8 @@ public class BubbleNotificationPreferenceController extends TogglePreferenceCont
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
ActivityManager am = mContext.getSystemService(ActivityManager.class);
|
||||
return am.isLowRamDevice() ? UNSUPPORTED_ON_DEVICE : AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user