Merge "Clear calling identify b4 Beam callback." into mnc-dr1.5-dev

This commit is contained in:
Martijn Coenen
2015-12-23 08:22:21 +00:00
committed by Android (Google) Code Review

View File

@@ -371,7 +371,8 @@ public final class NfcActivityManager extends IAppCallback.Stub
flags = state.flags; flags = state.flags;
activity = state.activity; activity = state.activity;
} }
final long ident = Binder.clearCallingIdentity();
try {
// Make callbacks without lock // Make callbacks without lock
if (ndefCallback != null) { if (ndefCallback != null) {
message = ndefCallback.createNdefMessage(event); message = ndefCallback.createNdefMessage(event);
@@ -406,6 +407,9 @@ public final class NfcActivityManager extends IAppCallback.Stub
Intent.FLAG_GRANT_READ_URI_PERMISSION); Intent.FLAG_GRANT_READ_URI_PERMISSION);
} }
} }
} finally {
Binder.restoreCallingIdentity(ident);
}
return new BeamShareData(message, uris, new UserHandle(UserHandle.myUserId()), flags); return new BeamShareData(message, uris, new UserHandle(UserHandle.myUserId()), flags);
} }