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

Unverified Commit a6ec2144 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-10.0.0_r67' of...

Merge tag 'android-security-10.0.0_r67' of https://android.googlesource.com/platform/frameworks/base into staging/lineage-17.1_merge_android-security-10.0.0_r67

Android Security 10.0.0 Release 67 (8528209)

* tag 'android-security-10.0.0_r67' of https://android.googlesource.com/platform/frameworks/base:
  limit TelecomManager#registerPhoneAccount to 10; api doc update
  [qt] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning.
  Fix NPE
  RESTRICT AUTOMERGE Prevent non-admin users from deleting system apps.
  Fix security hole in GateKeeperResponse
  DO NOT MERGE Add an OEM configurable limit for zen rules
  Update GeofenceHardwareRequestParcelable to match parcel/unparcel format.

Change-Id: I88cb98455b5f94ac97ecc5baa552e675d12345fe
parents 9d930f99 3e199be0
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.app.admin;
import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;

import android.Manifest.permission;
import android.accounts.Account;
import android.annotation.CallbackExecutor;
import android.annotation.ColorInt;
import android.annotation.IntDef;
@@ -151,6 +152,26 @@ public class DevicePolicyManager {
        this(context, service, false);
    }

    /**
     * Called when a managed profile has been provisioned.
     *
     * @throws SecurityException if the caller does not hold
     * {@link android.Manifest.permission#MANAGE_PROFILE_AND_DEVICE_OWNERS}.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)
    public void finalizeWorkProfileProvisioning(
            @NonNull UserHandle managedProfileUser, @Nullable Account migratedAccount) {
        if (mService == null) {
            throw new IllegalStateException("Could not find DevicePolicyManagerService");
        }
        try {
            mService.finalizeWorkProfileProvisioning(managedProfileUser, migratedAccount);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /** @hide */
    @VisibleForTesting
    protected DevicePolicyManager(Context context, IDevicePolicyManager service,
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

package android.app.admin;

import android.accounts.Account;
import android.app.admin.NetworkEvent;
import android.app.IApplicationThread;
import android.app.IServiceConnection;
@@ -87,6 +88,8 @@ interface IDevicePolicyManager {
    int getCurrentFailedPasswordAttempts(int userHandle, boolean parent);
    int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent);

    void finalizeWorkProfileProvisioning(in UserHandle managedProfileUser, in Account migratedAccount);

    void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent);
    int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent);

+3 −6
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

package android.hardware.location;

import android.os.BadParcelableException;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

/**
 * Geofence Hardware Request used for internal location services communication.
@@ -140,10 +140,7 @@ public final class GeofenceHardwareRequestParcelable implements Parcelable {
        public GeofenceHardwareRequestParcelable createFromParcel(Parcel parcel) {
            int geofenceType = parcel.readInt();
            if (geofenceType != GeofenceHardwareRequest.GEOFENCE_TYPE_CIRCLE) {
                Log.e(
                        "GeofenceHardwareRequest",
                        String.format("Invalid Geofence type: %d", geofenceType));
                return null;
                throw new BadParcelableException("Invalid Geofence type: " + geofenceType);
            }

            GeofenceHardwareRequest request = GeofenceHardwareRequest.createCircularGeofence(
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public final class GateKeeperResponse implements Parcelable {
            dest.writeInt(mTimeout);
        } else if (mResponseCode == RESPONSE_OK) {
            dest.writeInt(mShouldReEnroll ? 1 : 0);
            if (mPayload != null) {
            if (mPayload != null && mPayload.length > 0) {
                dest.writeInt(mPayload.length);
                dest.writeByteArray(mPayload);
            } else {
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
    <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_SUSPENDED" />
    <protected-broadcast android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" />
    <protected-broadcast android:name="android.app.action.MANAGED_PROFILE_PROVISIONED" />

    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
Loading