ApplicationThreadNative.java revision 8a985d24ce9a38f40ed88fecbdcd0e75e3a68f44
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            int procState = data.readInt();
115            boolean isForward = data.readInt() != 0;
116            Bundle resumeArgs = data.readBundle();
117            scheduleResumeActivity(b, procState, isForward, resumeArgs);
118            return true;
119        }
120
121        case SCHEDULE_SEND_RESULT_TRANSACTION:
122        {
123            data.enforceInterface(IApplicationThread.descriptor);
124            IBinder b = data.readStrongBinder();
125            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
126            scheduleSendResult(b, ri);
127            return true;
128        }
129
130        case SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION:
131        {
132            data.enforceInterface(IApplicationThread.descriptor);
133            Intent intent = Intent.CREATOR.createFromParcel(data);
134            IBinder b = data.readStrongBinder();
135            int ident = data.readInt();
136            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
137            Configuration curConfig = Configuration.CREATOR.createFromParcel(data);
138            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
139            int procState = data.readInt();
140            Bundle state = data.readBundle();
141            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
142            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
143            boolean notResumed = data.readInt() != 0;
144            boolean isForward = data.readInt() != 0;
145            String profileName = data.readString();
146            ParcelFileDescriptor profileFd = data.readInt() != 0
147                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
148            boolean autoStopProfiler = data.readInt() != 0;
149            Bundle resumeArgs = data.readBundle();
150            scheduleLaunchActivity(intent, b, ident, info, curConfig, compatInfo, procState, state,
151                    ri, pi, notResumed, isForward, profileName, profileFd, autoStopProfiler,
152                    resumeArgs);
153            return true;
154        }
155
156        case SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION:
157        {
158            data.enforceInterface(IApplicationThread.descriptor);
159            IBinder b = data.readStrongBinder();
160            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
161            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
162            int configChanges = data.readInt();
163            boolean notResumed = data.readInt() != 0;
164            Configuration config = null;
165            if (data.readInt() != 0) {
166                config = Configuration.CREATOR.createFromParcel(data);
167            }
168            scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed, config);
169            return true;
170        }
171
172        case SCHEDULE_NEW_INTENT_TRANSACTION:
173        {
174            data.enforceInterface(IApplicationThread.descriptor);
175            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
176            IBinder b = data.readStrongBinder();
177            scheduleNewIntent(pi, b);
178            return true;
179        }
180
181        case SCHEDULE_FINISH_ACTIVITY_TRANSACTION:
182        {
183            data.enforceInterface(IApplicationThread.descriptor);
184            IBinder b = data.readStrongBinder();
185            boolean finishing = data.readInt() != 0;
186            int configChanges = data.readInt();
187            scheduleDestroyActivity(b, finishing, configChanges);
188            return true;
189        }
190
191        case SCHEDULE_RECEIVER_TRANSACTION:
192        {
193            data.enforceInterface(IApplicationThread.descriptor);
194            Intent intent = Intent.CREATOR.createFromParcel(data);
195            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
196            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
197            int resultCode = data.readInt();
198            String resultData = data.readString();
199            Bundle resultExtras = data.readBundle();
200            boolean sync = data.readInt() != 0;
201            int sendingUser = data.readInt();
202            int processState = data.readInt();
203            scheduleReceiver(intent, info, compatInfo, resultCode, resultData,
204                    resultExtras, sync, sendingUser, processState);
205            return true;
206        }
207
208        case SCHEDULE_CREATE_SERVICE_TRANSACTION: {
209            data.enforceInterface(IApplicationThread.descriptor);
210            IBinder token = data.readStrongBinder();
211            ServiceInfo info = ServiceInfo.CREATOR.createFromParcel(data);
212            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
213            int processState = data.readInt();
214            scheduleCreateService(token, info, compatInfo, processState);
215            return true;
216        }
217
218        case SCHEDULE_BIND_SERVICE_TRANSACTION: {
219            data.enforceInterface(IApplicationThread.descriptor);
220            IBinder token = data.readStrongBinder();
221            Intent intent = Intent.CREATOR.createFromParcel(data);
222            boolean rebind = data.readInt() != 0;
223            int processState = data.readInt();
224            scheduleBindService(token, intent, rebind, processState);
225            return true;
226        }
227
228        case SCHEDULE_UNBIND_SERVICE_TRANSACTION: {
229            data.enforceInterface(IApplicationThread.descriptor);
230            IBinder token = data.readStrongBinder();
231            Intent intent = Intent.CREATOR.createFromParcel(data);
232            scheduleUnbindService(token, intent);
233            return true;
234        }
235
236        case SCHEDULE_SERVICE_ARGS_TRANSACTION:
237        {
238            data.enforceInterface(IApplicationThread.descriptor);
239            IBinder token = data.readStrongBinder();
240            boolean taskRemoved = data.readInt() != 0;
241            int startId = data.readInt();
242            int fl = data.readInt();
243            Intent args;
244            if (data.readInt() != 0) {
245                args = Intent.CREATOR.createFromParcel(data);
246            } else {
247                args = null;
248            }
249            scheduleServiceArgs(token, taskRemoved, startId, fl, args);
250            return true;
251        }
252
253        case SCHEDULE_STOP_SERVICE_TRANSACTION:
254        {
255            data.enforceInterface(IApplicationThread.descriptor);
256            IBinder token = data.readStrongBinder();
257            scheduleStopService(token);
258            return true;
259        }
260
261        case BIND_APPLICATION_TRANSACTION:
262        {
263            data.enforceInterface(IApplicationThread.descriptor);
264            String packageName = data.readString();
265            ApplicationInfo info =
266                ApplicationInfo.CREATOR.createFromParcel(data);
267            List<ProviderInfo> providers =
268                data.createTypedArrayList(ProviderInfo.CREATOR);
269            ComponentName testName = (data.readInt() != 0)
270                ? new ComponentName(data) : null;
271            String profileName = data.readString();
272            ParcelFileDescriptor profileFd = data.readInt() != 0
273                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
274            boolean autoStopProfiler = data.readInt() != 0;
275            Bundle testArgs = data.readBundle();
276            IBinder binder = data.readStrongBinder();
277            IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
278            binder = data.readStrongBinder();
279            IUiAutomationConnection uiAutomationConnection =
280                    IUiAutomationConnection.Stub.asInterface(binder);
281            int testMode = data.readInt();
282            boolean openGlTrace = data.readInt() != 0;
283            boolean restrictedBackupMode = (data.readInt() != 0);
284            boolean persistent = (data.readInt() != 0);
285            Configuration config = Configuration.CREATOR.createFromParcel(data);
286            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
287            HashMap<String, IBinder> services = data.readHashMap(null);
288            Bundle coreSettings = data.readBundle();
289            bindApplication(packageName, info,
290                            providers, testName, profileName, profileFd, autoStopProfiler,
291                            testArgs, testWatcher, uiAutomationConnection, testMode,
292                            openGlTrace, restrictedBackupMode, persistent, config, compatInfo,
293                            services, coreSettings);
294            return true;
295        }
296
297        case SCHEDULE_EXIT_TRANSACTION:
298        {
299            data.enforceInterface(IApplicationThread.descriptor);
300            scheduleExit();
301            return true;
302        }
303
304        case SCHEDULE_SUICIDE_TRANSACTION:
305        {
306            data.enforceInterface(IApplicationThread.descriptor);
307            scheduleSuicide();
308            return true;
309        }
310
311        case REQUEST_THUMBNAIL_TRANSACTION:
312        {
313            data.enforceInterface(IApplicationThread.descriptor);
314            IBinder b = data.readStrongBinder();
315            requestThumbnail(b);
316            return true;
317        }
318
319        case SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION:
320        {
321            data.enforceInterface(IApplicationThread.descriptor);
322            Configuration config = Configuration.CREATOR.createFromParcel(data);
323            scheduleConfigurationChanged(config);
324            return true;
325        }
326
327        case UPDATE_TIME_ZONE_TRANSACTION: {
328            data.enforceInterface(IApplicationThread.descriptor);
329            updateTimeZone();
330            return true;
331        }
332
333        case CLEAR_DNS_CACHE_TRANSACTION: {
334            data.enforceInterface(IApplicationThread.descriptor);
335            clearDnsCache();
336            return true;
337        }
338
339        case SET_HTTP_PROXY_TRANSACTION: {
340            data.enforceInterface(IApplicationThread.descriptor);
341            final String proxy = data.readString();
342            final String port = data.readString();
343            final String exclList = data.readString();
344            final String pacFileUrl = data.readString();
345            setHttpProxy(proxy, port, exclList, pacFileUrl);
346            return true;
347        }
348
349        case PROCESS_IN_BACKGROUND_TRANSACTION: {
350            data.enforceInterface(IApplicationThread.descriptor);
351            processInBackground();
352            return true;
353        }
354
355        case DUMP_SERVICE_TRANSACTION: {
356            data.enforceInterface(IApplicationThread.descriptor);
357            ParcelFileDescriptor fd = data.readFileDescriptor();
358            final IBinder service = data.readStrongBinder();
359            final String[] args = data.readStringArray();
360            if (fd != null) {
361                dumpService(fd.getFileDescriptor(), service, args);
362                try {
363                    fd.close();
364                } catch (IOException e) {
365                }
366            }
367            return true;
368        }
369
370        case DUMP_PROVIDER_TRANSACTION: {
371            data.enforceInterface(IApplicationThread.descriptor);
372            ParcelFileDescriptor fd = data.readFileDescriptor();
373            final IBinder service = data.readStrongBinder();
374            final String[] args = data.readStringArray();
375            if (fd != null) {
376                dumpProvider(fd.getFileDescriptor(), service, args);
377                try {
378                    fd.close();
379                } catch (IOException e) {
380                }
381            }
382            return true;
383        }
384
385        case SCHEDULE_REGISTERED_RECEIVER_TRANSACTION: {
386            data.enforceInterface(IApplicationThread.descriptor);
387            IIntentReceiver receiver = IIntentReceiver.Stub.asInterface(
388                    data.readStrongBinder());
389            Intent intent = Intent.CREATOR.createFromParcel(data);
390            int resultCode = data.readInt();
391            String dataStr = data.readString();
392            Bundle extras = data.readBundle();
393            boolean ordered = data.readInt() != 0;
394            boolean sticky = data.readInt() != 0;
395            int sendingUser = data.readInt();
396            int processState = data.readInt();
397            scheduleRegisteredReceiver(receiver, intent,
398                    resultCode, dataStr, extras, ordered, sticky, sendingUser, processState);
399            return true;
400        }
401
402        case SCHEDULE_LOW_MEMORY_TRANSACTION:
403        {
404            data.enforceInterface(IApplicationThread.descriptor);
405            scheduleLowMemory();
406            return true;
407        }
408
409        case SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION:
410        {
411            data.enforceInterface(IApplicationThread.descriptor);
412            IBinder b = data.readStrongBinder();
413            scheduleActivityConfigurationChanged(b);
414            return true;
415        }
416
417        case PROFILER_CONTROL_TRANSACTION:
418        {
419            data.enforceInterface(IApplicationThread.descriptor);
420            boolean start = data.readInt() != 0;
421            int profileType = data.readInt();
422            String path = data.readString();
423            ParcelFileDescriptor fd = data.readInt() != 0
424                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
425            profilerControl(start, path, fd, profileType);
426            return true;
427        }
428
429        case SET_SCHEDULING_GROUP_TRANSACTION:
430        {
431            data.enforceInterface(IApplicationThread.descriptor);
432            int group = data.readInt();
433            setSchedulingGroup(group);
434            return true;
435        }
436
437        case SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION:
438        {
439            data.enforceInterface(IApplicationThread.descriptor);
440            ApplicationInfo appInfo = ApplicationInfo.CREATOR.createFromParcel(data);
441            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
442            int backupMode = data.readInt();
443            scheduleCreateBackupAgent(appInfo, compatInfo, backupMode);
444            return true;
445        }
446
447        case SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION:
448        {
449            data.enforceInterface(IApplicationThread.descriptor);
450            ApplicationInfo appInfo = ApplicationInfo.CREATOR.createFromParcel(data);
451            CompatibilityInfo compatInfo = CompatibilityInfo.CREATOR.createFromParcel(data);
452            scheduleDestroyBackupAgent(appInfo, compatInfo);
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                    ? ParcelFileDescriptor.CREATOR.createFromParcel(data) : 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            Debug.MemoryInfo mi = Debug.MemoryInfo.CREATOR.createFromParcel(data);
527            boolean checkin = data.readInt() != 0;
528            boolean dumpInfo = data.readInt() != 0;
529            boolean dumpDalvik = data.readInt() != 0;
530            String[] args = data.readStringArray();
531            if (fd != null) {
532                try {
533                    dumpMemInfo(fd.getFileDescriptor(), mi, 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            return true;
544        }
545
546        case DUMP_GFX_INFO_TRANSACTION:
547        {
548            data.enforceInterface(IApplicationThread.descriptor);
549            ParcelFileDescriptor fd = data.readFileDescriptor();
550            String[] args = data.readStringArray();
551            if (fd != null) {
552                try {
553                    dumpGfxInfo(fd.getFileDescriptor(), args);
554                } finally {
555                    try {
556                        fd.close();
557                    } catch (IOException e) {
558                        // swallowed, not propagated back to the caller
559                    }
560                }
561            }
562            reply.writeNoException();
563            return true;
564        }
565
566        case DUMP_DB_INFO_TRANSACTION:
567        {
568            data.enforceInterface(IApplicationThread.descriptor);
569            ParcelFileDescriptor fd = data.readFileDescriptor();
570            String[] args = data.readStringArray();
571            if (fd != null) {
572                try {
573                    dumpDbInfo(fd.getFileDescriptor(), args);
574                } finally {
575                    try {
576                        fd.close();
577                    } catch (IOException e) {
578                        // swallowed, not propagated back to the caller
579                    }
580                }
581            }
582            reply.writeNoException();
583            return true;
584        }
585
586        case UNSTABLE_PROVIDER_DIED_TRANSACTION:
587        {
588            data.enforceInterface(IApplicationThread.descriptor);
589            IBinder provider = data.readStrongBinder();
590            unstableProviderDied(provider);
591            reply.writeNoException();
592            return true;
593        }
594
595        case REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION:
596        {
597            data.enforceInterface(IApplicationThread.descriptor);
598            IBinder activityToken = data.readStrongBinder();
599            IBinder requestToken = data.readStrongBinder();
600            int requestType = data.readInt();
601            requestAssistContextExtras(activityToken, requestToken, requestType);
602            reply.writeNoException();
603            return true;
604        }
605
606        case SCHEDULE_TRANSLUCENT_CONVERSION_COMPLETE_TRANSACTION:
607        {
608            data.enforceInterface(IApplicationThread.descriptor);
609            IBinder token = data.readStrongBinder();
610            boolean timeout = data.readInt() == 1;
611            scheduleTranslucentConversionComplete(token, timeout);
612            reply.writeNoException();
613            return true;
614        }
615
616        case SET_PROCESS_STATE_TRANSACTION:
617        {
618            data.enforceInterface(IApplicationThread.descriptor);
619            int state = data.readInt();
620            setProcessState(state);
621            reply.writeNoException();
622            return true;
623        }
624
625        case SCHEDULE_INSTALL_PROVIDER_TRANSACTION:
626        {
627            data.enforceInterface(IApplicationThread.descriptor);
628            ProviderInfo provider = ProviderInfo.CREATOR.createFromParcel(data);
629            scheduleInstallProvider(provider);
630            reply.writeNoException();
631            return true;
632        }
633        }
634
635        return super.onTransact(code, data, reply, flags);
636    }
637
638    public IBinder asBinder()
639    {
640        return this;
641    }
642}
643
644class ApplicationThreadProxy implements IApplicationThread {
645    private final IBinder mRemote;
646
647    public ApplicationThreadProxy(IBinder remote) {
648        mRemote = remote;
649    }
650
651    public final IBinder asBinder() {
652        return mRemote;
653    }
654
655    public final void schedulePauseActivity(IBinder token, boolean finished,
656            boolean userLeaving, int configChanges) throws RemoteException {
657        Parcel data = Parcel.obtain();
658        data.writeInterfaceToken(IApplicationThread.descriptor);
659        data.writeStrongBinder(token);
660        data.writeInt(finished ? 1 : 0);
661        data.writeInt(userLeaving ? 1 :0);
662        data.writeInt(configChanges);
663        mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
664                IBinder.FLAG_ONEWAY);
665        data.recycle();
666    }
667
668    public final void scheduleStopActivity(IBinder token, boolean showWindow,
669            int configChanges) throws RemoteException {
670        Parcel data = Parcel.obtain();
671        data.writeInterfaceToken(IApplicationThread.descriptor);
672        data.writeStrongBinder(token);
673        data.writeInt(showWindow ? 1 : 0);
674        data.writeInt(configChanges);
675        mRemote.transact(SCHEDULE_STOP_ACTIVITY_TRANSACTION, data, null,
676                IBinder.FLAG_ONEWAY);
677        data.recycle();
678    }
679
680    public final void scheduleWindowVisibility(IBinder token,
681            boolean showWindow) throws RemoteException {
682        Parcel data = Parcel.obtain();
683        data.writeInterfaceToken(IApplicationThread.descriptor);
684        data.writeStrongBinder(token);
685        data.writeInt(showWindow ? 1 : 0);
686        mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null,
687                IBinder.FLAG_ONEWAY);
688        data.recycle();
689    }
690
691    public final void scheduleSleeping(IBinder token,
692            boolean sleeping) throws RemoteException {
693        Parcel data = Parcel.obtain();
694        data.writeInterfaceToken(IApplicationThread.descriptor);
695        data.writeStrongBinder(token);
696        data.writeInt(sleeping ? 1 : 0);
697        mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null,
698                IBinder.FLAG_ONEWAY);
699        data.recycle();
700    }
701
702    public final void scheduleResumeActivity(IBinder token, int procState, boolean isForward,
703            Bundle resumeArgs)
704            throws RemoteException {
705        Parcel data = Parcel.obtain();
706        data.writeInterfaceToken(IApplicationThread.descriptor);
707        data.writeStrongBinder(token);
708        data.writeInt(procState);
709        data.writeInt(isForward ? 1 : 0);
710        data.writeBundle(resumeArgs);
711        mRemote.transact(SCHEDULE_RESUME_ACTIVITY_TRANSACTION, data, null,
712                IBinder.FLAG_ONEWAY);
713        data.recycle();
714    }
715
716    public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
717            throws RemoteException {
718        Parcel data = Parcel.obtain();
719        data.writeInterfaceToken(IApplicationThread.descriptor);
720        data.writeStrongBinder(token);
721        data.writeTypedList(results);
722        mRemote.transact(SCHEDULE_SEND_RESULT_TRANSACTION, data, null,
723                IBinder.FLAG_ONEWAY);
724        data.recycle();
725    }
726
727    public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
728            ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,
729            int procState, Bundle state, List<ResultInfo> pendingResults,
730            List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
731            String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler,
732            Bundle resumeArgs)
733            throws RemoteException {
734        Parcel data = Parcel.obtain();
735        data.writeInterfaceToken(IApplicationThread.descriptor);
736        intent.writeToParcel(data, 0);
737        data.writeStrongBinder(token);
738        data.writeInt(ident);
739        info.writeToParcel(data, 0);
740        curConfig.writeToParcel(data, 0);
741        compatInfo.writeToParcel(data, 0);
742        data.writeInt(procState);
743        data.writeBundle(state);
744        data.writeTypedList(pendingResults);
745        data.writeTypedList(pendingNewIntents);
746        data.writeInt(notResumed ? 1 : 0);
747        data.writeInt(isForward ? 1 : 0);
748        data.writeString(profileName);
749        if (profileFd != null) {
750            data.writeInt(1);
751            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
752        } else {
753            data.writeInt(0);
754        }
755        data.writeInt(autoStopProfiler ? 1 : 0);
756        data.writeBundle(resumeArgs);
757        mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
758                IBinder.FLAG_ONEWAY);
759        data.recycle();
760    }
761
762    public final void scheduleRelaunchActivity(IBinder token,
763            List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
764            int configChanges, boolean notResumed, Configuration config)
765            throws RemoteException {
766        Parcel data = Parcel.obtain();
767        data.writeInterfaceToken(IApplicationThread.descriptor);
768        data.writeStrongBinder(token);
769        data.writeTypedList(pendingResults);
770        data.writeTypedList(pendingNewIntents);
771        data.writeInt(configChanges);
772        data.writeInt(notResumed ? 1 : 0);
773        if (config != null) {
774            data.writeInt(1);
775            config.writeToParcel(data, 0);
776        } else {
777            data.writeInt(0);
778        }
779        mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
780                IBinder.FLAG_ONEWAY);
781        data.recycle();
782    }
783
784    public void scheduleNewIntent(List<Intent> intents, IBinder token)
785            throws RemoteException {
786        Parcel data = Parcel.obtain();
787        data.writeInterfaceToken(IApplicationThread.descriptor);
788        data.writeTypedList(intents);
789        data.writeStrongBinder(token);
790        mRemote.transact(SCHEDULE_NEW_INTENT_TRANSACTION, data, null,
791                IBinder.FLAG_ONEWAY);
792        data.recycle();
793    }
794
795    public final void scheduleDestroyActivity(IBinder token, boolean finishing,
796            int configChanges) throws RemoteException {
797        Parcel data = Parcel.obtain();
798        data.writeInterfaceToken(IApplicationThread.descriptor);
799        data.writeStrongBinder(token);
800        data.writeInt(finishing ? 1 : 0);
801        data.writeInt(configChanges);
802        mRemote.transact(SCHEDULE_FINISH_ACTIVITY_TRANSACTION, data, null,
803                IBinder.FLAG_ONEWAY);
804        data.recycle();
805    }
806
807    public final void scheduleReceiver(Intent intent, ActivityInfo info,
808            CompatibilityInfo compatInfo, int resultCode, String resultData,
809            Bundle map, boolean sync, int sendingUser, int processState) throws RemoteException {
810        Parcel data = Parcel.obtain();
811        data.writeInterfaceToken(IApplicationThread.descriptor);
812        intent.writeToParcel(data, 0);
813        info.writeToParcel(data, 0);
814        compatInfo.writeToParcel(data, 0);
815        data.writeInt(resultCode);
816        data.writeString(resultData);
817        data.writeBundle(map);
818        data.writeInt(sync ? 1 : 0);
819        data.writeInt(sendingUser);
820        data.writeInt(processState);
821        mRemote.transact(SCHEDULE_RECEIVER_TRANSACTION, data, null,
822                IBinder.FLAG_ONEWAY);
823        data.recycle();
824    }
825
826    public final void scheduleCreateBackupAgent(ApplicationInfo app,
827            CompatibilityInfo compatInfo, int backupMode) throws RemoteException {
828        Parcel data = Parcel.obtain();
829        data.writeInterfaceToken(IApplicationThread.descriptor);
830        app.writeToParcel(data, 0);
831        compatInfo.writeToParcel(data, 0);
832        data.writeInt(backupMode);
833        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null,
834                IBinder.FLAG_ONEWAY);
835        data.recycle();
836    }
837
838    public final void scheduleDestroyBackupAgent(ApplicationInfo app,
839            CompatibilityInfo compatInfo) throws RemoteException {
840        Parcel data = Parcel.obtain();
841        data.writeInterfaceToken(IApplicationThread.descriptor);
842        app.writeToParcel(data, 0);
843        compatInfo.writeToParcel(data, 0);
844        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null,
845                IBinder.FLAG_ONEWAY);
846        data.recycle();
847    }
848
849    public final void scheduleCreateService(IBinder token, ServiceInfo info,
850            CompatibilityInfo compatInfo, int processState) throws RemoteException {
851        Parcel data = Parcel.obtain();
852        data.writeInterfaceToken(IApplicationThread.descriptor);
853        data.writeStrongBinder(token);
854        info.writeToParcel(data, 0);
855        compatInfo.writeToParcel(data, 0);
856        data.writeInt(processState);
857        mRemote.transact(SCHEDULE_CREATE_SERVICE_TRANSACTION, data, null,
858                IBinder.FLAG_ONEWAY);
859        data.recycle();
860    }
861
862    public final void scheduleBindService(IBinder token, Intent intent, boolean rebind,
863            int processState) throws RemoteException {
864        Parcel data = Parcel.obtain();
865        data.writeInterfaceToken(IApplicationThread.descriptor);
866        data.writeStrongBinder(token);
867        intent.writeToParcel(data, 0);
868        data.writeInt(rebind ? 1 : 0);
869        data.writeInt(processState);
870        mRemote.transact(SCHEDULE_BIND_SERVICE_TRANSACTION, data, null,
871                IBinder.FLAG_ONEWAY);
872        data.recycle();
873    }
874
875    public final void scheduleUnbindService(IBinder token, Intent intent)
876            throws RemoteException {
877        Parcel data = Parcel.obtain();
878        data.writeInterfaceToken(IApplicationThread.descriptor);
879        data.writeStrongBinder(token);
880        intent.writeToParcel(data, 0);
881        mRemote.transact(SCHEDULE_UNBIND_SERVICE_TRANSACTION, data, null,
882                IBinder.FLAG_ONEWAY);
883        data.recycle();
884    }
885
886    public final void scheduleServiceArgs(IBinder token, boolean taskRemoved, int startId,
887            int flags, Intent args) throws RemoteException {
888        Parcel data = Parcel.obtain();
889        data.writeInterfaceToken(IApplicationThread.descriptor);
890        data.writeStrongBinder(token);
891        data.writeInt(taskRemoved ? 1 : 0);
892        data.writeInt(startId);
893        data.writeInt(flags);
894        if (args != null) {
895            data.writeInt(1);
896            args.writeToParcel(data, 0);
897        } else {
898            data.writeInt(0);
899        }
900        mRemote.transact(SCHEDULE_SERVICE_ARGS_TRANSACTION, data, null,
901                IBinder.FLAG_ONEWAY);
902        data.recycle();
903    }
904
905    public final void scheduleStopService(IBinder token)
906            throws RemoteException {
907        Parcel data = Parcel.obtain();
908        data.writeInterfaceToken(IApplicationThread.descriptor);
909        data.writeStrongBinder(token);
910        mRemote.transact(SCHEDULE_STOP_SERVICE_TRANSACTION, data, null,
911                IBinder.FLAG_ONEWAY);
912        data.recycle();
913    }
914
915    public final void bindApplication(String packageName, ApplicationInfo info,
916            List<ProviderInfo> providers, ComponentName testName, String profileName,
917            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
918            IInstrumentationWatcher testWatcher,
919            IUiAutomationConnection uiAutomationConnection, int debugMode,
920            boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
921            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
922            Bundle coreSettings) throws RemoteException {
923        Parcel data = Parcel.obtain();
924        data.writeInterfaceToken(IApplicationThread.descriptor);
925        data.writeString(packageName);
926        info.writeToParcel(data, 0);
927        data.writeTypedList(providers);
928        if (testName == null) {
929            data.writeInt(0);
930        } else {
931            data.writeInt(1);
932            testName.writeToParcel(data, 0);
933        }
934        data.writeString(profileName);
935        if (profileFd != null) {
936            data.writeInt(1);
937            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
938        } else {
939            data.writeInt(0);
940        }
941        data.writeInt(autoStopProfiler ? 1 : 0);
942        data.writeBundle(testArgs);
943        data.writeStrongInterface(testWatcher);
944        data.writeStrongInterface(uiAutomationConnection);
945        data.writeInt(debugMode);
946        data.writeInt(openGlTrace ? 1 : 0);
947        data.writeInt(restrictedBackupMode ? 1 : 0);
948        data.writeInt(persistent ? 1 : 0);
949        config.writeToParcel(data, 0);
950        compatInfo.writeToParcel(data, 0);
951        data.writeMap(services);
952        data.writeBundle(coreSettings);
953        mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null,
954                IBinder.FLAG_ONEWAY);
955        data.recycle();
956    }
957
958    public final void scheduleExit() throws RemoteException {
959        Parcel data = Parcel.obtain();
960        data.writeInterfaceToken(IApplicationThread.descriptor);
961        mRemote.transact(SCHEDULE_EXIT_TRANSACTION, data, null,
962                IBinder.FLAG_ONEWAY);
963        data.recycle();
964    }
965
966    public final void scheduleSuicide() throws RemoteException {
967        Parcel data = Parcel.obtain();
968        data.writeInterfaceToken(IApplicationThread.descriptor);
969        mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null,
970                IBinder.FLAG_ONEWAY);
971        data.recycle();
972    }
973
974    public final void requestThumbnail(IBinder token)
975            throws RemoteException {
976        Parcel data = Parcel.obtain();
977        data.writeInterfaceToken(IApplicationThread.descriptor);
978        data.writeStrongBinder(token);
979        mRemote.transact(REQUEST_THUMBNAIL_TRANSACTION, data, null,
980                IBinder.FLAG_ONEWAY);
981        data.recycle();
982    }
983
984    public final void scheduleConfigurationChanged(Configuration config)
985            throws RemoteException {
986        Parcel data = Parcel.obtain();
987        data.writeInterfaceToken(IApplicationThread.descriptor);
988        config.writeToParcel(data, 0);
989        mRemote.transact(SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION, data, null,
990                IBinder.FLAG_ONEWAY);
991        data.recycle();
992    }
993
994    public void updateTimeZone() throws RemoteException {
995        Parcel data = Parcel.obtain();
996        data.writeInterfaceToken(IApplicationThread.descriptor);
997        mRemote.transact(UPDATE_TIME_ZONE_TRANSACTION, data, null,
998                IBinder.FLAG_ONEWAY);
999        data.recycle();
1000    }
1001
1002    public void clearDnsCache() throws RemoteException {
1003        Parcel data = Parcel.obtain();
1004        data.writeInterfaceToken(IApplicationThread.descriptor);
1005        mRemote.transact(CLEAR_DNS_CACHE_TRANSACTION, data, null,
1006                IBinder.FLAG_ONEWAY);
1007        data.recycle();
1008    }
1009
1010    public void setHttpProxy(String proxy, String port, String exclList,
1011            String pacFileUrl) throws RemoteException {
1012        Parcel data = Parcel.obtain();
1013        data.writeInterfaceToken(IApplicationThread.descriptor);
1014        data.writeString(proxy);
1015        data.writeString(port);
1016        data.writeString(exclList);
1017        data.writeString(pacFileUrl);
1018        mRemote.transact(SET_HTTP_PROXY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1019        data.recycle();
1020    }
1021
1022    public void processInBackground() throws RemoteException {
1023        Parcel data = Parcel.obtain();
1024        data.writeInterfaceToken(IApplicationThread.descriptor);
1025        mRemote.transact(PROCESS_IN_BACKGROUND_TRANSACTION, data, null,
1026                IBinder.FLAG_ONEWAY);
1027        data.recycle();
1028    }
1029
1030    public void dumpService(FileDescriptor fd, IBinder token, String[] args)
1031            throws RemoteException {
1032        Parcel data = Parcel.obtain();
1033        data.writeInterfaceToken(IApplicationThread.descriptor);
1034        data.writeFileDescriptor(fd);
1035        data.writeStrongBinder(token);
1036        data.writeStringArray(args);
1037        mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1038        data.recycle();
1039    }
1040
1041    public void dumpProvider(FileDescriptor fd, IBinder token, String[] args)
1042            throws RemoteException {
1043        Parcel data = Parcel.obtain();
1044        data.writeInterfaceToken(IApplicationThread.descriptor);
1045        data.writeFileDescriptor(fd);
1046        data.writeStrongBinder(token);
1047        data.writeStringArray(args);
1048        mRemote.transact(DUMP_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1049        data.recycle();
1050    }
1051
1052    public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
1053            int resultCode, String dataStr, Bundle extras, boolean ordered,
1054            boolean sticky, int sendingUser, int processState) throws RemoteException {
1055        Parcel data = Parcel.obtain();
1056        data.writeInterfaceToken(IApplicationThread.descriptor);
1057        data.writeStrongBinder(receiver.asBinder());
1058        intent.writeToParcel(data, 0);
1059        data.writeInt(resultCode);
1060        data.writeString(dataStr);
1061        data.writeBundle(extras);
1062        data.writeInt(ordered ? 1 : 0);
1063        data.writeInt(sticky ? 1 : 0);
1064        data.writeInt(sendingUser);
1065        data.writeInt(processState);
1066        mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
1067                IBinder.FLAG_ONEWAY);
1068        data.recycle();
1069    }
1070
1071    public final void scheduleLowMemory() throws RemoteException {
1072        Parcel data = Parcel.obtain();
1073        data.writeInterfaceToken(IApplicationThread.descriptor);
1074        mRemote.transact(SCHEDULE_LOW_MEMORY_TRANSACTION, data, null,
1075                IBinder.FLAG_ONEWAY);
1076        data.recycle();
1077    }
1078
1079    public final void scheduleActivityConfigurationChanged(
1080            IBinder token) throws RemoteException {
1081        Parcel data = Parcel.obtain();
1082        data.writeInterfaceToken(IApplicationThread.descriptor);
1083        data.writeStrongBinder(token);
1084        mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
1085                IBinder.FLAG_ONEWAY);
1086        data.recycle();
1087    }
1088
1089    public void profilerControl(boolean start, String path,
1090            ParcelFileDescriptor fd, int profileType) throws RemoteException {
1091        Parcel data = Parcel.obtain();
1092        data.writeInterfaceToken(IApplicationThread.descriptor);
1093        data.writeInt(start ? 1 : 0);
1094        data.writeInt(profileType);
1095        data.writeString(path);
1096        if (fd != null) {
1097            data.writeInt(1);
1098            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1099        } else {
1100            data.writeInt(0);
1101        }
1102        mRemote.transact(PROFILER_CONTROL_TRANSACTION, data, null,
1103                IBinder.FLAG_ONEWAY);
1104        data.recycle();
1105    }
1106
1107    public void setSchedulingGroup(int group) throws RemoteException {
1108        Parcel data = Parcel.obtain();
1109        data.writeInterfaceToken(IApplicationThread.descriptor);
1110        data.writeInt(group);
1111        mRemote.transact(SET_SCHEDULING_GROUP_TRANSACTION, data, null,
1112                IBinder.FLAG_ONEWAY);
1113        data.recycle();
1114    }
1115
1116    public void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException {
1117        Parcel data = Parcel.obtain();
1118        data.writeInterfaceToken(IApplicationThread.descriptor);
1119        data.writeInt(cmd);
1120        data.writeStringArray(packages);
1121        mRemote.transact(DISPATCH_PACKAGE_BROADCAST_TRANSACTION, data, null,
1122                IBinder.FLAG_ONEWAY);
1123        data.recycle();
1124
1125    }
1126
1127    public void scheduleCrash(String msg) throws RemoteException {
1128        Parcel data = Parcel.obtain();
1129        data.writeInterfaceToken(IApplicationThread.descriptor);
1130        data.writeString(msg);
1131        mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
1132                IBinder.FLAG_ONEWAY);
1133        data.recycle();
1134
1135    }
1136
1137    public void dumpHeap(boolean managed, String path,
1138            ParcelFileDescriptor fd) throws RemoteException {
1139        Parcel data = Parcel.obtain();
1140        data.writeInterfaceToken(IApplicationThread.descriptor);
1141        data.writeInt(managed ? 1 : 0);
1142        data.writeString(path);
1143        if (fd != null) {
1144            data.writeInt(1);
1145            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1146        } else {
1147            data.writeInt(0);
1148        }
1149        mRemote.transact(DUMP_HEAP_TRANSACTION, data, null,
1150                IBinder.FLAG_ONEWAY);
1151        data.recycle();
1152    }
1153
1154    public void dumpActivity(FileDescriptor fd, IBinder token, String prefix, String[] args)
1155            throws RemoteException {
1156        Parcel data = Parcel.obtain();
1157        data.writeInterfaceToken(IApplicationThread.descriptor);
1158        data.writeFileDescriptor(fd);
1159        data.writeStrongBinder(token);
1160        data.writeString(prefix);
1161        data.writeStringArray(args);
1162        mRemote.transact(DUMP_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1163        data.recycle();
1164    }
1165
1166    public void setCoreSettings(Bundle coreSettings) throws RemoteException {
1167        Parcel data = Parcel.obtain();
1168        data.writeInterfaceToken(IApplicationThread.descriptor);
1169        data.writeBundle(coreSettings);
1170        mRemote.transact(SET_CORE_SETTINGS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1171    }
1172
1173    public void updatePackageCompatibilityInfo(String pkg, CompatibilityInfo info)
1174            throws RemoteException {
1175        Parcel data = Parcel.obtain();
1176        data.writeInterfaceToken(IApplicationThread.descriptor);
1177        data.writeString(pkg);
1178        info.writeToParcel(data, 0);
1179        mRemote.transact(UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION, data, null,
1180                IBinder.FLAG_ONEWAY);
1181    }
1182
1183    public void scheduleTrimMemory(int level) throws RemoteException {
1184        Parcel data = Parcel.obtain();
1185        data.writeInterfaceToken(IApplicationThread.descriptor);
1186        data.writeInt(level);
1187        mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null,
1188                IBinder.FLAG_ONEWAY);
1189    }
1190
1191    public void dumpMemInfo(FileDescriptor fd, Debug.MemoryInfo mem, boolean checkin,
1192            boolean dumpInfo, boolean dumpDalvik, String[] args) throws RemoteException {
1193        Parcel data = Parcel.obtain();
1194        Parcel reply = Parcel.obtain();
1195        data.writeInterfaceToken(IApplicationThread.descriptor);
1196        data.writeFileDescriptor(fd);
1197        mem.writeToParcel(data, 0);
1198        data.writeInt(checkin ? 1 : 0);
1199        data.writeInt(dumpInfo ? 1 : 0);
1200        data.writeInt(dumpDalvik ? 1 : 0);
1201        data.writeStringArray(args);
1202        mRemote.transact(DUMP_MEM_INFO_TRANSACTION, data, reply, 0);
1203        reply.readException();
1204        data.recycle();
1205        reply.recycle();
1206    }
1207
1208    public void dumpGfxInfo(FileDescriptor fd, String[] args) throws RemoteException {
1209        Parcel data = Parcel.obtain();
1210        data.writeInterfaceToken(IApplicationThread.descriptor);
1211        data.writeFileDescriptor(fd);
1212        data.writeStringArray(args);
1213        mRemote.transact(DUMP_GFX_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1214        data.recycle();
1215    }
1216
1217    public void dumpDbInfo(FileDescriptor fd, String[] args) throws RemoteException {
1218        Parcel data = Parcel.obtain();
1219        data.writeInterfaceToken(IApplicationThread.descriptor);
1220        data.writeFileDescriptor(fd);
1221        data.writeStringArray(args);
1222        mRemote.transact(DUMP_DB_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1223        data.recycle();
1224    }
1225
1226    @Override
1227    public void unstableProviderDied(IBinder provider) throws RemoteException {
1228        Parcel data = Parcel.obtain();
1229        data.writeInterfaceToken(IApplicationThread.descriptor);
1230        data.writeStrongBinder(provider);
1231        mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1232        data.recycle();
1233    }
1234
1235    @Override
1236    public void requestAssistContextExtras(IBinder activityToken, IBinder requestToken,
1237            int requestType) throws RemoteException {
1238        Parcel data = Parcel.obtain();
1239        data.writeInterfaceToken(IApplicationThread.descriptor);
1240        data.writeStrongBinder(activityToken);
1241        data.writeStrongBinder(requestToken);
1242        data.writeInt(requestType);
1243        mRemote.transact(REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION, data, null,
1244                IBinder.FLAG_ONEWAY);
1245        data.recycle();
1246    }
1247
1248    @Override
1249    public void scheduleTranslucentConversionComplete(IBinder token, boolean timeout)
1250            throws RemoteException {
1251        Parcel data = Parcel.obtain();
1252        data.writeInterfaceToken(IApplicationThread.descriptor);
1253        data.writeStrongBinder(token);
1254        data.writeInt(timeout ? 1 : 0);
1255        mRemote.transact(SCHEDULE_TRANSLUCENT_CONVERSION_COMPLETE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1256        data.recycle();
1257    }
1258
1259    @Override
1260    public void setProcessState(int state) throws RemoteException {
1261        Parcel data = Parcel.obtain();
1262        data.writeInterfaceToken(IApplicationThread.descriptor);
1263        data.writeInt(state);
1264        mRemote.transact(SET_PROCESS_STATE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1265        data.recycle();
1266    }
1267
1268    @Override
1269    public void scheduleInstallProvider(ProviderInfo provider) throws RemoteException {
1270        Parcel data = Parcel.obtain();
1271        data.writeInterfaceToken(IApplicationThread.descriptor);
1272        provider.writeToParcel(data, 0);
1273        mRemote.transact(SCHEDULE_INSTALL_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1274        data.recycle();
1275    }
1276}
1277