Merge changes from topic "Remove telephony protection level" into rvc-dev am: 0ed16d7b4b
Change-Id: If4e18fe057a500863cbd62db7bcd68be05bd0d6d
This commit is contained in:
@@ -2310,7 +2310,6 @@ package android.content.pm {
|
|||||||
field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
|
field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
|
||||||
field public static final int PROTECTION_FLAG_RETAIL_DEMO = 16777216; // 0x1000000
|
field public static final int PROTECTION_FLAG_RETAIL_DEMO = 16777216; // 0x1000000
|
||||||
field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
|
field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
|
||||||
field public static final int PROTECTION_FLAG_TELEPHONY = 4194304; // 0x400000
|
|
||||||
field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
|
field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
|
||||||
field @Nullable public final String backgroundPermission;
|
field @Nullable public final String backgroundPermission;
|
||||||
field @StringRes public int requestRes;
|
field @StringRes public int requestRes;
|
||||||
|
|||||||
@@ -964,7 +964,6 @@ package android.content.pm {
|
|||||||
method @NonNull public abstract String getServicesSystemSharedLibraryPackageName();
|
method @NonNull public abstract String getServicesSystemSharedLibraryPackageName();
|
||||||
method @NonNull public abstract String getSharedSystemSharedLibraryPackageName();
|
method @NonNull public abstract String getSharedSystemSharedLibraryPackageName();
|
||||||
method @Nullable public String getSystemTextClassifierPackageName();
|
method @Nullable public String getSystemTextClassifierPackageName();
|
||||||
method @Nullable public String[] getTelephonyPackageNames();
|
|
||||||
method @Nullable public String getWellbeingPackageName();
|
method @Nullable public String getWellbeingPackageName();
|
||||||
method @RequiresPermission("android.permission.GRANT_RUNTIME_PERMISSIONS") public abstract void grantRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
|
method @RequiresPermission("android.permission.GRANT_RUNTIME_PERMISSIONS") public abstract void grantRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
|
||||||
method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void removeOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener);
|
method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void removeOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener);
|
||||||
@@ -1007,7 +1006,6 @@ package android.content.pm {
|
|||||||
field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
|
field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000
|
||||||
field public static final int PROTECTION_FLAG_RETAIL_DEMO = 16777216; // 0x1000000
|
field public static final int PROTECTION_FLAG_RETAIL_DEMO = 16777216; // 0x1000000
|
||||||
field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
|
field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000
|
||||||
field public static final int PROTECTION_FLAG_TELEPHONY = 4194304; // 0x400000
|
|
||||||
field public static final int PROTECTION_FLAG_VENDOR_PRIVILEGED = 32768; // 0x8000
|
field public static final int PROTECTION_FLAG_VENDOR_PRIVILEGED = 32768; // 0x8000
|
||||||
field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
|
field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000
|
||||||
field @Nullable public final String backgroundPermission;
|
field @Nullable public final String backgroundPermission;
|
||||||
|
|||||||
@@ -3296,15 +3296,6 @@ public class ApplicationPackageManager extends PackageManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getTelephonyPackageNames() {
|
|
||||||
try {
|
|
||||||
return mPM.getTelephonyPackageNames();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
throw e.rethrowAsRuntimeException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSystemCaptionsServicePackageName() {
|
public String getSystemCaptionsServicePackageName() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -680,8 +680,6 @@ interface IPackageManager {
|
|||||||
|
|
||||||
String getWellbeingPackageName();
|
String getWellbeingPackageName();
|
||||||
|
|
||||||
String[] getTelephonyPackageNames();
|
|
||||||
|
|
||||||
String getAppPredictionServicePackageName();
|
String getAppPredictionServicePackageName();
|
||||||
|
|
||||||
String getSystemCaptionsServicePackageName();
|
String getSystemCaptionsServicePackageName();
|
||||||
|
|||||||
@@ -7795,18 +7795,6 @@ public abstract class PackageManager {
|
|||||||
"getAppPredictionServicePackageName not implemented in subclass");
|
"getAppPredictionServicePackageName not implemented in subclass");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the system defined telephony package names, or null if there's none.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
@TestApi
|
|
||||||
public String[] getTelephonyPackageNames() {
|
|
||||||
throw new UnsupportedOperationException(
|
|
||||||
"getTelephonyPackageNames not implemented in subclass");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the system defined content capture service package name, or null if there's none.
|
* @return the system defined content capture service package name, or null if there's none.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -237,17 +237,6 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
|
|||||||
@TestApi
|
@TestApi
|
||||||
public static final int PROTECTION_FLAG_APP_PREDICTOR = 0x200000;
|
public static final int PROTECTION_FLAG_APP_PREDICTOR = 0x200000;
|
||||||
|
|
||||||
/**
|
|
||||||
* Additional flag for {@link #protectionLevel}, corresponding
|
|
||||||
* to the <code>telephony</code> value of
|
|
||||||
* {@link android.R.attr#protectionLevel}.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
@SystemApi
|
|
||||||
@TestApi
|
|
||||||
public static final int PROTECTION_FLAG_TELEPHONY = 0x400000;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional flag for {@link #protectionLevel}, corresponding
|
* Additional flag for {@link #protectionLevel}, corresponding
|
||||||
* to the <code>companion</code> value of
|
* to the <code>companion</code> value of
|
||||||
@@ -291,7 +280,6 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
|
|||||||
PROTECTION_FLAG_CONFIGURATOR,
|
PROTECTION_FLAG_CONFIGURATOR,
|
||||||
PROTECTION_FLAG_INCIDENT_REPORT_APPROVER,
|
PROTECTION_FLAG_INCIDENT_REPORT_APPROVER,
|
||||||
PROTECTION_FLAG_APP_PREDICTOR,
|
PROTECTION_FLAG_APP_PREDICTOR,
|
||||||
PROTECTION_FLAG_TELEPHONY,
|
|
||||||
PROTECTION_FLAG_COMPANION,
|
PROTECTION_FLAG_COMPANION,
|
||||||
PROTECTION_FLAG_RETAIL_DEMO,
|
PROTECTION_FLAG_RETAIL_DEMO,
|
||||||
})
|
})
|
||||||
@@ -537,9 +525,6 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
|
|||||||
if ((level & PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) != 0) {
|
if ((level & PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) != 0) {
|
||||||
protLevel += "|appPredictor";
|
protLevel += "|appPredictor";
|
||||||
}
|
}
|
||||||
if ((level & PermissionInfo.PROTECTION_FLAG_TELEPHONY) != 0) {
|
|
||||||
protLevel += "|telephony";
|
|
||||||
}
|
|
||||||
if ((level & PermissionInfo.PROTECTION_FLAG_RETAIL_DEMO) != 0) {
|
if ((level & PermissionInfo.PROTECTION_FLAG_RETAIL_DEMO) != 0) {
|
||||||
protLevel += "|retailDemo";
|
protLevel += "|retailDemo";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -737,7 +737,7 @@
|
|||||||
<!-- @SystemApi Allows accessing the messages on ICC
|
<!-- @SystemApi Allows accessing the messages on ICC
|
||||||
@hide Used internally. -->
|
@hide Used internally. -->
|
||||||
<permission android:name="android.permission.ACCESS_MESSAGES_ON_ICC"
|
<permission android:name="android.permission.ACCESS_MESSAGES_ON_ICC"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Used for runtime permissions related to user's SMS messages. -->
|
<!-- Used for runtime permissions related to user's SMS messages. -->
|
||||||
<permission-group android:name="android.permission-group.SMS"
|
<permission-group android:name="android.permission-group.SMS"
|
||||||
@@ -1698,7 +1698,7 @@
|
|||||||
@hide This should only be used by Settings and SystemUI.
|
@hide This should only be used by Settings and SystemUI.
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.NETWORK_SETTINGS"
|
<permission android:name="android.permission.NETWORK_SETTINGS"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows holder to request bluetooth/wifi scan bypassing global "use location" setting and
|
<!-- Allows holder to request bluetooth/wifi scan bypassing global "use location" setting and
|
||||||
location permissions.
|
location permissions.
|
||||||
@@ -2139,7 +2139,7 @@
|
|||||||
<!-- @SystemApi Allows granting runtime permissions to telephony related components.
|
<!-- @SystemApi Allows granting runtime permissions to telephony related components.
|
||||||
@hide -->
|
@hide -->
|
||||||
<permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS"
|
<permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows modification of the telephony state - power on, mmi, etc.
|
<!-- Allows modification of the telephony state - power on, mmi, etc.
|
||||||
Does not include placing calls.
|
Does not include placing calls.
|
||||||
@@ -2167,7 +2167,7 @@
|
|||||||
<!-- @SystemApi Allows listen permission to always reported signal strength.
|
<!-- @SystemApi Allows listen permission to always reported signal strength.
|
||||||
@hide Used internally. -->
|
@hide Used internally. -->
|
||||||
<permission android:name="android.permission.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH"
|
<permission android:name="android.permission.LISTEN_ALWAYS_REPORTED_SIGNAL_STRENGTH"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- @SystemApi Protects the ability to register any PhoneAccount with
|
<!-- @SystemApi Protects the ability to register any PhoneAccount with
|
||||||
PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount
|
PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount
|
||||||
@@ -2280,12 +2280,12 @@
|
|||||||
|
|
||||||
<!-- Must be required by a telephony data service to ensure that only the
|
<!-- Must be required by a telephony data service to ensure that only the
|
||||||
system can bind to it.
|
system can bind to it.
|
||||||
<p>Protection level: signature|telephony
|
<p>Protection level: signature
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.BIND_TELEPHONY_DATA_SERVICE"
|
<permission android:name="android.permission.BIND_TELEPHONY_DATA_SERVICE"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Must be required by a NetworkService to ensure that only the
|
<!-- Must be required by a NetworkService to ensure that only the
|
||||||
system can bind to it.
|
system can bind to it.
|
||||||
@@ -2306,19 +2306,19 @@
|
|||||||
|
|
||||||
<!-- @SystemApi Must be required by an EuiccService to ensure that only the system can bind to
|
<!-- @SystemApi Must be required by an EuiccService to ensure that only the system can bind to
|
||||||
it.
|
it.
|
||||||
<p>Protection level: signature|telephony
|
<p>Protection level: signature
|
||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.BIND_EUICC_SERVICE"
|
<permission android:name="android.permission.BIND_EUICC_SERVICE"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Required for reading information about carrier apps from SystemConfigManager.
|
<!-- Required for reading information about carrier apps from SystemConfigManager.
|
||||||
<p>Protection level: signature|telephony
|
<p>Protection level: signature
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.READ_CARRIER_APP_INFO"
|
<permission android:name="android.permission.READ_CARRIER_APP_INFO"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
<!-- Permissions for sdcard interaction -->
|
<!-- Permissions for sdcard interaction -->
|
||||||
@@ -2676,7 +2676,7 @@
|
|||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE"
|
<permission android:name="android.permission.SUGGEST_TELEPHONY_TIME_AND_ZONE"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows applications like settings to suggest the user's manually chosen time / time zone.
|
<!-- Allows applications like settings to suggest the user's manually chosen time / time zone.
|
||||||
<p>Not for use by third-party applications.
|
<p>Not for use by third-party applications.
|
||||||
@@ -3156,7 +3156,7 @@
|
|||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"
|
<permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- @SystemApi Allows an application to use
|
<!-- @SystemApi Allows an application to use
|
||||||
{@link android.view.WindowManager.LayoutsParams#SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS}
|
{@link android.view.WindowManager.LayoutsParams#SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS}
|
||||||
@@ -4014,7 +4014,7 @@
|
|||||||
@hide
|
@hide
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.DEVICE_POWER"
|
<permission android:name="android.permission.DEVICE_POWER"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows toggling battery saver on the system.
|
<!-- Allows toggling battery saver on the system.
|
||||||
Superseded by DEVICE_POWER permission. @hide @SystemApi
|
Superseded by DEVICE_POWER permission. @hide @SystemApi
|
||||||
@@ -4049,13 +4049,13 @@
|
|||||||
<p>Not for use by third-party applications.
|
<p>Not for use by third-party applications.
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.BROADCAST_SMS"
|
<permission android:name="android.permission.BROADCAST_SMS"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows an application to broadcast a WAP PUSH receipt notification.
|
<!-- Allows an application to broadcast a WAP PUSH receipt notification.
|
||||||
<p>Not for use by third-party applications.
|
<p>Not for use by third-party applications.
|
||||||
-->
|
-->
|
||||||
<permission android:name="android.permission.BROADCAST_WAP_PUSH"
|
<permission android:name="android.permission.BROADCAST_WAP_PUSH"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- @SystemApi Allows an application to broadcast privileged networking requests.
|
<!-- @SystemApi Allows an application to broadcast privileged networking requests.
|
||||||
<p>Not for use by third-party applications.
|
<p>Not for use by third-party applications.
|
||||||
@@ -4721,13 +4721,13 @@
|
|||||||
{@link android.provider.BlockedNumberContract}.
|
{@link android.provider.BlockedNumberContract}.
|
||||||
@hide -->
|
@hide -->
|
||||||
<permission android:name="android.permission.READ_BLOCKED_NUMBERS"
|
<permission android:name="android.permission.READ_BLOCKED_NUMBERS"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Allows the holder to write blocked numbers. See
|
<!-- Allows the holder to write blocked numbers. See
|
||||||
{@link android.provider.BlockedNumberContract}.
|
{@link android.provider.BlockedNumberContract}.
|
||||||
@hide -->
|
@hide -->
|
||||||
<permission android:name="android.permission.WRITE_BLOCKED_NUMBERS"
|
<permission android:name="android.permission.WRITE_BLOCKED_NUMBERS"
|
||||||
android:protectionLevel="signature|telephony" />
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- Must be required by an {@link android.service.vr.VrListenerService}, to ensure that only
|
<!-- Must be required by an {@link android.service.vr.VrListenerService}, to ensure that only
|
||||||
the system can bind to it.
|
the system can bind to it.
|
||||||
|
|||||||
@@ -295,9 +295,6 @@
|
|||||||
<!-- Additional flag from base permission type: this permission can be automatically
|
<!-- Additional flag from base permission type: this permission can be automatically
|
||||||
granted to the system app predictor -->
|
granted to the system app predictor -->
|
||||||
<flag name="appPredictor" value="0x200000" />
|
<flag name="appPredictor" value="0x200000" />
|
||||||
<!-- Additional flag from base permission type: this permission can be automatically
|
|
||||||
granted to the system telephony apps -->
|
|
||||||
<flag name="telephony" value="0x400000" />
|
|
||||||
<!-- Additional flag from base permission type: this permission can be automatically
|
<!-- Additional flag from base permission type: this permission can be automatically
|
||||||
granted to the system companion device manager service -->
|
granted to the system companion device manager service -->
|
||||||
<flag name="companion" value="0x800000" />
|
<flag name="companion" value="0x800000" />
|
||||||
|
|||||||
@@ -3641,15 +3641,6 @@
|
|||||||
-->
|
-->
|
||||||
<string name="config_defaultWellbeingPackage" translatable="false"></string>
|
<string name="config_defaultWellbeingPackage" translatable="false"></string>
|
||||||
|
|
||||||
<!-- The package name for the system telephony apps.
|
|
||||||
This package must be trusted, as it will be granted with permissions with special telephony
|
|
||||||
protection level. Note, framework by default support multiple telephony apps, each package
|
|
||||||
name is separated by comma.
|
|
||||||
Example: "com.android.phone,com.android.stk,com.android.providers.telephony"
|
|
||||||
(Note: shell is included for testing purposes)
|
|
||||||
-->
|
|
||||||
<string name="config_telephonyPackages" translatable="false">"com.android.phone,com.android.stk,com.android.providers.telephony,com.android.ons"</string>
|
|
||||||
|
|
||||||
<!-- The component name for the default system attention service.
|
<!-- The component name for the default system attention service.
|
||||||
This service must be trusted, as it can be activated without explicit consent of the user.
|
This service must be trusted, as it can be activated without explicit consent of the user.
|
||||||
See android.attention.AttentionManagerService.
|
See android.attention.AttentionManagerService.
|
||||||
|
|||||||
@@ -3398,7 +3398,6 @@
|
|||||||
<java-symbol type="string" name="config_defaultAutofillService" />
|
<java-symbol type="string" name="config_defaultAutofillService" />
|
||||||
<java-symbol type="string" name="config_defaultTextClassifierPackage" />
|
<java-symbol type="string" name="config_defaultTextClassifierPackage" />
|
||||||
<java-symbol type="string" name="config_defaultWellbeingPackage" />
|
<java-symbol type="string" name="config_defaultWellbeingPackage" />
|
||||||
<java-symbol type="string" name="config_telephonyPackages" />
|
|
||||||
<java-symbol type="string" name="config_defaultContentCaptureService" />
|
<java-symbol type="string" name="config_defaultContentCaptureService" />
|
||||||
<java-symbol type="string" name="config_defaultAugmentedAutofillService" />
|
<java-symbol type="string" name="config_defaultAugmentedAutofillService" />
|
||||||
<java-symbol type="string" name="config_defaultAppPredictionService" />
|
<java-symbol type="string" name="config_defaultAppPredictionService" />
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ public abstract class PackageManagerInternal {
|
|||||||
public static final int PACKAGE_CONFIGURATOR = 9;
|
public static final int PACKAGE_CONFIGURATOR = 9;
|
||||||
public static final int PACKAGE_INCIDENT_REPORT_APPROVER = 10;
|
public static final int PACKAGE_INCIDENT_REPORT_APPROVER = 10;
|
||||||
public static final int PACKAGE_APP_PREDICTOR = 11;
|
public static final int PACKAGE_APP_PREDICTOR = 11;
|
||||||
public static final int PACKAGE_TELEPHONY = 12;
|
|
||||||
public static final int PACKAGE_WIFI = 13;
|
public static final int PACKAGE_WIFI = 13;
|
||||||
public static final int PACKAGE_COMPANION = 14;
|
public static final int PACKAGE_COMPANION = 14;
|
||||||
public static final int PACKAGE_RETAIL_DEMO = 15;
|
public static final int PACKAGE_RETAIL_DEMO = 15;
|
||||||
@@ -124,7 +123,6 @@ public abstract class PackageManagerInternal {
|
|||||||
PACKAGE_CONFIGURATOR,
|
PACKAGE_CONFIGURATOR,
|
||||||
PACKAGE_INCIDENT_REPORT_APPROVER,
|
PACKAGE_INCIDENT_REPORT_APPROVER,
|
||||||
PACKAGE_APP_PREDICTOR,
|
PACKAGE_APP_PREDICTOR,
|
||||||
PACKAGE_TELEPHONY,
|
|
||||||
PACKAGE_WIFI,
|
PACKAGE_WIFI,
|
||||||
PACKAGE_COMPANION,
|
PACKAGE_COMPANION,
|
||||||
PACKAGE_RETAIL_DEMO,
|
PACKAGE_RETAIL_DEMO,
|
||||||
|
|||||||
@@ -1548,7 +1548,6 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
final @Nullable String mConfiguratorPackage;
|
final @Nullable String mConfiguratorPackage;
|
||||||
final @Nullable String mAppPredictionServicePackage;
|
final @Nullable String mAppPredictionServicePackage;
|
||||||
final @Nullable String mIncidentReportApproverPackage;
|
final @Nullable String mIncidentReportApproverPackage;
|
||||||
final @Nullable String[] mTelephonyPackages;
|
|
||||||
final @Nullable String mServicesExtensionPackageName;
|
final @Nullable String mServicesExtensionPackageName;
|
||||||
final @Nullable String mSharedSystemSharedLibraryPackageName;
|
final @Nullable String mSharedSystemSharedLibraryPackageName;
|
||||||
final @Nullable String mRetailDemoPackage;
|
final @Nullable String mRetailDemoPackage;
|
||||||
@@ -3181,7 +3180,6 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
mConfiguratorPackage = getDeviceConfiguratorPackageName();
|
mConfiguratorPackage = getDeviceConfiguratorPackageName();
|
||||||
mAppPredictionServicePackage = getAppPredictionServicePackageName();
|
mAppPredictionServicePackage = getAppPredictionServicePackageName();
|
||||||
mIncidentReportApproverPackage = getIncidentReportApproverPackageName();
|
mIncidentReportApproverPackage = getIncidentReportApproverPackageName();
|
||||||
mTelephonyPackages = getTelephonyPackageNames();
|
|
||||||
mRetailDemoPackage = getRetailDemoPackageName();
|
mRetailDemoPackage = getRetailDemoPackageName();
|
||||||
|
|
||||||
// Now that we know all of the shared libraries, update all clients to have
|
// Now that we know all of the shared libraries, update all clients to have
|
||||||
@@ -19938,16 +19936,6 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
R.string.config_incidentReportApproverPackage));
|
R.string.config_incidentReportApproverPackage));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getTelephonyPackageNames() {
|
|
||||||
String names = mContext.getString(R.string.config_telephonyPackages);
|
|
||||||
String[] telephonyPackageNames = null;
|
|
||||||
if (!TextUtils.isEmpty(names)) {
|
|
||||||
telephonyPackageNames = names.trim().split(",");
|
|
||||||
}
|
|
||||||
return ensureSystemPackageNames(telephonyPackageNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getContentCaptureServicePackageName() {
|
public String getContentCaptureServicePackageName() {
|
||||||
final String flattenedContentCaptureService =
|
final String flattenedContentCaptureService =
|
||||||
@@ -23335,8 +23323,6 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
return filterOnlySystemPackages(mIncidentReportApproverPackage);
|
return filterOnlySystemPackages(mIncidentReportApproverPackage);
|
||||||
case PackageManagerInternal.PACKAGE_APP_PREDICTOR:
|
case PackageManagerInternal.PACKAGE_APP_PREDICTOR:
|
||||||
return filterOnlySystemPackages(mAppPredictionServicePackage);
|
return filterOnlySystemPackages(mAppPredictionServicePackage);
|
||||||
case PackageManagerInternal.PACKAGE_TELEPHONY:
|
|
||||||
return filterOnlySystemPackages(mTelephonyPackages);
|
|
||||||
case PackageManagerInternal.PACKAGE_COMPANION:
|
case PackageManagerInternal.PACKAGE_COMPANION:
|
||||||
return filterOnlySystemPackages("com.android.companiondevicemanager");
|
return filterOnlySystemPackages("com.android.companiondevicemanager");
|
||||||
case PackageManagerInternal.PACKAGE_RETAIL_DEMO:
|
case PackageManagerInternal.PACKAGE_RETAIL_DEMO:
|
||||||
|
|||||||
@@ -277,9 +277,6 @@ public final class BasePermission {
|
|||||||
public boolean isAppPredictor() {
|
public boolean isAppPredictor() {
|
||||||
return (protectionLevel & PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) != 0;
|
return (protectionLevel & PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) != 0;
|
||||||
}
|
}
|
||||||
public boolean isTelephony() {
|
|
||||||
return (protectionLevel & PermissionInfo.PROTECTION_FLAG_TELEPHONY) != 0;
|
|
||||||
}
|
|
||||||
public boolean isCompanion() {
|
public boolean isCompanion() {
|
||||||
return (protectionLevel & PermissionInfo.PROTECTION_FLAG_COMPANION) != 0;
|
return (protectionLevel & PermissionInfo.PROTECTION_FLAG_COMPANION) != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3464,13 +3464,6 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
|||||||
// Special permissions for the system app predictor.
|
// Special permissions for the system app predictor.
|
||||||
allowed = true;
|
allowed = true;
|
||||||
}
|
}
|
||||||
if (!allowed && bp.isTelephony()
|
|
||||||
&& ArrayUtils.contains(mPackageManagerInt.getKnownPackageNames(
|
|
||||||
PackageManagerInternal.PACKAGE_TELEPHONY, UserHandle.USER_SYSTEM),
|
|
||||||
pkg.getPackageName())) {
|
|
||||||
// Special permissions for the system telephony apps.
|
|
||||||
allowed = true;
|
|
||||||
}
|
|
||||||
if (!allowed && bp.isCompanion()
|
if (!allowed && bp.isCompanion()
|
||||||
&& ArrayUtils.contains(mPackageManagerInt.getKnownPackageNames(
|
&& ArrayUtils.contains(mPackageManagerInt.getKnownPackageNames(
|
||||||
PackageManagerInternal.PACKAGE_COMPANION, UserHandle.USER_SYSTEM),
|
PackageManagerInternal.PACKAGE_COMPANION, UserHandle.USER_SYSTEM),
|
||||||
|
|||||||
Reference in New Issue
Block a user