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

Commit c9e35bc2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8555638 from 4ae0fb53 to tm-qpr1-release

Change-Id: I4b825a7a11289f70e5bb3513b048b6cc63eea9b5
parents 80868dbd 4ae0fb53
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -800,6 +800,7 @@ package android.content.pm {
    method public boolean hasRequestForegroundServiceExemption();
    method public boolean hasRequestForegroundServiceExemption();
    method public boolean isPrivilegedApp();
    method public boolean isPrivilegedApp();
    method public boolean isSystemApp();
    method public boolean isSystemApp();
    method public void setEnableOnBackInvokedCallback(boolean);
    field public static final int PRIVATE_FLAG_PRIVILEGED = 8; // 0x8
    field public static final int PRIVATE_FLAG_PRIVILEGED = 8; // 0x8
    field public int privateFlags;
    field public int privateFlags;
  }
  }
+14 −9
Original line number Original line Diff line number Diff line
@@ -2537,8 +2537,8 @@ public class AppOpsManager {
     * restriction} for a certain app-op.
     * restriction} for a certain app-op.
     */
     */
    private static RestrictionBypass[] sOpAllowSystemRestrictionBypass = new RestrictionBypass[] {
    private static RestrictionBypass[] sOpAllowSystemRestrictionBypass = new RestrictionBypass[] {
            null, //COARSE_LOCATION
            new RestrictionBypass(true, false, false), //COARSE_LOCATION
            null, //FINE_LOCATION
            new RestrictionBypass(true, false, false), //FINE_LOCATION
            null, //GPS
            null, //GPS
            null, //VIBRATE
            null, //VIBRATE
            null, //READ_CONTACTS
            null, //READ_CONTACTS
@@ -2547,7 +2547,7 @@ public class AppOpsManager {
            null, //WRITE_CALL_LOG
            null, //WRITE_CALL_LOG
            null, //READ_CALENDAR
            null, //READ_CALENDAR
            null, //WRITE_CALENDAR
            null, //WRITE_CALENDAR
            new RestrictionBypass(true, false), //WIFI_SCAN
            new RestrictionBypass(false, true, false), //WIFI_SCAN
            null, //POST_NOTIFICATION
            null, //POST_NOTIFICATION
            null, //NEIGHBORING_CELLS
            null, //NEIGHBORING_CELLS
            null, //CALL_PHONE
            null, //CALL_PHONE
@@ -2561,10 +2561,10 @@ public class AppOpsManager {
            null, //READ_ICC_SMS
            null, //READ_ICC_SMS
            null, //WRITE_ICC_SMS
            null, //WRITE_ICC_SMS
            null, //WRITE_SETTINGS
            null, //WRITE_SETTINGS
            new RestrictionBypass(true, false), //SYSTEM_ALERT_WINDOW
            new RestrictionBypass(false, true, false), //SYSTEM_ALERT_WINDOW
            null, //ACCESS_NOTIFICATIONS
            null, //ACCESS_NOTIFICATIONS
            null, //CAMERA
            null, //CAMERA
            new RestrictionBypass(false, true), //RECORD_AUDIO
            new RestrictionBypass(false, false, true), //RECORD_AUDIO
            null, //PLAY_AUDIO
            null, //PLAY_AUDIO
            null, //READ_CLIPBOARD
            null, //READ_CLIPBOARD
            null, //WRITE_CLIPBOARD
            null, //WRITE_CLIPBOARD
@@ -2582,7 +2582,7 @@ public class AppOpsManager {
            null, //MONITOR_HIGH_POWER_LOCATION
            null, //MONITOR_HIGH_POWER_LOCATION
            null, //GET_USAGE_STATS
            null, //GET_USAGE_STATS
            null, //MUTE_MICROPHONE
            null, //MUTE_MICROPHONE
            new RestrictionBypass(true, false), //TOAST_WINDOW
            new RestrictionBypass(false, true, false), //TOAST_WINDOW
            null, //PROJECT_MEDIA
            null, //PROJECT_MEDIA
            null, //ACTIVATE_VPN
            null, //ACTIVATE_VPN
            null, //WALLPAPER
            null, //WALLPAPER
@@ -2614,7 +2614,7 @@ public class AppOpsManager {
            null, // ACCEPT_HANDOVER
            null, // ACCEPT_HANDOVER
            null, // MANAGE_IPSEC_HANDOVERS
            null, // MANAGE_IPSEC_HANDOVERS
            null, // START_FOREGROUND
            null, // START_FOREGROUND
            new RestrictionBypass(true, false), // BLUETOOTH_SCAN
            new RestrictionBypass(false, true, false), // BLUETOOTH_SCAN
            null, // USE_BIOMETRIC
            null, // USE_BIOMETRIC
            null, // ACTIVITY_RECOGNITION
            null, // ACTIVITY_RECOGNITION
            null, // SMS_FINANCIAL_TRANSACTIONS
            null, // SMS_FINANCIAL_TRANSACTIONS
@@ -3331,6 +3331,9 @@ public class AppOpsManager {
     * @hide
     * @hide
     */
     */
    public static class RestrictionBypass {
    public static class RestrictionBypass {
        /** Does the app need to be system uid to bypass the restriction */
        public boolean isSystemUid;

        /** Does the app need to be privileged to bypass the restriction */
        /** Does the app need to be privileged to bypass the restriction */
        public boolean isPrivileged;
        public boolean isPrivileged;


@@ -3340,12 +3343,14 @@ public class AppOpsManager {
         */
         */
        public boolean isRecordAudioRestrictionExcept;
        public boolean isRecordAudioRestrictionExcept;


        public RestrictionBypass(boolean isPrivileged, boolean isRecordAudioRestrictionExcept) {
        public RestrictionBypass(boolean isSystemUid, boolean isPrivileged,
                boolean isRecordAudioRestrictionExcept) {
            this.isSystemUid = isSystemUid;
            this.isPrivileged = isPrivileged;
            this.isPrivileged = isPrivileged;
            this.isRecordAudioRestrictionExcept = isRecordAudioRestrictionExcept;
            this.isRecordAudioRestrictionExcept = isRecordAudioRestrictionExcept;
        }
        }


        public static RestrictionBypass UNRESTRICTED = new RestrictionBypass(true, true);
        public static RestrictionBypass UNRESTRICTED = new RestrictionBypass(false, true, true);
    }
    }


    /**
    /**
+11 −10
Original line number Original line Diff line number Diff line
@@ -7770,10 +7770,11 @@ public class Notification implements Parcelable
     * user will always see the normal notification view.
     * user will always see the normal notification view.
     *
     *
     * <p>
     * <p>
     * If the app is targeting Android P and above, it is required to use the {@link Person}
     * If the app is targeting Android {@link android.os.Build.VERSION_CODES#P} and above, it is
     * class in order to get an optimal rendering of the notification and its avatars. For
     * required to use the {@link Person} class in order to get an optimal rendering of the
     * conversations involving multiple people, the app should also make sure that it marks the
     * notification and its avatars. For conversations involving multiple people, the app should
     * conversation as a group with {@link #setGroupConversation(boolean)}.
     * also make sure that it marks the conversation as a group with
     * {@link #setGroupConversation(boolean)}.
     *
     *
     * <p>
     * <p>
     * This class is a "rebuilder": It attaches to a Builder object and modifies its behavior.
     * This class is a "rebuilder": It attaches to a Builder object and modifies its behavior.
@@ -7846,8 +7847,8 @@ public class Notification implements Parcelable
         * @param user Required - The person displayed for any messages that are sent by the
         * @param user Required - The person displayed for any messages that are sent by the
         * user. Any messages added with {@link #addMessage(Notification.MessagingStyle.Message)}
         * user. Any messages added with {@link #addMessage(Notification.MessagingStyle.Message)}
         * who don't have a Person associated with it will be displayed as if they were sent
         * who don't have a Person associated with it will be displayed as if they were sent
         * by this user. The user also needs to have a valid name associated with it, which will
         * by this user. The user also needs to have a valid name associated with it, which is
         * be enforced starting in Android P.
         * enforced starting in Android {@link android.os.Build.VERSION_CODES#P}.
         */
         */
        public MessagingStyle(@NonNull Person user) {
        public MessagingStyle(@NonNull Person user) {
            mUser = user;
            mUser = user;
@@ -7904,9 +7905,9 @@ public class Notification implements Parcelable
        /**
        /**
         * Sets the title to be displayed on this conversation. May be set to {@code null}.
         * Sets the title to be displayed on this conversation. May be set to {@code null}.
         *
         *
         * <p>Starting in {@link Build.VERSION_CODES#R, this conversation title will be ignored if a
         * <p>Starting in {@link Build.VERSION_CODES#R}, this conversation title will be ignored
         * valid shortcutId is added via {@link Notification.Builder#setShortcutId(String)}. In this
         * if a valid shortcutId is added via {@link Notification.Builder#setShortcutId(String)}.
         * case, {@link ShortcutInfo#getLongLabel()} (or, if missing,
         * In this case, {@link ShortcutInfo#getLongLabel()} (or, if missing,
         * {@link ShortcutInfo#getShortLabel()}) will be shown as the conversation title
         * {@link ShortcutInfo#getShortLabel()}) will be shown as the conversation title
         * instead.
         * instead.
         *
         *
@@ -8065,7 +8066,7 @@ public class Notification implements Parcelable
        }
        }
        /**
        /**
         * Gets the list of {@code Message} objects that represent the notification
         * Gets the list of {@code Message} objects that represent the notification.
         */
         */
        public List<Message> getMessages() {
        public List<Message> getMessages() {
            return mMessages;
            return mMessages;
+7 −6
Original line number Original line Diff line number Diff line
@@ -1811,10 +1811,6 @@ public class DevicePolicyManager {
     * #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
     * #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
     * #PROVISIONING_MODE_MANAGED_PROFILE} and {@link #PROVISIONING_MODE_FULLY_MANAGED_DEVICE}.
     * #PROVISIONING_MODE_MANAGED_PROFILE} and {@link #PROVISIONING_MODE_FULLY_MANAGED_DEVICE}.
     *
     *
     * <p>Also, if this flag is set, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity
     * will not receive the {@link #EXTRA_PROVISIONING_IMEI} and {@link
     * #EXTRA_PROVISIONING_SERIAL_NUMBER} extras.
     *
     * <p>This flag can be combined with {@link #FLAG_SUPPORTED_MODES_PERSONALLY_OWNED}. In
     * <p>This flag can be combined with {@link #FLAG_SUPPORTED_MODES_PERSONALLY_OWNED}. In
     * that case, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity will have
     * that case, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity will have
     * the {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
     * the {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
@@ -1834,6 +1830,10 @@ public class DevicePolicyManager {
     * activity to have the {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra
     * activity to have the {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra
     * contain only {@link #PROVISIONING_MODE_MANAGED_PROFILE}.
     * contain only {@link #PROVISIONING_MODE_MANAGED_PROFILE}.
     *
     *
     * <p>Also, if this flag is set, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity
     * will not receive the {@link #EXTRA_PROVISIONING_IMEI} and {@link
     * #EXTRA_PROVISIONING_SERIAL_NUMBER} extras.
     *
     * <p>This flag can be combined with {@link #FLAG_SUPPORTED_MODES_ORGANIZATION_OWNED}. In
     * <p>This flag can be combined with {@link #FLAG_SUPPORTED_MODES_ORGANIZATION_OWNED}. In
     * that case, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity will have the
     * that case, the admin app's {@link #ACTION_GET_PROVISIONING_MODE} activity will have the
     * {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
     * {@link #EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES} array extra contain {@link
@@ -13249,8 +13249,9 @@ public class DevicePolicyManager {
     * Called by a device owner, profile owner of a managed profile or delegated app with
     * Called by a device owner, profile owner of a managed profile or delegated app with
     * {@link #DELEGATION_NETWORK_LOGGING} to control the network logging feature.
     * {@link #DELEGATION_NETWORK_LOGGING} to control the network logging feature.
     *
     *
     * <p> When network logging is enabled by a profile owner, the network logs will only include
     * <p> Supported for a device owner from Android 8. Supported for a profile owner of a managed
     * work profile network activity, not activity on the personal profile.
     * profile from Android 12. When network logging is enabled by a profile owner, the network logs
     * will only include work profile network activity, not activity on the personal profile.
     *
     *
     * <p> Network logs contain DNS lookup and connect() library call events. The following library
     * <p> Network logs contain DNS lookup and connect() library call events. The following library
     *     functions are recorded while network logging is active:
     *     functions are recorded while network logging is active:
+17 −0
Original line number Original line Diff line number Diff line
@@ -2752,4 +2752,21 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
            mKnownActivityEmbeddingCerts.add(knownCert.toUpperCase(Locale.US));
            mKnownActivityEmbeddingCerts.add(knownCert.toUpperCase(Locale.US));
        }
        }
    }
    }

    /**
     * Sets whether the application will use the {@link android.window.OnBackInvokedCallback}
     * navigation system instead of the {@link android.view.KeyEvent#KEYCODE_BACK} and related
     * callbacks. Intended to be used from tests only.
     *
     * @see #isOnBackInvokedCallbackEnabled()
     * @hide
     */
    @TestApi
    public void setEnableOnBackInvokedCallback(boolean isEnable) {
        if (isEnable) {
            privateFlagsExt |= PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK;
        } else {
            privateFlagsExt &= ~PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK;
        }
    }
}
}
Loading