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

Commit 708a1ca1 authored by Dan Sandler's avatar Dan Sandler Committed by Ian Pedowitz
Browse files

Move USE_COLORIZED_NOTIFICATIONS to com.android.

It's @hidden, but CTS needs it to be out of the android.*
namespace too.

Fixes: 64613274
Test: Grab the cts binaries(android-cts.zip) from OC Release
Test: Extract and from android-cts/tools directory, launch ./cts-tradefed
Test: On the DUT with CL cherrypicked, run the below(will run this test on both abi's):
Test: run cts -m CtsPermission2TestCases -t android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered --skip-connectivity-check --skip-preconditions --serial <device serial>
Test: android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered doesn't fail for android namespace:android.permission.TRIGGER_TIME_ZONE_RULES_CHECK
Change-Id: I753c2cc19111f9ed39e7fc3e006aab096c733ddc
Merged-In: I2046ae17b9e89ac0a83e182b91422fd242bc7557
parent 1cbfe74f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3169,7 +3169,7 @@


    <!-- Allows notifications to be colorized
    <!-- Allows notifications to be colorized
         <p>Not for use by third-party applications. @hide -->
         <p>Not for use by third-party applications. @hide -->
    <permission android:name="android.permission.USE_COLORIZED_NOTIFICATIONS"
    <permission android:name="com.android.permission.USE_COLORIZED_NOTIFICATIONS"
                android:protectionLevel="signature|setup" />
                android:protectionLevel="signature|setup" />


    <!-- Allows access to keyguard secure storage.  Only allowed for system processes.
    <!-- Allows access to keyguard secure storage.  Only allowed for system processes.
+3 −3
Original line number Original line Diff line number Diff line
@@ -3203,9 +3203,9 @@ public class NotificationManagerService extends SystemService {
                    (userId == UserHandle.USER_ALL) ? UserHandle.USER_SYSTEM : userId);
                    (userId == UserHandle.USER_ALL) ? UserHandle.USER_SYSTEM : userId);
            Notification.addFieldsFromContext(ai, notification);
            Notification.addFieldsFromContext(ai, notification);


            int canColorize = mPackageManagerClient.checkPermission(
            boolean canColorize = PERMISSION_GRANTED == mPackageManagerClient.checkPermission(
                    android.Manifest.permission.USE_COLORIZED_NOTIFICATIONS, pkg);
                    "com.android.permission.USE_COLORIZED_NOTIFICATIONS", pkg);
            if (canColorize == PERMISSION_GRANTED) {
            if (canColorize) {
                notification.flags |= Notification.FLAG_CAN_COLORIZE;
                notification.flags |= Notification.FLAG_CAN_COLORIZE;
            } else {
            } else {
                notification.flags &= ~Notification.FLAG_CAN_COLORIZE;
                notification.flags &= ~Notification.FLAG_CAN_COLORIZE;