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

Commit f8e669ca authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan Committed by Jay Sullivan
Browse files

[Safety Labels] Decouple safety label changes from permission rationale

Currently the "Safety Label Changes" feature is toggled on only when the
following two feature flags are enabled:

1. safety_label_change_notifications_enabled
2. permission_rationale_enabled

Remove the dependence on "permission_rationale_enabled", so that "Safety
Label Changes" only relies on the
"safety_label_change_notifications_enabled" flag.

Bug: 269330969
Test:  atest PermissionControllerMockingTests:SafetyLabelChangesJobServiceTest; atest CtsPermission3TestCases:SafetyLabelChangesJobServiceTest;atest CtsPermission3TestCases:AppDataSharingUpdatesTest
Change-Id: Icccdeb464f8c0b3190923c3708947c593f1d6fe7
parent dc6ec7e8
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.server.pm;


import static android.os.PowerExemptionManager.REASON_LOCKED_BOOT_COMPLETED;
import static android.os.PowerExemptionManager.REASON_LOCKED_BOOT_COMPLETED;
import static android.os.PowerExemptionManager.TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_ALLOWED;
import static android.os.PowerExemptionManager.TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_ALLOWED;
import static android.safetylabel.SafetyLabelConstants.PERMISSION_RATIONALE_ENABLED;
import static android.safetylabel.SafetyLabelConstants.SAFETY_LABEL_CHANGE_NOTIFICATIONS_ENABLED;
import static android.safetylabel.SafetyLabelConstants.SAFETY_LABEL_CHANGE_NOTIFICATIONS_ENABLED;


import static com.android.server.pm.PackageManagerService.DEBUG_INSTALL;
import static com.android.server.pm.PackageManagerService.DEBUG_INSTALL;
@@ -392,8 +391,7 @@ public final class BroadcastHelper {
    /** Returns whether the Safety Label Change notification, a privacy feature, is enabled. */
    /** Returns whether the Safety Label Change notification, a privacy feature, is enabled. */
    public static boolean isPrivacySafetyLabelChangeNotificationsEnabled() {
    public static boolean isPrivacySafetyLabelChangeNotificationsEnabled() {
        return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
        return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
                SAFETY_LABEL_CHANGE_NOTIFICATIONS_ENABLED, false) && DeviceConfig.getBoolean(
                SAFETY_LABEL_CHANGE_NOTIFICATIONS_ENABLED, false);
                DeviceConfig.NAMESPACE_PRIVACY, PERMISSION_RATIONALE_ENABLED, false);
    }
    }


    @NonNull
    @NonNull