Skip to content

Commit 6b58fde

Browse files
Christopher TateAndroid (Google) Code Review
authored andcommitted
Merge "Settings provider needs to send notifications as itself" into jb-mr1-dev
2 parents 63bcc14 + c8459dc commit 6b58fde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,12 @@ private void sendNotify(Uri uri, int userHandle) {
344344
String notify = uri.getQueryParameter("notify");
345345
if (notify == null || "true".equals(notify)) {
346346
final int notifyTarget = isGlobal ? UserHandle.USER_ALL : userHandle;
347-
getContext().getContentResolver().notifyChange(uri, null, true, notifyTarget);
347+
final long oldId = Binder.clearCallingIdentity();
348+
try {
349+
getContext().getContentResolver().notifyChange(uri, null, true, notifyTarget);
350+
} finally {
351+
Binder.restoreCallingIdentity(oldId);
352+
}
348353
if (LOCAL_LOGV) Log.v(TAG, "notifying for " + notifyTarget + ": " + uri);
349354
} else {
350355
if (LOCAL_LOGV) Log.v(TAG, "notification suppressed: " + uri);

0 commit comments

Comments
 (0)