Merge "Add Default grant for Captive Portal Login app" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5f951629d3
@@ -1869,6 +1869,11 @@
|
||||
-->
|
||||
<string name="config_defaultSearchSelectorPackageName" translatable="false"></string>
|
||||
|
||||
<!-- The package name of the default captive portal login app. Must be granted the
|
||||
POST_NOTIFICATIONS permission.
|
||||
-->
|
||||
<string name="config_defaultCaptivePortalLoginPackageName" translatable="false"></string>
|
||||
|
||||
<!-- Whether to enable geocoder overlay which allows geocoder to be replaced
|
||||
by an app at run-time. When disabled, only the
|
||||
config_geocoderProviderPackageName package will be searched for
|
||||
|
||||
@@ -3419,6 +3419,9 @@
|
||||
<!-- Search Selector -->
|
||||
<java-symbol type="string" name="config_defaultSearchSelectorPackageName" />
|
||||
|
||||
<!-- Captive Portal Login -->
|
||||
<java-symbol type="string" name="config_defaultCaptivePortalLoginPackageName" />
|
||||
|
||||
<!-- Optional IPsec algorithms -->
|
||||
<java-symbol type="array" name="config_optionalIpSecAlgorithms" />
|
||||
|
||||
|
||||
@@ -618,6 +618,10 @@ final class DefaultPermissionGrantPolicy {
|
||||
grantPermissionsToSystemPackage(pm, getDefaultSearchSelectorPackage(), userId,
|
||||
NOTIFICATION_PERMISSIONS);
|
||||
|
||||
// Captive Portal Login
|
||||
grantPermissionsToSystemPackage(pm, getDefaultCaptivePortalLoginPackage(), userId,
|
||||
NOTIFICATION_PERMISSIONS);
|
||||
|
||||
// Camera
|
||||
grantPermissionsToSystemPackage(pm,
|
||||
getDefaultSystemHandlerActivityPackage(pm, MediaStore.ACTION_IMAGE_CAPTURE, userId),
|
||||
@@ -933,6 +937,10 @@ final class DefaultPermissionGrantPolicy {
|
||||
return mContext.getString(R.string.config_defaultSearchSelectorPackageName);
|
||||
}
|
||||
|
||||
private String getDefaultCaptivePortalLoginPackage() {
|
||||
return mContext.getString(R.string.config_defaultCaptivePortalLoginPackageName);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
private final void grantPermissionToEachSystemPackage(PackageManagerWrapper pm,
|
||||
ArrayList<String> packages, int userId, Set<String>... permissions) {
|
||||
|
||||
Reference in New Issue
Block a user