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

Commit 8a75d871 authored by Nicolas Prevot's avatar Nicolas Prevot Committed by android-build-merger
Browse files

Merge "Call notifyLockedProfile in TrustManagerService instead of...

Merge "Call notifyLockedProfile in TrustManagerService instead of KeyguardViewMediator." into nyc-dev
am: 428fdd10

* commit '428fdd10':
  Call notifyLockedProfile in TrustManagerService instead of KeyguardViewMediator.

Change-Id: I34078f980125dd4d170c553dbc84e90d2b910243
parents c8a0754b 428fdd10
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1215,7 +1215,6 @@ public class KeyguardViewMediator extends SystemUI {

    private void lockProfile(int userId) {
        mTrustManager.setDeviceLockedForUser(userId, true);
        notifyLockedProfile(userId);
    }

    private boolean shouldWaitForProvisioning() {
@@ -1546,13 +1545,6 @@ public class KeyguardViewMediator extends SystemUI {
        }
    }

    private void notifyLockedProfile(@UserIdInt int userId) {
        try {
            ActivityManagerNative.getDefault().notifyLockedProfile(userId);
        } catch (RemoteException e) {
        }
    }

    /**
     * Handle message sent by {@link #showLocked}.
     * @see #SHOW
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import org.xmlpull.v1.XmlPullParserException;

import android.Manifest;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.admin.DevicePolicyManager;
import android.app.trust.ITrustListener;
import android.app.trust.ITrustManager;
@@ -318,6 +319,12 @@ public class TrustManagerService extends SystemService {
            synchronized (mDeviceLockedForUser) {
                mDeviceLockedForUser.put(userId, locked);
            }
            if (locked) {
                try {
                    ActivityManagerNative.getDefault().notifyLockedProfile(userId);
                } catch (RemoteException e) {
                }
            }
        }
    }