Disable managed services special access screens...
... on low ram devices. - Remove them from the 'Special app access' screen - Display an error message if an app intents directly to them Bug: 35219985 Test: visual, and runtest --path ManagedAccessSettingsLowRamTest.java, when the device is in low ram mode and when it's not. Change-Id: Ied919cb248ae56683a00e3492c4737dfd00449ac
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.utils;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.Fragment;
|
||||
@@ -91,8 +92,12 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mServiceListing.reload();
|
||||
mServiceListing.setListening(true);
|
||||
if (!ActivityManager.isLowRamDeviceStatic()) {
|
||||
mServiceListing.reload();
|
||||
mServiceListing.setListening(true);
|
||||
} else {
|
||||
setEmptyText(R.string.disabled_low_ram_device);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -230,7 +235,6 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
|
||||
public static class Config {
|
||||
public String tag;
|
||||
public String setting;
|
||||
public String secondarySetting;
|
||||
public String intentAction;
|
||||
public String permission;
|
||||
public String noun;
|
||||
|
Reference in New Issue
Block a user