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

Commit d9651d3c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7066328 from e8bd5284 to rvc-qpr3-release

Change-Id: I958a753b9b2d6a20174b2688ab28c10b87c5e6e3
parents 6bcc71b1 e8bd5284
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7000,7 +7000,7 @@ public class DevicePolicyManager {
        throwIfParentInstance("isProfileOwnerApp");
        if (mService != null) {
            try {
                ComponentName profileOwner = mService.getProfileOwner(myUserId());
                ComponentName profileOwner = mService.getProfileOwnerAsUser(myUserId());
                return profileOwner != null
                        && profileOwner.getPackageName().equals(packageName);
            } catch (RemoteException re) {
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.app.admin;

import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.content.ComponentName;
import android.content.Intent;
@@ -221,6 +222,7 @@ public abstract class DevicePolicyManagerInternal {
    /**
     * Returns the profile owner component for the given user, or {@code null} if there is not one.
     */
    @Nullable
    public abstract ComponentName getProfileOwnerAsUser(int userHandle);

    /**
@@ -234,4 +236,9 @@ public abstract class DevicePolicyManagerInternal {
     * {@link #supportsResetOp(int)} is true.
     */
    public abstract void resetOp(int op, String packageName, @UserIdInt int userId);

    /**
     * Returns whether the given package is a device owner or a profile owner in the calling user.
     */
    public abstract boolean isDeviceOrProfileOwnerInCallingUser(String packageName);
}
+0 −1
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@ interface IDevicePolicyManager {

    boolean setProfileOwner(in ComponentName who, String ownerName, int userHandle);
    ComponentName getProfileOwnerAsUser(int userHandle);
    ComponentName getProfileOwner(int userHandle);
    ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(in UserHandle userHandle);
    String getProfileOwnerName(int userHandle);
    void setProfileEnabled(in ComponentName who);
+7 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.database.Cursor;
import android.database.DatabaseUtils;
import android.net.Uri;
import android.os.RemoteException;
import android.os.StrictMode;
import android.text.format.DateUtils;
import android.text.format.TimeMigrationUtils;
import android.util.Log;
@@ -2618,7 +2619,13 @@ public final class CalendarContract {
            intent.setData(ContentUris.withAppendedId(CalendarContract.CONTENT_URI, alarmTime));
            intent.putExtra(ALARM_TIME, alarmTime);
            intent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);

            // Disable strict mode VM policy violations temporarily for intents that contain a
            // content URI but don't have FLAG_GRANT_READ_URI_PERMISSION.
            StrictMode.VmPolicy oldVmPolicy = StrictMode.allowVmViolations();
            PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, 0);
            StrictMode.setVmPolicy(oldVmPolicy);

            manager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmTime, pi);
        }

+11 −4
Original line number Diff line number Diff line
@@ -113,13 +113,20 @@ public class InsetsSourceConsumer {
                    InsetsState.typeToString(control.getType()),
                    mController.getHost().getRootViewTitle()));
        }
        // We are loosing control
        if (mSourceControl == null) {
            // We are loosing control
            mController.notifyControlRevoked(this);

            // Restore server visibility.
            mState.getSource(getType()).setVisible(
                    mController.getLastDispatchedState().getSource(getType()).isVisible());
            // Check if we need to restore server visibility.
            final InsetsSource source = mState.getSource(mType);
            final boolean serverVisibility =
                    mController.getLastDispatchedState().getSourceOrDefaultVisibility(mType);
            if (source.isVisible() != serverVisibility) {
                source.setVisible(serverVisibility);
                mController.notifyVisibilityChanged();
            }

            // For updateCompatSysUiVisibility
            applyLocalVisibilityOverride();
        } else {
            // We are gaining control, and need to run an animation since previous state
Loading