Merge "ClientTransaction: don't transport IApplicationThread."
This commit is contained in:
committed by
Android (Google) Code Review
commit
9c8a7fd66e
@@ -176,7 +176,6 @@ public class ClientTransaction implements Parcelable, ObjectPoolItem {
|
||||
/** Write to Parcel. */
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeStrongBinder(mClient.asBinder());
|
||||
final boolean writeActivityToken = mActivityToken != null;
|
||||
dest.writeBoolean(writeActivityToken);
|
||||
if (writeActivityToken) {
|
||||
@@ -192,7 +191,6 @@ public class ClientTransaction implements Parcelable, ObjectPoolItem {
|
||||
|
||||
/** Read from Parcel. */
|
||||
private ClientTransaction(Parcel in) {
|
||||
mClient = (IApplicationThread) in.readStrongBinder();
|
||||
final boolean readActivityToken = in.readBoolean();
|
||||
if (readActivityToken) {
|
||||
mActivityToken = in.readStrongBinder();
|
||||
|
||||
@@ -294,10 +294,9 @@ public class TransactionParcelTests {
|
||||
|
||||
StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
|
||||
|
||||
IApplicationThread appThread = new StubAppThread();
|
||||
Binder activityToken = new Binder();
|
||||
|
||||
ClientTransaction transaction = ClientTransaction.obtain(appThread, activityToken);
|
||||
ClientTransaction transaction = ClientTransaction.obtain(null, activityToken);
|
||||
transaction.addCallback(callback1);
|
||||
transaction.addCallback(callback2);
|
||||
transaction.setLifecycleStateRequest(lifecycleRequest);
|
||||
@@ -318,10 +317,9 @@ public class TransactionParcelTests {
|
||||
ActivityConfigurationChangeItem callback2 = ActivityConfigurationChangeItem.obtain(
|
||||
config());
|
||||
|
||||
IApplicationThread appThread = new StubAppThread();
|
||||
Binder activityToken = new Binder();
|
||||
|
||||
ClientTransaction transaction = ClientTransaction.obtain(appThread, activityToken);
|
||||
ClientTransaction transaction = ClientTransaction.obtain(null, activityToken);
|
||||
transaction.addCallback(callback1);
|
||||
transaction.addCallback(callback2);
|
||||
|
||||
@@ -339,10 +337,9 @@ public class TransactionParcelTests {
|
||||
// Write to parcel
|
||||
StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
|
||||
|
||||
IApplicationThread appThread = new StubAppThread();
|
||||
Binder activityToken = new Binder();
|
||||
|
||||
ClientTransaction transaction = ClientTransaction.obtain(appThread, activityToken);
|
||||
ClientTransaction transaction = ClientTransaction.obtain(null, activityToken);
|
||||
transaction.setLifecycleStateRequest(lifecycleRequest);
|
||||
|
||||
writeAndPrepareForReading(transaction);
|
||||
@@ -400,286 +397,4 @@ public class TransactionParcelTests {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** Stub implementation of IApplicationThread that can be presented as {@link Binder}. */
|
||||
class StubAppThread extends android.app.IApplicationThread.Stub {
|
||||
|
||||
@Override
|
||||
public void scheduleTransaction(ClientTransaction transaction) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleReceiver(Intent intent, ActivityInfo activityInfo,
|
||||
CompatibilityInfo compatibilityInfo, int i, String s, Bundle bundle, boolean b,
|
||||
int i1, int i2) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleCreateService(IBinder iBinder, ServiceInfo serviceInfo,
|
||||
CompatibilityInfo compatibilityInfo, int i) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleStopService(IBinder iBinder) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindApplication(String s, ApplicationInfo applicationInfo,
|
||||
String sdkSandboxClientAppVolumeUuid, String sdkSandboxClientAppPackage,
|
||||
ProviderInfoList list, ComponentName componentName, ProfilerInfo profilerInfo,
|
||||
Bundle bundle, IInstrumentationWatcher iInstrumentationWatcher,
|
||||
IUiAutomationConnection iUiAutomationConnection, int i, boolean b, boolean b1,
|
||||
boolean b2, boolean b3, Configuration configuration,
|
||||
CompatibilityInfo compatibilityInfo, Map map, Bundle bundle1, String s1,
|
||||
AutofillOptions ao, ContentCaptureOptions co, long[] disableCompatChanges,
|
||||
SharedMemory serializedSystemFontMap,
|
||||
long startRequestedElapsedTime, long startRequestedUptime)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleExit() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleServiceArgs(IBinder iBinder, ParceledListSlice parceledListSlice)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTimeZone() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processInBackground() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleBindService(IBinder iBinder, Intent intent, boolean b, int i)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleUnbindService(IBinder iBinder, Intent intent) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpService(ParcelFileDescriptor parcelFileDescriptor, IBinder iBinder,
|
||||
String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleRegisteredReceiver(IIntentReceiver iIntentReceiver, Intent intent,
|
||||
int i, String s, Bundle bundle, boolean b, boolean b1, int i1, int i2)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleLowMemory() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void profilerControl(boolean b, ProfilerInfo profilerInfo, int i)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSchedulingGroup(int i) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleCreateBackupAgent(ApplicationInfo applicationInfo,
|
||||
int i, int userId, int operatioType)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleDestroyBackupAgent(ApplicationInfo applicationInfo,
|
||||
int userId) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleOnNewActivityOptions(IBinder iBinder, Bundle bundle)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleSuicide() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchPackageBroadcast(int i, String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleCrash(String s, int i, Bundle extras) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpActivity(ParcelFileDescriptor parcelFileDescriptor, IBinder iBinder,
|
||||
String s, String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearDnsCache() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateHttpProxy() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCoreSettings(Bundle bundle) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePackageCompatibilityInfo(String s, CompatibilityInfo compatibilityInfo)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleTrimMemory(int i) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpMemInfo(ParcelFileDescriptor parcelFileDescriptor,
|
||||
Debug.MemoryInfo memoryInfo, boolean b, boolean b1, boolean b2, boolean b3,
|
||||
boolean b4, String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpMemInfoProto(ParcelFileDescriptor parcelFileDescriptor,
|
||||
Debug.MemoryInfo memoryInfo, boolean b, boolean b1, boolean b2,
|
||||
boolean b3, String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpGfxInfo(ParcelFileDescriptor parcelFileDescriptor, String[] strings)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpCacheInfo(ParcelFileDescriptor parcelFileDescriptor, String[] strings)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpProvider(ParcelFileDescriptor parcelFileDescriptor, IBinder iBinder,
|
||||
String[] strings) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpDbInfo(ParcelFileDescriptor parcelFileDescriptor, String[] strings)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unstableProviderDied(IBinder iBinder) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestAssistContextExtras(IBinder iBinder, IBinder iBinder1, int i, int i1,
|
||||
int i2) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleTranslucentConversionComplete(IBinder iBinder, boolean b)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProcessState(int i) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleInstallProvider(ProviderInfo providerInfo) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTimePrefs(int i) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleEnterAnimationComplete(IBinder iBinder) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyCleartextNetwork(byte[] bytes) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startBinderTracking() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopBinderTrackingAndDump(ParcelFileDescriptor parcelFileDescriptor)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleLocalVoiceInteractionStarted(IBinder iBinder,
|
||||
IVoiceInteractor iVoiceInteractor) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTrustStorageUpdate() throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachAgent(String s) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachStartupAgents(String s) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleApplicationInfoChanged(ApplicationInfo applicationInfo)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetworkBlockSeq(long l) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpHeap(boolean managed, boolean mallocInfo, boolean runGc, String path,
|
||||
ParcelFileDescriptor fd, RemoteCallback finishCallback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpResources(ParcelFileDescriptor fd, RemoteCallback finishCallback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void runIsolatedEntryPoint(String entryPoint, String[] entryPointArgs) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestDirectActions(IBinder activityToken, IVoiceInteractor interactor,
|
||||
RemoteCallback cancellationCallback, RemoteCallback resultCallback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performDirectAction(IBinder activityToken, String actionId, Bundle arguments,
|
||||
RemoteCallback cancellationCallback, RemoteCallback resultCallback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyContentProviderPublishStatus(ContentProviderHolder holder, String auth,
|
||||
int userId, boolean published) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void instrumentWithoutRestart(ComponentName instrumentationName,
|
||||
Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher,
|
||||
IUiAutomationConnection instrumentationUiConnection, ApplicationInfo targetInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUiTranslationState(IBinder activityToken, int state,
|
||||
TranslationSpec sourceSpec, TranslationSpec targetSpec, List<AutofillId> viewIds,
|
||||
UiTranslationSpec uiTranslationSpec) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user