Move Binder.clearCallingIdentity
Move the clearCallingIdentity call outside the executor Change-Id: Ic87c2f8e2b1874bd4405b25b1682b5b1a7d900cb Fixes: 117794412 Test: CTS
This commit is contained in:
@@ -43,18 +43,18 @@ public class InternalDownloadProgressListener extends IDownloadProgressListener.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppListener.onProgressUpdated(request, fileInfo, currentDownloadSize,
|
||||
fullDownloadSize, currentDecodedSize, fullDecodedSize);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
@@ -40,17 +40,17 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onError(errorCode, message);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,17 +59,17 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onFileServicesUpdated(services);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,17 +78,17 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onMiddlewareReady();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
@@ -42,17 +42,17 @@ public class InternalDownloadStatusListener extends IDownloadStatusListener.Stub
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppListener.onStatusUpdated(request, fileInfo, status);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
@@ -38,17 +38,17 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onError(errorCode, message);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,17 +57,17 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onGroupCallStateChanged(state, reason);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,17 +76,17 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onBroadcastSignalStrengthUpdated(signalStrength);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
/** Prevents this callback from calling the app */
|
||||
|
||||
@@ -39,17 +39,17 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onError(errorCode, message);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,17 +58,17 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onAvailableSaisUpdated(currentSais, availableSais);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,17 +77,17 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onServiceInterfaceAvailable(interfaceName, index);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,17 +96,17 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onMiddlewareReady();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
/** Prevents this callback from calling the app */
|
||||
|
||||
@@ -39,17 +39,17 @@ public class InternalStreamingServiceCallback extends IStreamingServiceCallback.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onError(errorCode, message);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,17 +58,17 @@ public class InternalStreamingServiceCallback extends IStreamingServiceCallback.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onStreamStateUpdated(state, reason);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,17 +77,17 @@ public class InternalStreamingServiceCallback extends IStreamingServiceCallback.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onMediaDescriptionUpdated();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,17 +96,17 @@ public class InternalStreamingServiceCallback extends IStreamingServiceCallback.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onBroadcastSignalStrengthUpdated(signalStrength);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,17 +115,17 @@ public class InternalStreamingServiceCallback extends IStreamingServiceCallback.
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onStreamMethodUpdated(methodType);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
@@ -40,17 +40,17 @@ public class InternalStreamingSessionCallback extends IMbmsStreamingSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onError(errorCode, message);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,17 +60,17 @@ public class InternalStreamingSessionCallback extends IMbmsStreamingSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onStreamingServicesUpdated(services);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,17 +79,17 @@ public class InternalStreamingSessionCallback extends IMbmsStreamingSessionCallb
|
||||
return;
|
||||
}
|
||||
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mAppCallback.onMiddlewareReady();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
|
||||
Reference in New Issue
Block a user