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

Commit e52807d3 authored by Rubin Xu's avatar Rubin Xu Committed by Android Git Automerger
Browse files

am 6e1c17a3: Merge "clear caller identify before sending system update notification" into mnc-dev

* commit '6e1c17a3':
  clear caller identify before sending system update notification
parents 87d3e2f4 6e1c17a3
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -6345,10 +6345,16 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                return;
            }

            ActivityInfo[] receivers = null;
            try {
                ActivityInfo[] receivers  = mContext.getPackageManager().getPackageInfo(
                receivers  = mContext.getPackageManager().getPackageInfo(
                        deviceOwnerPackage, PackageManager.GET_RECEIVERS).receivers;
            } catch (NameNotFoundException e) {
                Log.e(LOG_TAG, "Cannot find device owner package", e);
            }
            if (receivers != null) {
                long ident = Binder.clearCallingIdentity();
                try {
                    for (int i = 0; i < receivers.length; i++) {
                        if (permission.BIND_DEVICE_ADMIN.equals(receivers[i].permission)) {
                            intent.setComponent(new ComponentName(deviceOwnerPackage,
@@ -6356,9 +6362,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                            mContext.sendBroadcastAsUser(intent, UserHandle.OWNER);
                        }
                    }
                } finally {
                    Binder.restoreCallingIdentity(ident);
                }
            } catch (NameNotFoundException e) {
                Log.e(LOG_TAG, "Cannot find device owner package", e);
            }
        }
    }