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

Commit f288907d authored by Nicolas Prevot's avatar Nicolas Prevot Committed by Android Git Automerger
Browse files

am 4bb6ae67: Merge "Fixing a NullPointerException in isProfileOwnerApp." into lmp-dev

* commit '4bb6ae67b08ad4d0d508c269e97ae4d1c7be0e79':
  Fixing a NullPointerException in isProfileOwnerApp.
parents fa00735f 4d4920ad
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2296,9 +2296,10 @@ public class DevicePolicyManager {
    public boolean isProfileOwnerApp(String packageName) {
        if (mService != null) {
            try {
                String profileOwnerPackage = mService.getProfileOwner(
                        Process.myUserHandle().getIdentifier()).getPackageName();
                return profileOwnerPackage != null && profileOwnerPackage.equals(packageName);
                ComponentName profileOwner = mService.getProfileOwner(
                        Process.myUserHandle().getIdentifier());
                return profileOwner != null
                        && profileOwner.getPackageName().equals(packageName);
            } catch (RemoteException re) {
                Log.w(TAG, "Failed to check profile owner");
            }