Temporarily relax the privileged device identifier access check
Access to device identifiers was moved from a runtime permission to a
privileged permission; this change broke some first party apps that query for
these identifiers. This change introduces a flag in TelephonyPermissions that
will allow the privileged check to be relaxed so that dummy data is returned
(null for TelephonyManager methods and Build.UNKNOWN for Build#getSerial)
regardless of target SDK instead of throwing a SecurityException to prevent
app breakage. This flag will be changed back to the default false once all of
the first party apps have the privileged permission granted or their own
unique ID.
Bug: 117611604
Test: cts-tradefed run cts-dev -m CtsTelephony3TestCases
Change-Id: I294455e4c7e589def21d0c437ec1ef398bd44731
1 file changed