Temporarily revert device identifier access check to previous behavior
If a calling package does not meet the new requirements for device identifier
access the calling package and method will be logged and the previous
READ_PHONE_STATE permission check will be performed to grant access to the
requested identifier. This is to prevent additional breakage for apps that
currently require device identifiers but have not yet been granted the
privileged permission or carrier privileges.
Bug: 117585389
Test: cts-tradefed run cts -m CtsPermissionTestCases \
-t android.permission.cts.TelephonyManagerPermissionTest
Test: Manually invoked an app targeting pre-Q and verified access
to device identifiers with the READ_PHONE_STATE permission.
Change-Id: I03339486a2d6971b93472479b79959c888beba1e
This commit is contained in:
@@ -12362,6 +12362,28 @@ public final class Settings {
|
||||
public static final String SMS_ACCESS_RESTRICTION_ENABLED =
|
||||
"sms_access_restriction_enabled";
|
||||
|
||||
/**
|
||||
* If set to 1, an app must have the READ_PRIVILEGED_PHONE_STATE permission (or be a device
|
||||
* / profile owner with the READ_PHONE_STATE permission) to access device identifiers.
|
||||
*
|
||||
* STOPSHIP: Remove this once we ship with the new device identifier check enabled.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String PRIVILEGED_DEVICE_IDENTIFIER_CHECK_ENABLED =
|
||||
"privileged_device_identifier_check_enabled";
|
||||
|
||||
/**
|
||||
* If set to 1, an app that is targeting Q and does not meet the new requirements to access
|
||||
* device identifiers will receive a SecurityException.
|
||||
*
|
||||
* STOPSHIP: Remove this once we ship with the new device identifier check enabled.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String PRIVILEGED_DEVICE_IDENTIFIER_TARGET_Q_BEHAVIOR_ENABLED =
|
||||
"privileged_device_identifier_target_q_behavior_enabled";
|
||||
|
||||
/**
|
||||
* If set to 1, SettingsProvider's restoreAnyVersion="true" attribute will be ignored
|
||||
* and restoring to lower version of platform API will be skipped.
|
||||
|
||||
Reference in New Issue
Block a user