Merge "Add defaultSearchSelector config and default grant" into tm-dev am: 1e22373816
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17804915 Change-Id: I1fb6267a475f90e68e10d9dd67e647088c203329 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1864,6 +1864,11 @@
|
|||||||
-->
|
-->
|
||||||
<string name="config_defaultNetworkRecommendationProviderPackage" translatable="false"></string>
|
<string name="config_defaultNetworkRecommendationProviderPackage" translatable="false"></string>
|
||||||
|
|
||||||
|
<!-- The package name of the default search selector app. Must be granted the POST_NOTIFICATIONS
|
||||||
|
permission.
|
||||||
|
-->
|
||||||
|
<string name="config_defaultSearchSelectorPackageName" translatable="false"></string>
|
||||||
|
|
||||||
<!-- Whether to enable geocoder overlay which allows geocoder to be replaced
|
<!-- Whether to enable geocoder overlay which allows geocoder to be replaced
|
||||||
by an app at run-time. When disabled, only the
|
by an app at run-time. When disabled, only the
|
||||||
config_geocoderProviderPackageName package will be searched for
|
config_geocoderProviderPackageName package will be searched for
|
||||||
|
|||||||
@@ -3413,6 +3413,9 @@
|
|||||||
<!-- Network Recommendation -->
|
<!-- Network Recommendation -->
|
||||||
<java-symbol type="string" name="config_defaultNetworkRecommendationProviderPackage" />
|
<java-symbol type="string" name="config_defaultNetworkRecommendationProviderPackage" />
|
||||||
|
|
||||||
|
<!-- Search Selector -->
|
||||||
|
<java-symbol type="string" name="config_defaultSearchSelectorPackageName" />
|
||||||
|
|
||||||
<!-- Optional IPsec algorithms -->
|
<!-- Optional IPsec algorithms -->
|
||||||
<java-symbol type="array" name="config_optionalIpSecAlgorithms" />
|
<java-symbol type="array" name="config_optionalIpSecAlgorithms" />
|
||||||
|
|
||||||
|
|||||||
@@ -613,6 +613,10 @@ final class DefaultPermissionGrantPolicy {
|
|||||||
pm, setupWizardPackage, userId, NEARBY_DEVICES_PERMISSIONS);
|
pm, setupWizardPackage, userId, NEARBY_DEVICES_PERMISSIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SearchSelector
|
||||||
|
grantPermissionsToSystemPackage(pm, getDefaultSearchSelectorPackage(), userId,
|
||||||
|
NOTIFICATION_PERMISSIONS);
|
||||||
|
|
||||||
// Camera
|
// Camera
|
||||||
grantPermissionsToSystemPackage(pm,
|
grantPermissionsToSystemPackage(pm,
|
||||||
getDefaultSystemHandlerActivityPackage(pm, MediaStore.ACTION_IMAGE_CAPTURE, userId),
|
getDefaultSystemHandlerActivityPackage(pm, MediaStore.ACTION_IMAGE_CAPTURE, userId),
|
||||||
@@ -941,6 +945,10 @@ final class DefaultPermissionGrantPolicy {
|
|||||||
new Intent(Intent.ACTION_MAIN).addCategory(category), userId);
|
new Intent(Intent.ACTION_MAIN).addCategory(category), userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getDefaultSearchSelectorPackage() {
|
||||||
|
return mContext.getString(R.string.config_defaultSearchSelectorPackageName);
|
||||||
|
}
|
||||||
|
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
private final void grantPermissionToEachSystemPackage(PackageManagerWrapper pm,
|
private final void grantPermissionToEachSystemPackage(PackageManagerWrapper pm,
|
||||||
ArrayList<String> packages, int userId, Set<String>... permissions) {
|
ArrayList<String> packages, int userId, Set<String>... permissions) {
|
||||||
|
|||||||
Reference in New Issue
Block a user