Skip to content

Commit 3c1a201

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "Fix DevicePolicyManager crash when settings password quality (and possibly others)." into jb-mr1-dev
2 parents 753e128 + b7a6859 commit 3c1a201

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/java/com/android/server/DevicePolicyManagerService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,13 @@ private void saveSettingsLocked() {
721721
private void sendChangedNotification() {
722722
Intent intent = new Intent(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
723723
intent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
724-
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
724+
long ident = Binder.clearCallingIdentity();
725+
try {
726+
// TODO: This shouldn't be sent to all users, if DPM is per user.
727+
mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
728+
} finally {
729+
Binder.restoreCallingIdentity(ident);
730+
}
725731
}
726732

727733
private void loadSettingsLocked() {

0 commit comments

Comments
 (0)