Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a23d316 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add Default grant for Captive Portal Login app" into tm-dev am:...

Merge "Add Default grant for Captive Portal Login app" into tm-dev am: 5f951629 am: 91bbb3b0 am: 4e7b5e62

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18241770



Change-Id: I692ef50b01ebb9cdde090f87ff273e7d95fcc04b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 713e0280 4e7b5e62
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -3425,6 +3425,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" />

+8 −0
Original line number Diff line number Diff line
@@ -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),
@@ -934,6 +938,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) {