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