ApplicationThreadNative.java revision 64770d16b0907a8e1ee81ef6c8fa398a6bdbee79
1/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.app;
18
19import android.content.ComponentName;
20import android.content.Intent;
21import android.content.IIntentReceiver;
22import android.content.pm.ActivityInfo;
23import android.content.pm.ApplicationInfo;
24import android.content.pm.ProviderInfo;
25import android.content.pm.ServiceInfo;
26import android.content.res.CompatibilityInfo;
27import android.content.res.Configuration;
28import android.os.Binder;
29import android.os.Bundle;
30import android.os.Debug;
31import android.os.Parcelable;
32import android.os.RemoteException;
33import android.os.IBinder;
34import android.os.Parcel;
35import android.os.ParcelFileDescriptor;
36
37import java.io.FileDescriptor;
38import java.io.IOException;
39import java.util.HashMap;
40import java.util.List;
41import java.util.Map;
42
43/** {@hide} */
44public abstract class ApplicationThreadNative extends Binder
45        implements IApplicationThread {
46    /**
47     * Cast a Binder object into an application thread interface, generating
48     * a proxy if needed.
49     */
50    static public IApplicationThread asInterface(IBinder obj) {
51        if (obj == null) {
52            return null;
53        }
54        IApplicationThread in =
55            (IApplicationThread)obj.queryLocalInterface(descriptor);
56        if (in != null) {
57            return in;
58        }
59
60        return new ApplicationThreadProxy(obj);
61    }
62
63    public ApplicationThreadNative() {
64        attachInterface(this, descriptor);
65    }
66
67    @Override
68    public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
69            throws RemoteException {
70        switch (code) {
71        case SCHEDULE_PAUSE_ACTIVITY_TRANSACTION:
72        {
73            data.enforceInterface(IApplicationThread.descriptor);
74            IBinder b = data.readStrongBinder();
75            boolean finished = data.readInt() != 0;
76            boolean userLeaving = data.readInt() != 0;
77            int configChanges = data.readInt();
78            schedulePauseActivity(b, finished, userLeaving, configChanges);
79            return true;
80        }
81
82        case SCHEDULE_STOP_ACTIVITY_TRANSACTION:
83        {
84            data.enforceInterface(IApplicationThread.descriptor);
85            IBinder b = data.readStrongBinder();
86            boolean show = data.readInt() != 0;
87            int configChanges = data.readInt();
88            scheduleStopActivity(b, show, configChanges);
89            return true;
90        }
91
92        case SCHEDULE_WINDOW_VISIBILITY_TRANSACTION:
93        {
94            data.enforceInterface(IApplicationThread.descriptor);
95            IBinder b = data.readStrongBinder();
96            boolean show = data.readInt() != 0;
97            scheduleWindowVisibility(b, show);
98            return true;
99        }
100
101        case SCHEDULE_SLEEPING_TRANSACTION:
102        {
103            data.enforceInterface(IApplicationThread.descriptor);
104            IBinder b = data.readStrongBinder();
105            boolean sleeping = data.readInt() != 0;
106            scheduleSleeping(b, sleeping);
107            return true;
108        }
109
110        case SCHEDULE_RESUME_ACTIVITY_TRANSACTION:
111        {
112            data.enforceInterface(IApplicationThread.descriptor);
113            IBinder b = data.readStrongBinder();
114            boolean isForward = data.readInt() != 0;
115            scheduleResumeActivity(b, isForward);
116            return true;
117        }
118
119        case SCHEDULE_SEND_RESULT_TRANSACTION:
120        {
121            data.enforceInterface(IApplicationThread.descriptor);
122            IBinder b = data.readStrongBinder();
123            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
124            scheduleSendResult(b, ri);
125            return true;
126        }
127
128        case SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION:
129        {
130            data.enforceInterface(IApplicationThread.descriptor);
131            Intent intent = Intent.CREATOR.createFromParcel(data);
132            IBinder b = data.readStrongBinder();
133            int ident = data.readInt();
134            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
135            Configuration curConfig = Configuration.CREATOR.createFromParcel(data);
136            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
137            Bundle state = data.readBundle();
138            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
139            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
140            boolean notResumed = data.readInt() != 0;
141            boolean isForward = data.readInt() != 0;
142            String profileName = data.readString();
143            ParcelFileDescriptor profileFd = data.readInt() != 0
144                    ? data.readFileDescriptor() : null;
145            boolean autoStopProfiler = data.readInt() != 0;
146            scheduleLaunchActivity(intent, b, ident, info, curConfig, compatInfo, state, ri, pi,
147                    notResumed, isForward, profileName, profileFd, autoStopProfiler);
148            return true;
149        }
150
151        case SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION:
152        {
153            data.enforceInterface(IApplicationThread.descriptor);
154            IBinder b = data.readStrongBinder();
155            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
156            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
157            int configChanges = data.readInt();
158            boolean notResumed = data.readInt() != 0;
159            Configuration config = null;
160            if (data.readInt() != 0) {
161                config = Configuration.CREATOR.createFromParcel(data);
162            }
163            scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed, config);
164            return true;
165        }
166
167        case SCHEDULE_NEW_INTENT_TRANSACTION:
168        {
169            data.enforceInterface(IApplicationThread.descriptor);
170            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
171            IBinder b = data.readStrongBinder();
172            scheduleNewIntent(pi, b);
173            return true;
174        }
175
176        case SCHEDULE_FINISH_ACTIVITY_TRANSACTION:
177        {
178            data.enforceInterface(IApplicationThread.descriptor);
179            IBinder b = data.readStrongBinder();
180            boolean finishing = data.readInt() != 0;
181            int configChanges = data.readInt();
182            scheduleDestroyActivity(b, finishing, configChanges);
183            return true;
184        }
185
186        case SCHEDULE_RECEIVER_TRANSACTION:
187        {
188            data.enforceInterface(IApplicationThread.descriptor);
189            Intent intent = Intent.CREATOR.createFromParcel(data);
190            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
191            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
192            int resultCode = data.readInt();
193            String resultData = data.readString();
194            Bundle resultExtras = data.readBundle();
195            boolean sync = data.readInt() != 0;
196            int sendingUser = data.readInt();
197            scheduleReceiver(intent, info, compatInfo, resultCode, resultData,
198                    resultExtras, sync, sendingUser);
199            return true;
200        }
201
202        case SCHEDULE_CREATE_SERVICE_TRANSACTION: {
203            data.enforceInterface(IApplicationThread.descriptor);
204            IBinder token = data.readStrongBinder();
205            ServiceInfo info = ServiceInfo.CREATOR.createFromParcel(data);
206            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
207            scheduleCreateService(token, info, compatInfo);
208            return true;
209        }
210
211        case SCHEDULE_BIND_SERVICE_TRANSACTION: {
212            data.enforceInterface(IApplicationThread.descriptor);
213            IBinder token = data.readStrongBinder();
214            Intent intent = Intent.CREATOR.createFromParcel(data);
215            boolean rebind = data.readInt() != 0;
216            scheduleBindService(token, intent, rebind);
217            return true;
218        }
219
220        case SCHEDULE_UNBIND_SERVICE_TRANSACTION: {
221            data.enforceInterface(IApplicationThread.descriptor);
222            IBinder token = data.readStrongBinder();
223            Intent intent = Intent.CREATOR.createFromParcel(data);
224            scheduleUnbindService(token, intent);
225            return true;
226        }
227
228        case SCHEDULE_SERVICE_ARGS_TRANSACTION:
229        {
230            data.enforceInterface(IApplicationThread.descriptor);
231            IBinder token = data.readStrongBinder();
232            boolean taskRemoved = data.readInt() != 0;
233            int startId = data.readInt();
234            int fl = data.readInt();
235            Intent args;
236            if (data.readInt() != 0) {
237                args = Intent.CREATOR.createFromParcel(data);
238            } else {
239                args = null;
240            }
241            scheduleServiceArgs(token, taskRemoved, startId, fl, args);
242            return true;
243        }
244
245        case SCHEDULE_STOP_SERVICE_TRANSACTION:
246        {
247            data.enforceInterface(IApplicationThread.descriptor);
248            IBinder token = data.readStrongBinder();
249            scheduleStopService(token);
250            return true;
251        }
252
253        case BIND_APPLICATION_TRANSACTION:
254        {
255            data.enforceInterface(IApplicationThread.descriptor);
256            String packageName = data.readString();
257            ApplicationInfo info =
258                ApplicationInfo.CREATOR.createFromParcel(data);
259            List<ProviderInfo> providers =
260                data.createTypedArrayList(ProviderInfo.CREATOR);
261            ComponentName testName = (data.readInt() != 0)
262                ? new ComponentName(data) : null;
263            String profileName = data.readString();
264            ParcelFileDescriptor profileFd = data.readInt() != 0
265                    ? data.readFileDescriptor() : null;
266            boolean autoStopProfiler = data.readInt() != 0;
267            Bundle testArgs = data.readBundle();
268            IBinder binder = data.readStrongBinder();
269            IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
270            binder = data.readStrongBinder();
271            IUiAutomationConnection uiAutomationConnection =
272                    IUiAutomationConnection.Stub.asInterface(binder);
273            int testMode = data.readInt();
274            boolean openGlTrace = data.readInt() != 0;
275            boolean restrictedBackupMode = (data.readInt() != 0);
276            boolean persistent = (data.readInt() != 0);
277            Configuration config = Configuration.CREATOR.createFromParcel(data);
278            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
279            HashMap<String, IBinder> services = data.readHashMap(null);
280            Bundle coreSettings = data.readBundle();
281            bindApplication(packageName, info,
282                            providers, testName, profileName, profileFd, autoStopProfiler,
283                            testArgs, testWatcher, uiAutomationConnection, testMode,
284                            openGlTrace, restrictedBackupMode, persistent, config, compatInfo,
285                            services, coreSettings);
286            return true;
287        }
288
289        case SCHEDULE_EXIT_TRANSACTION:
290        {
291            data.enforceInterface(IApplicationThread.descriptor);
292            scheduleExit();
293            return true;
294        }
295
296        case SCHEDULE_SUICIDE_TRANSACTION:
297        {
298            data.enforceInterface(IApplicationThread.descriptor);
299            scheduleSuicide();
300            return true;
301        }
302
303        case REQUEST_THUMBNAIL_TRANSACTION:
304        {
305            data.enforceInterface(IApplicationThread.descriptor);
306            IBinder b = data.readStrongBinder();
307            requestThumbnail(b);
308            return true;
309        }
310
311        case SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION:
312        {
313            data.enforceInterface(IApplicationThread.descriptor);
314            Configuration config = Configuration.CREATOR.createFromParcel(data);
315            scheduleConfigurationChanged(config);
316            return true;
317        }
318
319        case UPDATE_TIME_ZONE_TRANSACTION: {
320            data.enforceInterface(IApplicationThread.descriptor);
321            updateTimeZone();
322            return true;
323        }
324
325        case CLEAR_DNS_CACHE_TRANSACTION: {
326            data.enforceInterface(IApplicationThread.descriptor);
327            clearDnsCache();
328            return true;
329        }
330
331        case SET_HTTP_PROXY_TRANSACTION: {
332            data.enforceInterface(IApplicationThread.descriptor);
333            final String proxy = data.readString();
334            final String port = data.readString();
335            final String exclList = data.readString();
336            setHttpProxy(proxy, port, exclList);
337            return true;
338        }
339
340        case PROCESS_IN_BACKGROUND_TRANSACTION: {
341            data.enforceInterface(IApplicationThread.descriptor);
342            processInBackground();
343            return true;
344        }
345
346        case DUMP_SERVICE_TRANSACTION: {
347            data.enforceInterface(IApplicationThread.descriptor);
348            ParcelFileDescriptor fd = data.readFileDescriptor();
349            final IBinder service = data.readStrongBinder();
350            final String[] args = data.readStringArray();
351            if (fd != null) {
352                dumpService(fd.getFileDescriptor(), service, args);
353                try {
354                    fd.close();
355                } catch (IOException e) {
356                }
357            }
358            return true;
359        }
360
361        case DUMP_PROVIDER_TRANSACTION: {
362            data.enforceInterface(IApplicationThread.descriptor);
363            ParcelFileDescriptor fd = data.readFileDescriptor();
364            final IBinder service = data.readStrongBinder();
365            final String[] args = data.readStringArray();
366            if (fd != null) {
367                dumpProvider(fd.getFileDescriptor(), service, args);
368                try {
369                    fd.close();
370                } catch (IOException e) {
371                }
372            }
373            return true;
374        }
375
376        case SCHEDULE_REGISTERED_RECEIVER_TRANSACTION: {
377            data.enforceInterface(IApplicationThread.descriptor);
378            IIntentReceiver receiver = IIntentReceiver.Stub.asInterface(
379                    data.readStrongBinder());
380            Intent intent = Intent.CREATOR.createFromParcel(data);
381            int resultCode = data.readInt();
382            String dataStr = data.readString();
383            Bundle extras = data.readBundle();
384            boolean ordered = data.readInt() != 0;
385            boolean sticky = data.readInt() != 0;
386            int sendingUser = data.readInt();
387            scheduleRegisteredReceiver(receiver, intent,
388                    resultCode, dataStr, extras, ordered, sticky, sendingUser);
389            return true;
390        }
391
392        case SCHEDULE_LOW_MEMORY_TRANSACTION:
393        {
394            data.enforceInterface(IApplicationThread.descriptor);
395            scheduleLowMemory();
396            return true;
397        }
398
399        case SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION:
400        {
401            data.enforceInterface(IApplicationThread.descriptor);
402            IBinder b = data.readStrongBinder();
403            scheduleActivityConfigurationChanged(b);
404            return true;
405        }
406
407        case PROFILER_CONTROL_TRANSACTION:
408        {
409            data.enforceInterface(IApplicationThread.descriptor);
410            boolean start = data.readInt() != 0;
411            int profileType = data.readInt();
412            String path = data.readString();
413            ParcelFileDescriptor fd = data.readInt() != 0
414                    ? data.readFileDescriptor() : null;
415            profilerControl(start, path, fd, profileType);
416            return true;
417        }
418
419        case SET_SCHEDULING_GROUP_TRANSACTION:
420        {
421            data.enforceInterface(IApplicationThread.descriptor);
422            int group = data.readInt();
423            setSchedulingGroup(group);
424            return true;
425        }
426
427        case SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION:
428        {
429            data.enforceInterface(IApplicationThread.descriptor);
430            ApplicationInfo appInfo = ApplicationInfo.CREATOR.createFromParcel(data);
431            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
432            int backupMode = data.readInt();
433            scheduleCreateBackupAgent(appInfo, compatInfo, backupMode);
434            return true;
435        }
436
437        case SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION:
438        {
439            data.enforceInterface(IApplicationThread.descriptor);
440            ApplicationInfo appInfo = ApplicationInfo.CREATOR.createFromParcel(data);
441            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
442            scheduleDestroyBackupAgent(appInfo, compatInfo);
443            return true;
444        }
445
446        case GET_MEMORY_INFO_TRANSACTION:
447        {
448            data.enforceInterface(IApplicationThread.descriptor);
449            Debug.MemoryInfo mi = new Debug.MemoryInfo();
450            getMemoryInfo(mi);
451            reply.writeNoException();
452            mi.writeToParcel(reply, 0);
453            return true;
454        }
455
456        case DISPATCH_PACKAGE_BROADCAST_TRANSACTION:
457        {
458            data.enforceInterface(IApplicationThread.descriptor);
459            int cmd = data.readInt();
460            String[] packages = data.readStringArray();
461            dispatchPackageBroadcast(cmd, packages);
462            return true;
463        }
464
465        case SCHEDULE_CRASH_TRANSACTION:
466        {
467            data.enforceInterface(IApplicationThread.descriptor);
468            String msg = data.readString();
469            scheduleCrash(msg);
470            return true;
471        }
472
473        case DUMP_HEAP_TRANSACTION:
474        {
475            data.enforceInterface(IApplicationThread.descriptor);
476            boolean managed = data.readInt() != 0;
477            String path = data.readString();
478            ParcelFileDescriptor fd = data.readInt() != 0
479                    ? data.readFileDescriptor() : null;
480            dumpHeap(managed, path, fd);
481            return true;
482        }
483
484        case DUMP_ACTIVITY_TRANSACTION: {
485            data.enforceInterface(IApplicationThread.descriptor);
486            ParcelFileDescriptor fd = data.readFileDescriptor();
487            final IBinder activity = data.readStrongBinder();
488            final String prefix = data.readString();
489            final String[] args = data.readStringArray();
490            if (fd != null) {
491                dumpActivity(fd.getFileDescriptor(), activity, prefix, args);
492                try {
493                    fd.close();
494                } catch (IOException e) {
495                }
496            }
497            return true;
498        }
499
500        case SET_CORE_SETTINGS_TRANSACTION: {
501            data.enforceInterface(IApplicationThread.descriptor);
502            Bundle settings = data.readBundle();
503            setCoreSettings(settings);
504            return true;
505        }
506
507        case UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION: {
508            data.enforceInterface(IApplicationThread.descriptor);
509            String pkg = data.readString();
510            CompatibilityInfo compat = CompatibilityInfo.CREATOR.createFromParcel(data);
511            updatePackageCompatibilityInfo(pkg, compat);
512            return true;
513        }
514
515        case SCHEDULE_TRIM_MEMORY_TRANSACTION: {
516            data.enforceInterface(IApplicationThread.descriptor);
517            int level = data.readInt();
518            scheduleTrimMemory(level);
519            return true;
520        }
521
522        case DUMP_MEM_INFO_TRANSACTION:
523        {
524            data.enforceInterface(IApplicationThread.descriptor);
525            ParcelFileDescriptor fd = data.readFileDescriptor();
526            boolean checkin = data.readInt() != 0;
527            boolean dumpInfo = data.readInt() != 0;
528            boolean dumpDalvik = data.readInt() != 0;
529            String[] args = data.readStringArray();
530            Debug.MemoryInfo mi = null;
531            if (fd != null) {
532                try {
533                    mi = dumpMemInfo(fd.getFileDescriptor(), checkin, dumpInfo, dumpDalvik, args);
534                } finally {
535                    try {
536                        fd.close();
537                    } catch (IOException e) {
538                        // swallowed, not propagated back to the caller
539                    }
540                }
541            }
542            reply.writeNoException();
543            mi.writeToParcel(reply, 0);
544            return true;
545        }
546
547        case DUMP_GFX_INFO_TRANSACTION:
548        {
549            data.enforceInterface(IApplicationThread.descriptor);
550            ParcelFileDescriptor fd = data.readFileDescriptor();
551            String[] args = data.readStringArray();
552            if (fd != null) {
553                try {
554                    dumpGfxInfo(fd.getFileDescriptor(), args);
555                } finally {
556                    try {
557                        fd.close();
558                    } catch (IOException e) {
559                        // swallowed, not propagated back to the caller
560                    }
561                }
562            }
563            reply.writeNoException();
564            return true;
565        }
566
567        case DUMP_DB_INFO_TRANSACTION:
568        {
569            data.enforceInterface(IApplicationThread.descriptor);
570            ParcelFileDescriptor fd = data.readFileDescriptor();
571            String[] args = data.readStringArray();
572            if (fd != null) {
573                try {
574                    dumpDbInfo(fd.getFileDescriptor(), args);
575                } finally {
576                    try {
577                        fd.close();
578                    } catch (IOException e) {
579                        // swallowed, not propagated back to the caller
580                    }
581                }
582            }
583            reply.writeNoException();
584            return true;
585        }
586
587        case UNSTABLE_PROVIDER_DIED_TRANSACTION:
588        {
589            data.enforceInterface(IApplicationThread.descriptor);
590            IBinder provider = data.readStrongBinder();
591            unstableProviderDied(provider);
592            reply.writeNoException();
593            return true;
594        }
595
596        case REQUEST_ACTIVITY_EXTRAS_TRANSACTION:
597        {
598            data.enforceInterface(IApplicationThread.descriptor);
599            IBinder activityToken = data.readStrongBinder();
600            IBinder requestToken = data.readStrongBinder();
601            int requestType = data.readInt();
602            requestActivityExtras(activityToken, requestToken, requestType);
603            reply.writeNoException();
604            return true;
605        }
606        }
607
608        return super.onTransact(code, data, reply, flags);
609    }
610
611    public IBinder asBinder()
612    {
613        return this;
614    }
615}
616
617class ApplicationThreadProxy implements IApplicationThread {
618    private final IBinder mRemote;
619
620    public ApplicationThreadProxy(IBinder remote) {
621        mRemote = remote;
622    }
623
624    public final IBinder asBinder() {
625        return mRemote;
626    }
627
628    public final void schedulePauseActivity(IBinder token, boolean finished,
629            boolean userLeaving, int configChanges) throws RemoteException {
630        Parcel data = Parcel.obtain();
631        data.writeInterfaceToken(IApplicationThread.descriptor);
632        data.writeStrongBinder(token);
633        data.writeInt(finished ? 1 : 0);
634        data.writeInt(userLeaving ? 1 :0);
635        data.writeInt(configChanges);
636        mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
637                IBinder.FLAG_ONEWAY);
638        data.recycle();
639    }
640
641    public final void scheduleStopActivity(IBinder token, boolean showWindow,
642            int configChanges) throws RemoteException {
643        Parcel data = Parcel.obtain();
644        data.writeInterfaceToken(IApplicationThread.descriptor);
645        data.writeStrongBinder(token);
646        data.writeInt(showWindow ? 1 : 0);
647        data.writeInt(configChanges);
648        mRemote.transact(SCHEDULE_STOP_ACTIVITY_TRANSACTION, data, null,
649                IBinder.FLAG_ONEWAY);
650        data.recycle();
651    }
652
653    public final void scheduleWindowVisibility(IBinder token,
654            boolean showWindow) throws RemoteException {
655        Parcel data = Parcel.obtain();
656        data.writeInterfaceToken(IApplicationThread.descriptor);
657        data.writeStrongBinder(token);
658        data.writeInt(showWindow ? 1 : 0);
659        mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null,
660                IBinder.FLAG_ONEWAY);
661        data.recycle();
662    }
663
664    public final void scheduleSleeping(IBinder token,
665            boolean sleeping) throws RemoteException {
666        Parcel data = Parcel.obtain();
667        data.writeInterfaceToken(IApplicationThread.descriptor);
668        data.writeStrongBinder(token);
669        data.writeInt(sleeping ? 1 : 0);
670        mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null,
671                IBinder.FLAG_ONEWAY);
672        data.recycle();
673    }
674
675    public final void scheduleResumeActivity(IBinder token, boolean isForward)
676            throws RemoteException {
677        Parcel data = Parcel.obtain();
678        data.writeInterfaceToken(IApplicationThread.descriptor);
679        data.writeStrongBinder(token);
680        data.writeInt(isForward ? 1 : 0);
681        mRemote.transact(SCHEDULE_RESUME_ACTIVITY_TRANSACTION, data, null,
682                IBinder.FLAG_ONEWAY);
683        data.recycle();
684    }
685
686    public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
687    		throws RemoteException {
688        Parcel data = Parcel.obtain();
689        data.writeInterfaceToken(IApplicationThread.descriptor);
690        data.writeStrongBinder(token);
691        data.writeTypedList(results);
692        mRemote.transact(SCHEDULE_SEND_RESULT_TRANSACTION, data, null,
693                IBinder.FLAG_ONEWAY);
694        data.recycle();
695    }
696
697    public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
698            ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,
699            Bundle state, List<ResultInfo> pendingResults,
700    		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
701    		String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
702    		throws RemoteException {
703        Parcel data = Parcel.obtain();
704        data.writeInterfaceToken(IApplicationThread.descriptor);
705        intent.writeToParcel(data, 0);
706        data.writeStrongBinder(token);
707        data.writeInt(ident);
708        info.writeToParcel(data, 0);
709        curConfig.writeToParcel(data, 0);
710        compatInfo.writeToParcel(data, 0);
711        data.writeBundle(state);
712        data.writeTypedList(pendingResults);
713        data.writeTypedList(pendingNewIntents);
714        data.writeInt(notResumed ? 1 : 0);
715        data.writeInt(isForward ? 1 : 0);
716        data.writeString(profileName);
717        if (profileFd != null) {
718            data.writeInt(1);
719            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
720        } else {
721            data.writeInt(0);
722        }
723        data.writeInt(autoStopProfiler ? 1 : 0);
724        mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
725                IBinder.FLAG_ONEWAY);
726        data.recycle();
727    }
728
729    public final void scheduleRelaunchActivity(IBinder token,
730            List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
731            int configChanges, boolean notResumed, Configuration config)
732            throws RemoteException {
733        Parcel data = Parcel.obtain();
734        data.writeInterfaceToken(IApplicationThread.descriptor);
735        data.writeStrongBinder(token);
736        data.writeTypedList(pendingResults);
737        data.writeTypedList(pendingNewIntents);
738        data.writeInt(configChanges);
739        data.writeInt(notResumed ? 1 : 0);
740        if (config != null) {
741            data.writeInt(1);
742            config.writeToParcel(data, 0);
743        } else {
744            data.writeInt(0);
745        }
746        mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
747                IBinder.FLAG_ONEWAY);
748        data.recycle();
749    }
750
751    public void scheduleNewIntent(List<Intent> intents, IBinder token)
752            throws RemoteException {
753        Parcel data = Parcel.obtain();
754        data.writeInterfaceToken(IApplicationThread.descriptor);
755        data.writeTypedList(intents);
756        data.writeStrongBinder(token);
757        mRemote.transact(SCHEDULE_NEW_INTENT_TRANSACTION, data, null,
758                IBinder.FLAG_ONEWAY);
759        data.recycle();
760    }
761
762    public final void scheduleDestroyActivity(IBinder token, boolean finishing,
763            int configChanges) throws RemoteException {
764        Parcel data = Parcel.obtain();
765        data.writeInterfaceToken(IApplicationThread.descriptor);
766        data.writeStrongBinder(token);
767        data.writeInt(finishing ? 1 : 0);
768        data.writeInt(configChanges);
769        mRemote.transact(SCHEDULE_FINISH_ACTIVITY_TRANSACTION, data, null,
770                IBinder.FLAG_ONEWAY);
771        data.recycle();
772    }
773
774    public final void scheduleReceiver(Intent intent, ActivityInfo info,
775            CompatibilityInfo compatInfo, int resultCode, String resultData,
776            Bundle map, boolean sync, int sendingUser) throws RemoteException {
777        Parcel data = Parcel.obtain();
778        data.writeInterfaceToken(IApplicationThread.descriptor);
779        intent.writeToParcel(data, 0);
780        info.writeToParcel(data, 0);
781        compatInfo.writeToParcel(data, 0);
782        data.writeInt(resultCode);
783        data.writeString(resultData);
784        data.writeBundle(map);
785        data.writeInt(sync ? 1 : 0);
786        data.writeInt(sendingUser);
787        mRemote.transact(SCHEDULE_RECEIVER_TRANSACTION, data, null,
788                IBinder.FLAG_ONEWAY);
789        data.recycle();
790    }
791
792    public final void scheduleCreateBackupAgent(ApplicationInfo app,
793            CompatibilityInfo compatInfo, int backupMode) throws RemoteException {
794        Parcel data = Parcel.obtain();
795        data.writeInterfaceToken(IApplicationThread.descriptor);
796        app.writeToParcel(data, 0);
797        compatInfo.writeToParcel(data, 0);
798        data.writeInt(backupMode);
799        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null,
800                IBinder.FLAG_ONEWAY);
801        data.recycle();
802    }
803
804    public final void scheduleDestroyBackupAgent(ApplicationInfo app,
805            CompatibilityInfo compatInfo) throws RemoteException {
806        Parcel data = Parcel.obtain();
807        data.writeInterfaceToken(IApplicationThread.descriptor);
808        app.writeToParcel(data, 0);
809        compatInfo.writeToParcel(data, 0);
810        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null,
811                IBinder.FLAG_ONEWAY);
812        data.recycle();
813    }
814
815    public final void scheduleCreateService(IBinder token, ServiceInfo info,
816            CompatibilityInfo compatInfo) throws RemoteException {
817        Parcel data = Parcel.obtain();
818        data.writeInterfaceToken(IApplicationThread.descriptor);
819        data.writeStrongBinder(token);
820        info.writeToParcel(data, 0);
821        compatInfo.writeToParcel(data, 0);
822        mRemote.transact(SCHEDULE_CREATE_SERVICE_TRANSACTION, data, null,
823                IBinder.FLAG_ONEWAY);
824        data.recycle();
825    }
826
827    public final void scheduleBindService(IBinder token, Intent intent, boolean rebind)
828            throws RemoteException {
829        Parcel data = Parcel.obtain();
830        data.writeInterfaceToken(IApplicationThread.descriptor);
831        data.writeStrongBinder(token);
832        intent.writeToParcel(data, 0);
833        data.writeInt(rebind ? 1 : 0);
834        mRemote.transact(SCHEDULE_BIND_SERVICE_TRANSACTION, data, null,
835                IBinder.FLAG_ONEWAY);
836        data.recycle();
837    }
838
839    public final void scheduleUnbindService(IBinder token, Intent intent)
840            throws RemoteException {
841        Parcel data = Parcel.obtain();
842        data.writeInterfaceToken(IApplicationThread.descriptor);
843        data.writeStrongBinder(token);
844        intent.writeToParcel(data, 0);
845        mRemote.transact(SCHEDULE_UNBIND_SERVICE_TRANSACTION, data, null,
846                IBinder.FLAG_ONEWAY);
847        data.recycle();
848    }
849
850    public final void scheduleServiceArgs(IBinder token, boolean taskRemoved, int startId,
851	    int flags, Intent args) throws RemoteException {
852        Parcel data = Parcel.obtain();
853        data.writeInterfaceToken(IApplicationThread.descriptor);
854        data.writeStrongBinder(token);
855        data.writeInt(taskRemoved ? 1 : 0);
856        data.writeInt(startId);
857        data.writeInt(flags);
858        if (args != null) {
859            data.writeInt(1);
860            args.writeToParcel(data, 0);
861        } else {
862            data.writeInt(0);
863        }
864        mRemote.transact(SCHEDULE_SERVICE_ARGS_TRANSACTION, data, null,
865                IBinder.FLAG_ONEWAY);
866        data.recycle();
867    }
868
869    public final void scheduleStopService(IBinder token)
870            throws RemoteException {
871        Parcel data = Parcel.obtain();
872        data.writeInterfaceToken(IApplicationThread.descriptor);
873        data.writeStrongBinder(token);
874        mRemote.transact(SCHEDULE_STOP_SERVICE_TRANSACTION, data, null,
875                IBinder.FLAG_ONEWAY);
876        data.recycle();
877    }
878
879    public final void bindApplication(String packageName, ApplicationInfo info,
880            List<ProviderInfo> providers, ComponentName testName, String profileName,
881            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
882            IInstrumentationWatcher testWatcher,
883            IUiAutomationConnection uiAutomationConnection, int debugMode,
884            boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
885            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
886            Bundle coreSettings) throws RemoteException {
887        Parcel data = Parcel.obtain();
888        data.writeInterfaceToken(IApplicationThread.descriptor);
889        data.writeString(packageName);
890        info.writeToParcel(data, 0);
891        data.writeTypedList(providers);
892        if (testName == null) {
893            data.writeInt(0);
894        } else {
895            data.writeInt(1);
896            testName.writeToParcel(data, 0);
897        }
898        data.writeString(profileName);
899        if (profileFd != null) {
900            data.writeInt(1);
901            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
902        } else {
903            data.writeInt(0);
904        }
905        data.writeInt(autoStopProfiler ? 1 : 0);
906        data.writeBundle(testArgs);
907        data.writeStrongInterface(testWatcher);
908        data.writeStrongInterface(uiAutomationConnection);
909        data.writeInt(debugMode);
910        data.writeInt(openGlTrace ? 1 : 0);
911        data.writeInt(restrictedBackupMode ? 1 : 0);
912        data.writeInt(persistent ? 1 : 0);
913        config.writeToParcel(data, 0);
914        compatInfo.writeToParcel(data, 0);
915        data.writeMap(services);
916        data.writeBundle(coreSettings);
917        mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null,
918                IBinder.FLAG_ONEWAY);
919        data.recycle();
920    }
921
922    public final void scheduleExit() throws RemoteException {
923        Parcel data = Parcel.obtain();
924        data.writeInterfaceToken(IApplicationThread.descriptor);
925        mRemote.transact(SCHEDULE_EXIT_TRANSACTION, data, null,
926                IBinder.FLAG_ONEWAY);
927        data.recycle();
928    }
929
930    public final void scheduleSuicide() throws RemoteException {
931        Parcel data = Parcel.obtain();
932        data.writeInterfaceToken(IApplicationThread.descriptor);
933        mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null,
934                IBinder.FLAG_ONEWAY);
935        data.recycle();
936    }
937
938    public final void requestThumbnail(IBinder token)
939            throws RemoteException {
940        Parcel data = Parcel.obtain();
941        data.writeInterfaceToken(IApplicationThread.descriptor);
942        data.writeStrongBinder(token);
943        mRemote.transact(REQUEST_THUMBNAIL_TRANSACTION, data, null,
944                IBinder.FLAG_ONEWAY);
945        data.recycle();
946    }
947
948    public final void scheduleConfigurationChanged(Configuration config)
949            throws RemoteException {
950        Parcel data = Parcel.obtain();
951        data.writeInterfaceToken(IApplicationThread.descriptor);
952        config.writeToParcel(data, 0);
953        mRemote.transact(SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION, data, null,
954                IBinder.FLAG_ONEWAY);
955        data.recycle();
956    }
957
958    public void updateTimeZone() throws RemoteException {
959        Parcel data = Parcel.obtain();
960        data.writeInterfaceToken(IApplicationThread.descriptor);
961        mRemote.transact(UPDATE_TIME_ZONE_TRANSACTION, data, null,
962                IBinder.FLAG_ONEWAY);
963        data.recycle();
964    }
965
966    public void clearDnsCache() throws RemoteException {
967        Parcel data = Parcel.obtain();
968        data.writeInterfaceToken(IApplicationThread.descriptor);
969        mRemote.transact(CLEAR_DNS_CACHE_TRANSACTION, data, null,
970                IBinder.FLAG_ONEWAY);
971        data.recycle();
972    }
973
974    public void setHttpProxy(String proxy, String port, String exclList) throws RemoteException {
975        Parcel data = Parcel.obtain();
976        data.writeInterfaceToken(IApplicationThread.descriptor);
977        data.writeString(proxy);
978        data.writeString(port);
979        data.writeString(exclList);
980        mRemote.transact(SET_HTTP_PROXY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
981        data.recycle();
982    }
983
984    public void processInBackground() throws RemoteException {
985        Parcel data = Parcel.obtain();
986        data.writeInterfaceToken(IApplicationThread.descriptor);
987        mRemote.transact(PROCESS_IN_BACKGROUND_TRANSACTION, data, null,
988                IBinder.FLAG_ONEWAY);
989        data.recycle();
990    }
991
992    public void dumpService(FileDescriptor fd, IBinder token, String[] args)
993            throws RemoteException {
994        Parcel data = Parcel.obtain();
995        data.writeInterfaceToken(IApplicationThread.descriptor);
996        data.writeFileDescriptor(fd);
997        data.writeStrongBinder(token);
998        data.writeStringArray(args);
999        mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1000        data.recycle();
1001    }
1002
1003    public void dumpProvider(FileDescriptor fd, IBinder token, String[] args)
1004            throws RemoteException {
1005        Parcel data = Parcel.obtain();
1006        data.writeInterfaceToken(IApplicationThread.descriptor);
1007        data.writeFileDescriptor(fd);
1008        data.writeStrongBinder(token);
1009        data.writeStringArray(args);
1010        mRemote.transact(DUMP_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1011        data.recycle();
1012    }
1013
1014    public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
1015            int resultCode, String dataStr, Bundle extras, boolean ordered,
1016            boolean sticky, int sendingUser) throws RemoteException {
1017        Parcel data = Parcel.obtain();
1018        data.writeInterfaceToken(IApplicationThread.descriptor);
1019        data.writeStrongBinder(receiver.asBinder());
1020        intent.writeToParcel(data, 0);
1021        data.writeInt(resultCode);
1022        data.writeString(dataStr);
1023        data.writeBundle(extras);
1024        data.writeInt(ordered ? 1 : 0);
1025        data.writeInt(sticky ? 1 : 0);
1026        data.writeInt(sendingUser);
1027        mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
1028                IBinder.FLAG_ONEWAY);
1029        data.recycle();
1030    }
1031
1032    public final void scheduleLowMemory() throws RemoteException {
1033        Parcel data = Parcel.obtain();
1034        data.writeInterfaceToken(IApplicationThread.descriptor);
1035        mRemote.transact(SCHEDULE_LOW_MEMORY_TRANSACTION, data, null,
1036                IBinder.FLAG_ONEWAY);
1037        data.recycle();
1038    }
1039
1040    public final void scheduleActivityConfigurationChanged(
1041            IBinder token) throws RemoteException {
1042        Parcel data = Parcel.obtain();
1043        data.writeInterfaceToken(IApplicationThread.descriptor);
1044        data.writeStrongBinder(token);
1045        mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
1046                IBinder.FLAG_ONEWAY);
1047        data.recycle();
1048    }
1049
1050    public void profilerControl(boolean start, String path,
1051            ParcelFileDescriptor fd, int profileType) throws RemoteException {
1052        Parcel data = Parcel.obtain();
1053        data.writeInterfaceToken(IApplicationThread.descriptor);
1054        data.writeInt(start ? 1 : 0);
1055        data.writeInt(profileType);
1056        data.writeString(path);
1057        if (fd != null) {
1058            data.writeInt(1);
1059            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1060        } else {
1061            data.writeInt(0);
1062        }
1063        mRemote.transact(PROFILER_CONTROL_TRANSACTION, data, null,
1064                IBinder.FLAG_ONEWAY);
1065        data.recycle();
1066    }
1067
1068    public void setSchedulingGroup(int group) throws RemoteException {
1069        Parcel data = Parcel.obtain();
1070        data.writeInterfaceToken(IApplicationThread.descriptor);
1071        data.writeInt(group);
1072        mRemote.transact(SET_SCHEDULING_GROUP_TRANSACTION, data, null,
1073                IBinder.FLAG_ONEWAY);
1074        data.recycle();
1075    }
1076
1077    public void getMemoryInfo(Debug.MemoryInfo outInfo) throws RemoteException {
1078        Parcel data = Parcel.obtain();
1079        Parcel reply = Parcel.obtain();
1080        data.writeInterfaceToken(IApplicationThread.descriptor);
1081        mRemote.transact(GET_MEMORY_INFO_TRANSACTION, data, reply, 0);
1082        reply.readException();
1083        outInfo.readFromParcel(reply);
1084        data.recycle();
1085        reply.recycle();
1086    }
1087
1088    public void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException {
1089        Parcel data = Parcel.obtain();
1090        data.writeInterfaceToken(IApplicationThread.descriptor);
1091        data.writeInt(cmd);
1092        data.writeStringArray(packages);
1093        mRemote.transact(DISPATCH_PACKAGE_BROADCAST_TRANSACTION, data, null,
1094                IBinder.FLAG_ONEWAY);
1095        data.recycle();
1096
1097    }
1098
1099    public void scheduleCrash(String msg) throws RemoteException {
1100        Parcel data = Parcel.obtain();
1101        data.writeInterfaceToken(IApplicationThread.descriptor);
1102        data.writeString(msg);
1103        mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
1104                IBinder.FLAG_ONEWAY);
1105        data.recycle();
1106
1107    }
1108
1109    public void dumpHeap(boolean managed, String path,
1110            ParcelFileDescriptor fd) throws RemoteException {
1111        Parcel data = Parcel.obtain();
1112        data.writeInterfaceToken(IApplicationThread.descriptor);
1113        data.writeInt(managed ? 1 : 0);
1114        data.writeString(path);
1115        if (fd != null) {
1116            data.writeInt(1);
1117            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1118        } else {
1119            data.writeInt(0);
1120        }
1121        mRemote.transact(DUMP_HEAP_TRANSACTION, data, null,
1122                IBinder.FLAG_ONEWAY);
1123        data.recycle();
1124    }
1125
1126    public void dumpActivity(FileDescriptor fd, IBinder token, String prefix, String[] args)
1127            throws RemoteException {
1128        Parcel data = Parcel.obtain();
1129        data.writeInterfaceToken(IApplicationThread.descriptor);
1130        data.writeFileDescriptor(fd);
1131        data.writeStrongBinder(token);
1132        data.writeString(prefix);
1133        data.writeStringArray(args);
1134        mRemote.transact(DUMP_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1135        data.recycle();
1136    }
1137
1138    public void setCoreSettings(Bundle coreSettings) throws RemoteException {
1139        Parcel data = Parcel.obtain();
1140        data.writeInterfaceToken(IApplicationThread.descriptor);
1141        data.writeBundle(coreSettings);
1142        mRemote.transact(SET_CORE_SETTINGS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1143    }
1144
1145    public void updatePackageCompatibilityInfo(String pkg, CompatibilityInfo info)
1146            throws RemoteException {
1147        Parcel data = Parcel.obtain();
1148        data.writeInterfaceToken(IApplicationThread.descriptor);
1149        data.writeString(pkg);
1150        info.writeToParcel(data, 0);
1151        mRemote.transact(UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION, data, null,
1152                IBinder.FLAG_ONEWAY);
1153    }
1154
1155    public void scheduleTrimMemory(int level) throws RemoteException {
1156        Parcel data = Parcel.obtain();
1157        data.writeInterfaceToken(IApplicationThread.descriptor);
1158        data.writeInt(level);
1159        mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null,
1160                IBinder.FLAG_ONEWAY);
1161    }
1162
1163    public Debug.MemoryInfo dumpMemInfo(FileDescriptor fd, boolean checkin, boolean dumpInfo,
1164            boolean dumpDalvik, String[] args) throws RemoteException {
1165        Parcel data = Parcel.obtain();
1166        Parcel reply = Parcel.obtain();
1167        data.writeInterfaceToken(IApplicationThread.descriptor);
1168        data.writeFileDescriptor(fd);
1169        data.writeInt(checkin ? 1 : 0);
1170        data.writeInt(dumpInfo ? 1 : 0);
1171        data.writeInt(dumpDalvik ? 1 : 0);
1172        data.writeStringArray(args);
1173        mRemote.transact(DUMP_MEM_INFO_TRANSACTION, data, reply, 0);
1174        reply.readException();
1175        Debug.MemoryInfo info = new Debug.MemoryInfo();
1176        info.readFromParcel(reply);
1177        data.recycle();
1178        reply.recycle();
1179        return info;
1180    }
1181
1182    public void dumpGfxInfo(FileDescriptor fd, String[] args) throws RemoteException {
1183        Parcel data = Parcel.obtain();
1184        data.writeInterfaceToken(IApplicationThread.descriptor);
1185        data.writeFileDescriptor(fd);
1186        data.writeStringArray(args);
1187        mRemote.transact(DUMP_GFX_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1188        data.recycle();
1189    }
1190
1191    public void dumpDbInfo(FileDescriptor fd, String[] args) throws RemoteException {
1192        Parcel data = Parcel.obtain();
1193        data.writeInterfaceToken(IApplicationThread.descriptor);
1194        data.writeFileDescriptor(fd);
1195        data.writeStringArray(args);
1196        mRemote.transact(DUMP_DB_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1197        data.recycle();
1198    }
1199
1200    public void unstableProviderDied(IBinder provider) throws RemoteException {
1201        Parcel data = Parcel.obtain();
1202        data.writeInterfaceToken(IApplicationThread.descriptor);
1203        data.writeStrongBinder(provider);
1204        mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1205        data.recycle();
1206    }
1207
1208    public void requestActivityExtras(IBinder activityToken, IBinder requestToken, int requestType)
1209            throws RemoteException {
1210        Parcel data = Parcel.obtain();
1211        data.writeInterfaceToken(IApplicationThread.descriptor);
1212        data.writeStrongBinder(activityToken);
1213        data.writeStrongBinder(requestToken);
1214        data.writeInt(requestType);
1215        mRemote.transact(REQUEST_ACTIVITY_EXTRAS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1216        data.recycle();
1217    }
1218}
1219