File tree Expand file tree Collapse file tree
services/core/java/com/android/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -740,15 +740,20 @@ private void handleSystemReady() {
740740 */
741741 @ Deprecated
742742 private void killMediaProvider () {
743- final ProviderInfo provider = mPms .resolveContentProvider (MediaStore .AUTHORITY , 0 ,
744- UserHandle .USER_OWNER );
745- if (provider != null ) {
746- final IActivityManager am = ActivityManagerNative .getDefault ();
747- try {
748- am .killApplicationWithAppId (provider .applicationInfo .packageName ,
749- UserHandle .getAppId (provider .applicationInfo .uid ), "vold reset" );
750- } catch (RemoteException e ) {
743+ final long token = Binder .clearCallingIdentity ();
744+ try {
745+ final ProviderInfo provider = mPms .resolveContentProvider (MediaStore .AUTHORITY , 0 ,
746+ UserHandle .USER_OWNER );
747+ if (provider != null ) {
748+ final IActivityManager am = ActivityManagerNative .getDefault ();
749+ try {
750+ am .killApplicationWithAppId (provider .applicationInfo .packageName ,
751+ UserHandle .getAppId (provider .applicationInfo .uid ), "vold reset" );
752+ } catch (RemoteException e ) {
753+ }
751754 }
755+ } finally {
756+ Binder .restoreCallingIdentity (token );
752757 }
753758 }
754759
You can’t perform that action at this time.
0 commit comments