Add @RequiresPermission to ACTION_PREPARE_FACTORY_RESET

Also make it public. This should allow it to be detected appropriately
by the GMSCore permission registry machinery.

Bug; 346611867
Test: builds

Change-Id: I15aa99541f33124ab6aea284889351d86753fa56
This commit is contained in:
James Willcox
2024-06-11 20:53:21 +00:00
parent f567d19681
commit 0569121109

View File

@@ -16,6 +16,7 @@
package com.android.settings.system; package com.android.settings.system;
import android.Manifest; import android.Manifest;
import android.annotation.RequiresPermission;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
@@ -37,8 +38,8 @@ public class FactoryResetPreferenceController extends BasePreferenceController {
private static final String TAG = "FactoryResetPreference"; private static final String TAG = "FactoryResetPreference";
@VisibleForTesting @RequiresPermission(Manifest.permission.PREPARE_FACTORY_RESET)
static final String ACTION_PREPARE_FACTORY_RESET = public static final String ACTION_PREPARE_FACTORY_RESET =
"com.android.settings.ACTION_PREPARE_FACTORY_RESET"; "com.android.settings.ACTION_PREPARE_FACTORY_RESET";
private final UserManager mUm; private final UserManager mUm;