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

Commit 3e199be0 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker Committed by Justin Dunlap
Browse files

Merge cherrypicks of [16564590, 17185256, 17045726, 17343925, 17400663,...

Merge cherrypicks of [16564590, 17185256, 17045726, 17343925, 17400663, 17591189, 17587088, 16908080] into security-aosp-qt-release.

Change-Id: I035ab01d3459142878a8f76cd0255e618864d76e
parents 8ec6a0da 1f7e6c10
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