diff options
| author | Amith Yamasani <yamasani@google.com> | 2012-02-16 14:31:23 -0800 |
|---|---|---|
| committer | Amith Yamasani <yamasani@google.com> | 2012-02-16 15:03:42 -0800 |
| commit | 67cf7d314b5b94db1a9f1c57140b6615b0ea8291 (patch) | |
| tree | 2de67be8b686a2909a93f2aca89ec7e2328597bc /core/java/android/app/ContextImpl.java | |
| parent | 8181201c6e55765fd58d2ff07921a143b879edd9 (diff) | |
Fix Power Control widget
Some changes in AppWidgetService were interfering with widget permissions.
Added some hidden methods in Context to communicate the requesting user
information instead of using the calling uid.
Bug: 6019296
Change-Id: I5e519fd3fbbfa5b3fcc5c297b729c671dac8e7c7
Diffstat (limited to 'core/java/android/app/ContextImpl.java')
| -rw-r--r-- | core/java/android/app/ContextImpl.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index ebf692a99080..6d5cce5efdc3 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -911,6 +911,19 @@ class ContextImpl extends Context { } } + /** @hide */ + @Override + public void sendBroadcast(Intent intent, int userId) { + String resolvedType = intent.resolveTypeIfNeeded(getContentResolver()); + try { + intent.setAllowFds(false); + ActivityManagerNative.getDefault().broadcastIntent(mMainThread.getApplicationThread(), + intent, resolvedType, null, Activity.RESULT_OK, null, null, null, false, false, + userId); + } catch (RemoteException e) { + } + } + @Override public void sendBroadcast(Intent intent, String receiverPermission) { String resolvedType = intent.resolveTypeIfNeeded(getContentResolver()); |
