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