Merge "Enable notification permission enforcement"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d5d0d3f3a2
@@ -3624,7 +3624,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 208;
|
||||
private static final int SETTINGS_VERSION = 209;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@@ -5497,6 +5497,20 @@ public class SettingsProvider extends ContentProvider {
|
||||
currentVersion = 208;
|
||||
}
|
||||
|
||||
if (currentVersion == 208) {
|
||||
// Version 208: Enable enforcement of
|
||||
// android.Manifest.permission#POST_NOTIFICATIONS in order for applications
|
||||
// to post notifications.
|
||||
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
||||
secureSettings.insertSettingLocked(
|
||||
Secure.NOTIFICATION_PERMISSION_ENABLED,
|
||||
/* enabled= */" 1",
|
||||
/* tag= */ null,
|
||||
/* makeDefault= */ false,
|
||||
SettingsState.SYSTEM_PACKAGE_NAME);
|
||||
currentVersion = 209;
|
||||
}
|
||||
|
||||
// vXXX: Add new settings above this point.
|
||||
|
||||
if (currentVersion != newVersion) {
|
||||
|
||||
Reference in New Issue
Block a user