Settigns app changes to enable Notification listeners on Android Go.
Bug: 148575561 Test: make RunSettingsRoboTests -j40 and manual tests Change-Id: I1832529edd55d9ba2053ccc0ff7e2bc93f4a00b5
This commit is contained in:
@@ -10940,8 +10940,6 @@
|
||||
<!-- The divider symbol between different parts of the notification header including spaces. not translatable [CHAR LIMIT=3] -->
|
||||
<string name="notification_header_divider_symbol_with_spaces" translatable="false">" • "</string>
|
||||
|
||||
<!-- Note displayed when certain features are not available on low ram devices. [CHAR LIMIT=NONE] -->
|
||||
<string name="disabled_low_ram_device">This feature is not available on this device</string>
|
||||
<!-- Title of a message for an empty state screen. A user will see this message if they try to use a certain feature, but the feature was turned off so it won't slow down their phone. [CHAR LIMIT=NONE] -->
|
||||
<string name="disabled_feature">Feature not available</string>
|
||||
<!-- Part of a message for an empty state screen. A user will see this message if they try to use a certain feature, but the feature was turned off so it won't slow down their phone. [CHAR LIMIT=NONE] -->
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.applications.specialaccess.notificationaccess;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
@@ -31,7 +30,7 @@ public class NotificationAccessController extends BasePreferenceController {
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return !ActivityManager.isLowRamDeviceStatic() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
return AVAILABLE;
|
||||
}
|
||||
|
||||
public static boolean hasAccess(Context context, ComponentName cn) {
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.applications.specialaccess.notificationaccess;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.ComponentName;
|
||||
@@ -116,10 +115,6 @@ public class NotificationAccessDetails extends AppInfoBase {
|
||||
@Override
|
||||
protected boolean refreshUi() {
|
||||
final Context context = getContext();
|
||||
if (context.getSystemService(ActivityManager.class).isLowRamDeviceStatic()) {
|
||||
Slog.d(TAG, "not available on low ram devices");
|
||||
return false;
|
||||
}
|
||||
if (mComponentName == null) {
|
||||
// No service given
|
||||
Slog.d(TAG, "No component name provided");
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.applications.specialaccess.notificationaccess;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
@@ -29,8 +28,6 @@ public class NotificationAccessScreenPreferenceController extends BasePreference
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return !ActivityManager.isLowRamDeviceStatic()
|
||||
? AVAILABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
return AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.notification;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
@@ -113,12 +112,8 @@ public class NotificationAccessSettings extends EmptyTextSettings {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (!ActivityManager.isLowRamDeviceStatic()) {
|
||||
mServiceListing.reload();
|
||||
mServiceListing.setListening(true);
|
||||
} else {
|
||||
setEmptyText(R.string.disabled_low_ram_device);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.notification.zen;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
@@ -84,11 +83,7 @@ public class ZenAccessSettings extends EmptyTextSettings implements
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (!ActivityManager.isLowRamDeviceStatic()) {
|
||||
reloadList();
|
||||
} else {
|
||||
setEmptyText(R.string.disabled_low_ram_device);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.utils;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Dialog;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
@@ -91,12 +90,8 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (!ActivityManager.isLowRamDeviceStatic()) {
|
||||
mServiceListing.reload();
|
||||
mServiceListing.setListening(true);
|
||||
} else {
|
||||
setEmptyText(R.string.disabled_low_ram_device);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user