ApplicationThreadNative.java revision a413dc06b2193442a2d956571b829aeb5fb97862
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                    ? data.readFileDescriptor() : 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                    ? data.readFileDescriptor() : 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            setHttpProxy(proxy, port, exclList);
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                    ? data.readFileDescriptor() : 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 GET_MEMORY_INFO_TRANSACTION:
453        {
454            data.enforceInterface(IApplicationThread.descriptor);
455            Debug.MemoryInfo mi = new Debug.MemoryInfo();
456            getMemoryInfo(mi);
457            reply.writeNoException();
458            mi.writeToParcel(reply, 0);
459            return true;
460        }
461
462        case DISPATCH_PACKAGE_BROADCAST_TRANSACTION:
463        {
464            data.enforceInterface(IApplicationThread.descriptor);
465            int cmd = data.readInt();
466            String[] packages = data.readStringArray();
467            dispatchPackageBroadcast(cmd, packages);
468            return true;
469        }
470
471        case SCHEDULE_CRASH_TRANSACTION:
472        {
473            data.enforceInterface(IApplicationThread.descriptor);
474            String msg = data.readString();
475            scheduleCrash(msg);
476            return true;
477        }
478
479        case DUMP_HEAP_TRANSACTION:
480        {
481            data.enforceInterface(IApplicationThread.descriptor);
482            boolean managed = data.readInt() != 0;
483            String path = data.readString();
484            ParcelFileDescriptor fd = data.readInt() != 0
485                    ? data.readFileDescriptor() : null;
486            dumpHeap(managed, path, fd);
487            return true;
488        }
489
490        case DUMP_ACTIVITY_TRANSACTION: {
491            data.enforceInterface(IApplicationThread.descriptor);
492            ParcelFileDescriptor fd = data.readFileDescriptor();
493            final IBinder activity = data.readStrongBinder();
494            final String prefix = data.readString();
495            final String[] args = data.readStringArray();
496            if (fd != null) {
497                dumpActivity(fd.getFileDescriptor(), activity, prefix, args);
498                try {
499                    fd.close();
500                } catch (IOException e) {
501                }
502            }
503            return true;
504        }
505
506        case SET_CORE_SETTINGS_TRANSACTION: {
507            data.enforceInterface(IApplicationThread.descriptor);
508            Bundle settings = data.readBundle();
509            setCoreSettings(settings);
510            return true;
511        }
512
513        case UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION: {
514            data.enforceInterface(IApplicationThread.descriptor);
515            String pkg = data.readString();
516            CompatibilityInfo compat = CompatibilityInfo.CREATOR.createFromParcel(data);
517            updatePackageCompatibilityInfo(pkg, compat);
518            return true;
519        }
520
521        case SCHEDULE_TRIM_MEMORY_TRANSACTION: {
522            data.enforceInterface(IApplicationThread.descriptor);
523            int level = data.readInt();
524            scheduleTrimMemory(level);
525            return true;
526        }
527
528        case DUMP_MEM_INFO_TRANSACTION:
529        {
530            data.enforceInterface(IApplicationThread.descriptor);
531            ParcelFileDescriptor fd = data.readFileDescriptor();
532            boolean checkin = data.readInt() != 0;
533            boolean dumpInfo = data.readInt() != 0;
534            boolean dumpDalvik = data.readInt() != 0;
535            String[] args = data.readStringArray();
536            Debug.MemoryInfo mi = null;
537            if (fd != null) {
538                try {
539                    mi = dumpMemInfo(fd.getFileDescriptor(), checkin, dumpInfo, dumpDalvik, args);
540                } finally {
541                    try {
542                        fd.close();
543                    } catch (IOException e) {
544                        // swallowed, not propagated back to the caller
545                    }
546                }
547            }
548            reply.writeNoException();
549            mi.writeToParcel(reply, 0);
550            return true;
551        }
552
553        case DUMP_GFX_INFO_TRANSACTION:
554        {
555            data.enforceInterface(IApplicationThread.descriptor);
556            ParcelFileDescriptor fd = data.readFileDescriptor();
557            String[] args = data.readStringArray();
558            if (fd != null) {
559                try {
560                    dumpGfxInfo(fd.getFileDescriptor(), args);
561                } finally {
562                    try {
563                        fd.close();
564                    } catch (IOException e) {
565                        // swallowed, not propagated back to the caller
566                    }
567                }
568            }
569            reply.writeNoException();
570            return true;
571        }
572
573        case DUMP_DB_INFO_TRANSACTION:
574        {
575            data.enforceInterface(IApplicationThread.descriptor);
576            ParcelFileDescriptor fd = data.readFileDescriptor();
577            String[] args = data.readStringArray();
578            if (fd != null) {
579                try {
580                    dumpDbInfo(fd.getFileDescriptor(), args);
581                } finally {
582                    try {
583                        fd.close();
584                    } catch (IOException e) {
585                        // swallowed, not propagated back to the caller
586                    }
587                }
588            }
589            reply.writeNoException();
590            return true;
591        }
592
593        case UNSTABLE_PROVIDER_DIED_TRANSACTION:
594        {
595            data.enforceInterface(IApplicationThread.descriptor);
596            IBinder provider = data.readStrongBinder();
597            unstableProviderDied(provider);
598            reply.writeNoException();
599            return true;
600        }
601
602        case REQUEST_ACTIVITY_EXTRAS_TRANSACTION:
603        {
604            data.enforceInterface(IApplicationThread.descriptor);
605            IBinder activityToken = data.readStrongBinder();
606            IBinder requestToken = data.readStrongBinder();
607            int requestType = data.readInt();
608            requestActivityExtras(activityToken, requestToken, requestType);
609            reply.writeNoException();
610            return true;
611        }
612
613        case SCHEDULE_TRANSLUCENT_CONVERSION_COMPLETE_TRANSACTION:
614        {
615            data.enforceInterface(IApplicationThread.descriptor);
616            IBinder token = data.readStrongBinder();
617            boolean timeout = data.readInt() == 1;
618            scheduleTranslucentConversionComplete(token, timeout);
619            reply.writeNoException();
620            return true;
621        }
622
623        case SET_PROCESS_STATE_TRANSACTION:
624        {
625            data.enforceInterface(IApplicationThread.descriptor);
626            int state = data.readInt();
627            setProcessState(state);
628            reply.writeNoException();
629            return true;
630        }
631        }
632
633        return super.onTransact(code, data, reply, flags);
634    }
635
636    public IBinder asBinder()
637    {
638        return this;
639    }
640}
641
642class ApplicationThreadProxy implements IApplicationThread {
643    private final IBinder mRemote;
644
645    public ApplicationThreadProxy(IBinder remote) {
646        mRemote = remote;
647    }
648
649    public final IBinder asBinder() {
650        return mRemote;
651    }
652
653    public final void schedulePauseActivity(IBinder token, boolean finished,
654            boolean userLeaving, int configChanges) throws RemoteException {
655        Parcel data = Parcel.obtain();
656        data.writeInterfaceToken(IApplicationThread.descriptor);
657        data.writeStrongBinder(token);
658        data.writeInt(finished ? 1 : 0);
659        data.writeInt(userLeaving ? 1 :0);
660        data.writeInt(configChanges);
661        mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
662                IBinder.FLAG_ONEWAY);
663        data.recycle();
664    }
665
666    public final void scheduleStopActivity(IBinder token, boolean showWindow,
667            int configChanges) throws RemoteException {
668        Parcel data = Parcel.obtain();
669        data.writeInterfaceToken(IApplicationThread.descriptor);
670        data.writeStrongBinder(token);
671        data.writeInt(showWindow ? 1 : 0);
672        data.writeInt(configChanges);
673        mRemote.transact(SCHEDULE_STOP_ACTIVITY_TRANSACTION, data, null,
674                IBinder.FLAG_ONEWAY);
675        data.recycle();
676    }
677
678    public final void scheduleWindowVisibility(IBinder token,
679            boolean showWindow) throws RemoteException {
680        Parcel data = Parcel.obtain();
681        data.writeInterfaceToken(IApplicationThread.descriptor);
682        data.writeStrongBinder(token);
683        data.writeInt(showWindow ? 1 : 0);
684        mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null,
685                IBinder.FLAG_ONEWAY);
686        data.recycle();
687    }
688
689    public final void scheduleSleeping(IBinder token,
690            boolean sleeping) throws RemoteException {
691        Parcel data = Parcel.obtain();
692        data.writeInterfaceToken(IApplicationThread.descriptor);
693        data.writeStrongBinder(token);
694        data.writeInt(sleeping ? 1 : 0);
695        mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null,
696                IBinder.FLAG_ONEWAY);
697        data.recycle();
698    }
699
700    public final void scheduleResumeActivity(IBinder token, int procState, boolean isForward)
701            throws RemoteException {
702        Parcel data = Parcel.obtain();
703        data.writeInterfaceToken(IApplicationThread.descriptor);
704        data.writeStrongBinder(token);
705        data.writeInt(procState);
706        data.writeInt(isForward ? 1 : 0);
707        mRemote.transact(SCHEDULE_RESUME_ACTIVITY_TRANSACTION, data, null,
708                IBinder.FLAG_ONEWAY);
709        data.recycle();
710    }
711
712    public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
713    		throws RemoteException {
714        Parcel data = Parcel.obtain();
715        data.writeInterfaceToken(IApplicationThread.descriptor);
716        data.writeStrongBinder(token);
717        data.writeTypedList(results);
718        mRemote.transact(SCHEDULE_SEND_RESULT_TRANSACTION, data, null,
719                IBinder.FLAG_ONEWAY);
720        data.recycle();
721    }
722
723    public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
724            ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,
725            int procState, Bundle state, List<ResultInfo> pendingResults,
726    		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
727    		String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
728    		throws RemoteException {
729        Parcel data = Parcel.obtain();
730        data.writeInterfaceToken(IApplicationThread.descriptor);
731        intent.writeToParcel(data, 0);
732        data.writeStrongBinder(token);
733        data.writeInt(ident);
734        info.writeToParcel(data, 0);
735        curConfig.writeToParcel(data, 0);
736        compatInfo.writeToParcel(data, 0);
737        data.writeInt(procState);
738        data.writeBundle(state);
739        data.writeTypedList(pendingResults);
740        data.writeTypedList(pendingNewIntents);
741        data.writeInt(notResumed ? 1 : 0);
742        data.writeInt(isForward ? 1 : 0);
743        data.writeString(profileName);
744        if (profileFd != null) {
745            data.writeInt(1);
746            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
747        } else {
748            data.writeInt(0);
749        }
750        data.writeInt(autoStopProfiler ? 1 : 0);
751        mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
752                IBinder.FLAG_ONEWAY);
753        data.recycle();
754    }
755
756    public final void scheduleRelaunchActivity(IBinder token,
757            List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
758            int configChanges, boolean notResumed, Configuration config)
759            throws RemoteException {
760        Parcel data = Parcel.obtain();
761        data.writeInterfaceToken(IApplicationThread.descriptor);
762        data.writeStrongBinder(token);
763        data.writeTypedList(pendingResults);
764        data.writeTypedList(pendingNewIntents);
765        data.writeInt(configChanges);
766        data.writeInt(notResumed ? 1 : 0);
767        if (config != null) {
768            data.writeInt(1);
769            config.writeToParcel(data, 0);
770        } else {
771            data.writeInt(0);
772        }
773        mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
774                IBinder.FLAG_ONEWAY);
775        data.recycle();
776    }
777
778    public void scheduleNewIntent(List<Intent> intents, IBinder token)
779            throws RemoteException {
780        Parcel data = Parcel.obtain();
781        data.writeInterfaceToken(IApplicationThread.descriptor);
782        data.writeTypedList(intents);
783        data.writeStrongBinder(token);
784        mRemote.transact(SCHEDULE_NEW_INTENT_TRANSACTION, data, null,
785                IBinder.FLAG_ONEWAY);
786        data.recycle();
787    }
788
789    public final void scheduleDestroyActivity(IBinder token, boolean finishing,
790            int configChanges) throws RemoteException {
791        Parcel data = Parcel.obtain();
792        data.writeInterfaceToken(IApplicationThread.descriptor);
793        data.writeStrongBinder(token);
794        data.writeInt(finishing ? 1 : 0);
795        data.writeInt(configChanges);
796        mRemote.transact(SCHEDULE_FINISH_ACTIVITY_TRANSACTION, data, null,
797                IBinder.FLAG_ONEWAY);
798        data.recycle();
799    }
800
801    public final void scheduleReceiver(Intent intent, ActivityInfo info,
802            CompatibilityInfo compatInfo, int resultCode, String resultData,
803            Bundle map, boolean sync, int sendingUser, int processState) throws RemoteException {
804        Parcel data = Parcel.obtain();
805        data.writeInterfaceToken(IApplicationThread.descriptor);
806        intent.writeToParcel(data, 0);
807        info.writeToParcel(data, 0);
808        compatInfo.writeToParcel(data, 0);
809        data.writeInt(resultCode);
810        data.writeString(resultData);
811        data.writeBundle(map);
812        data.writeInt(sync ? 1 : 0);
813        data.writeInt(sendingUser);
814        data.writeInt(processState);
815        mRemote.transact(SCHEDULE_RECEIVER_TRANSACTION, data, null,
816                IBinder.FLAG_ONEWAY);
817        data.recycle();
818    }
819
820    public final void scheduleCreateBackupAgent(ApplicationInfo app,
821            CompatibilityInfo compatInfo, int backupMode) throws RemoteException {
822        Parcel data = Parcel.obtain();
823        data.writeInterfaceToken(IApplicationThread.descriptor);
824        app.writeToParcel(data, 0);
825        compatInfo.writeToParcel(data, 0);
826        data.writeInt(backupMode);
827        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null,
828                IBinder.FLAG_ONEWAY);
829        data.recycle();
830    }
831
832    public final void scheduleDestroyBackupAgent(ApplicationInfo app,
833            CompatibilityInfo compatInfo) throws RemoteException {
834        Parcel data = Parcel.obtain();
835        data.writeInterfaceToken(IApplicationThread.descriptor);
836        app.writeToParcel(data, 0);
837        compatInfo.writeToParcel(data, 0);
838        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null,
839                IBinder.FLAG_ONEWAY);
840        data.recycle();
841    }
842
843    public final void scheduleCreateService(IBinder token, ServiceInfo info,
844            CompatibilityInfo compatInfo, int processState) throws RemoteException {
845        Parcel data = Parcel.obtain();
846        data.writeInterfaceToken(IApplicationThread.descriptor);
847        data.writeStrongBinder(token);
848        info.writeToParcel(data, 0);
849        compatInfo.writeToParcel(data, 0);
850        data.writeInt(processState);
851        mRemote.transact(SCHEDULE_CREATE_SERVICE_TRANSACTION, data, null,
852                IBinder.FLAG_ONEWAY);
853        data.recycle();
854    }
855
856    public final void scheduleBindService(IBinder token, Intent intent, boolean rebind,
857            int processState) throws RemoteException {
858        Parcel data = Parcel.obtain();
859        data.writeInterfaceToken(IApplicationThread.descriptor);
860        data.writeStrongBinder(token);
861        intent.writeToParcel(data, 0);
862        data.writeInt(rebind ? 1 : 0);
863        data.writeInt(processState);
864        mRemote.transact(SCHEDULE_BIND_SERVICE_TRANSACTION, data, null,
865                IBinder.FLAG_ONEWAY);
866        data.recycle();
867    }
868
869    public final void scheduleUnbindService(IBinder token, Intent intent)
870            throws RemoteException {
871        Parcel data = Parcel.obtain();
872        data.writeInterfaceToken(IApplicationThread.descriptor);
873        data.writeStrongBinder(token);
874        intent.writeToParcel(data, 0);
875        mRemote.transact(SCHEDULE_UNBIND_SERVICE_TRANSACTION, data, null,
876                IBinder.FLAG_ONEWAY);
877        data.recycle();
878    }
879
880    public final void scheduleServiceArgs(IBinder token, boolean taskRemoved, int startId,
881	    int flags, Intent args) throws RemoteException {
882        Parcel data = Parcel.obtain();
883        data.writeInterfaceToken(IApplicationThread.descriptor);
884        data.writeStrongBinder(token);
885        data.writeInt(taskRemoved ? 1 : 0);
886        data.writeInt(startId);
887        data.writeInt(flags);
888        if (args != null) {
889            data.writeInt(1);
890            args.writeToParcel(data, 0);
891        } else {
892            data.writeInt(0);
893        }
894        mRemote.transact(SCHEDULE_SERVICE_ARGS_TRANSACTION, data, null,
895                IBinder.FLAG_ONEWAY);
896        data.recycle();
897    }
898
899    public final void scheduleStopService(IBinder token)
900            throws RemoteException {
901        Parcel data = Parcel.obtain();
902        data.writeInterfaceToken(IApplicationThread.descriptor);
903        data.writeStrongBinder(token);
904        mRemote.transact(SCHEDULE_STOP_SERVICE_TRANSACTION, data, null,
905                IBinder.FLAG_ONEWAY);
906        data.recycle();
907    }
908
909    public final void bindApplication(String packageName, ApplicationInfo info,
910            List<ProviderInfo> providers, ComponentName testName, String profileName,
911            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
912            IInstrumentationWatcher testWatcher,
913            IUiAutomationConnection uiAutomationConnection, int debugMode,
914            boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
915            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
916            Bundle coreSettings) throws RemoteException {
917        Parcel data = Parcel.obtain();
918        data.writeInterfaceToken(IApplicationThread.descriptor);
919        data.writeString(packageName);
920        info.writeToParcel(data, 0);
921        data.writeTypedList(providers);
922        if (testName == null) {
923            data.writeInt(0);
924        } else {
925            data.writeInt(1);
926            testName.writeToParcel(data, 0);
927        }
928        data.writeString(profileName);
929        if (profileFd != null) {
930            data.writeInt(1);
931            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
932        } else {
933            data.writeInt(0);
934        }
935        data.writeInt(autoStopProfiler ? 1 : 0);
936        data.writeBundle(testArgs);
937        data.writeStrongInterface(testWatcher);
938        data.writeStrongInterface(uiAutomationConnection);
939        data.writeInt(debugMode);
940        data.writeInt(openGlTrace ? 1 : 0);
941        data.writeInt(restrictedBackupMode ? 1 : 0);
942        data.writeInt(persistent ? 1 : 0);
943        config.writeToParcel(data, 0);
944        compatInfo.writeToParcel(data, 0);
945        data.writeMap(services);
946        data.writeBundle(coreSettings);
947        mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null,
948                IBinder.FLAG_ONEWAY);
949        data.recycle();
950    }
951
952    public final void scheduleExit() throws RemoteException {
953        Parcel data = Parcel.obtain();
954        data.writeInterfaceToken(IApplicationThread.descriptor);
955        mRemote.transact(SCHEDULE_EXIT_TRANSACTION, data, null,
956                IBinder.FLAG_ONEWAY);
957        data.recycle();
958    }
959
960    public final void scheduleSuicide() throws RemoteException {
961        Parcel data = Parcel.obtain();
962        data.writeInterfaceToken(IApplicationThread.descriptor);
963        mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null,
964                IBinder.FLAG_ONEWAY);
965        data.recycle();
966    }
967
968    public final void requestThumbnail(IBinder token)
969            throws RemoteException {
970        Parcel data = Parcel.obtain();
971        data.writeInterfaceToken(IApplicationThread.descriptor);
972        data.writeStrongBinder(token);
973        mRemote.transact(REQUEST_THUMBNAIL_TRANSACTION, data, null,
974                IBinder.FLAG_ONEWAY);
975        data.recycle();
976    }
977
978    public final void scheduleConfigurationChanged(Configuration config)
979            throws RemoteException {
980        Parcel data = Parcel.obtain();
981        data.writeInterfaceToken(IApplicationThread.descriptor);
982        config.writeToParcel(data, 0);
983        mRemote.transact(SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION, data, null,
984                IBinder.FLAG_ONEWAY);
985        data.recycle();
986    }
987
988    public void updateTimeZone() throws RemoteException {
989        Parcel data = Parcel.obtain();
990        data.writeInterfaceToken(IApplicationThread.descriptor);
991        mRemote.transact(UPDATE_TIME_ZONE_TRANSACTION, data, null,
992                IBinder.FLAG_ONEWAY);
993        data.recycle();
994    }
995
996    public void clearDnsCache() throws RemoteException {
997        Parcel data = Parcel.obtain();
998        data.writeInterfaceToken(IApplicationThread.descriptor);
999        mRemote.transact(CLEAR_DNS_CACHE_TRANSACTION, data, null,
1000                IBinder.FLAG_ONEWAY);
1001        data.recycle();
1002    }
1003
1004    public void setHttpProxy(String proxy, String port, String exclList) throws RemoteException {
1005        Parcel data = Parcel.obtain();
1006        data.writeInterfaceToken(IApplicationThread.descriptor);
1007        data.writeString(proxy);
1008        data.writeString(port);
1009        data.writeString(exclList);
1010        mRemote.transact(SET_HTTP_PROXY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1011        data.recycle();
1012    }
1013
1014    public void processInBackground() throws RemoteException {
1015        Parcel data = Parcel.obtain();
1016        data.writeInterfaceToken(IApplicationThread.descriptor);
1017        mRemote.transact(PROCESS_IN_BACKGROUND_TRANSACTION, data, null,
1018                IBinder.FLAG_ONEWAY);
1019        data.recycle();
1020    }
1021
1022    public void dumpService(FileDescriptor fd, IBinder token, String[] args)
1023            throws RemoteException {
1024        Parcel data = Parcel.obtain();
1025        data.writeInterfaceToken(IApplicationThread.descriptor);
1026        data.writeFileDescriptor(fd);
1027        data.writeStrongBinder(token);
1028        data.writeStringArray(args);
1029        mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1030        data.recycle();
1031    }
1032
1033    public void dumpProvider(FileDescriptor fd, IBinder token, String[] args)
1034            throws RemoteException {
1035        Parcel data = Parcel.obtain();
1036        data.writeInterfaceToken(IApplicationThread.descriptor);
1037        data.writeFileDescriptor(fd);
1038        data.writeStrongBinder(token);
1039        data.writeStringArray(args);
1040        mRemote.transact(DUMP_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1041        data.recycle();
1042    }
1043
1044    public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
1045            int resultCode, String dataStr, Bundle extras, boolean ordered,
1046            boolean sticky, int sendingUser, int processState) throws RemoteException {
1047        Parcel data = Parcel.obtain();
1048        data.writeInterfaceToken(IApplicationThread.descriptor);
1049        data.writeStrongBinder(receiver.asBinder());
1050        intent.writeToParcel(data, 0);
1051        data.writeInt(resultCode);
1052        data.writeString(dataStr);
1053        data.writeBundle(extras);
1054        data.writeInt(ordered ? 1 : 0);
1055        data.writeInt(sticky ? 1 : 0);
1056        data.writeInt(sendingUser);
1057        data.writeInt(processState);
1058        mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
1059                IBinder.FLAG_ONEWAY);
1060        data.recycle();
1061    }
1062
1063    public final void scheduleLowMemory() throws RemoteException {
1064        Parcel data = Parcel.obtain();
1065        data.writeInterfaceToken(IApplicationThread.descriptor);
1066        mRemote.transact(SCHEDULE_LOW_MEMORY_TRANSACTION, data, null,
1067                IBinder.FLAG_ONEWAY);
1068        data.recycle();
1069    }
1070
1071    public final void scheduleActivityConfigurationChanged(
1072            IBinder token) throws RemoteException {
1073        Parcel data = Parcel.obtain();
1074        data.writeInterfaceToken(IApplicationThread.descriptor);
1075        data.writeStrongBinder(token);
1076        mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
1077                IBinder.FLAG_ONEWAY);
1078        data.recycle();
1079    }
1080
1081    public void profilerControl(boolean start, String path,
1082            ParcelFileDescriptor fd, int profileType) throws RemoteException {
1083        Parcel data = Parcel.obtain();
1084        data.writeInterfaceToken(IApplicationThread.descriptor);
1085        data.writeInt(start ? 1 : 0);
1086        data.writeInt(profileType);
1087        data.writeString(path);
1088        if (fd != null) {
1089            data.writeInt(1);
1090            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1091        } else {
1092            data.writeInt(0);
1093        }
1094        mRemote.transact(PROFILER_CONTROL_TRANSACTION, data, null,
1095                IBinder.FLAG_ONEWAY);
1096        data.recycle();
1097    }
1098
1099    public void setSchedulingGroup(int group) throws RemoteException {
1100        Parcel data = Parcel.obtain();
1101        data.writeInterfaceToken(IApplicationThread.descriptor);
1102        data.writeInt(group);
1103        mRemote.transact(SET_SCHEDULING_GROUP_TRANSACTION, data, null,
1104                IBinder.FLAG_ONEWAY);
1105        data.recycle();
1106    }
1107
1108    public void getMemoryInfo(Debug.MemoryInfo outInfo) throws RemoteException {
1109        Parcel data = Parcel.obtain();
1110        Parcel reply = Parcel.obtain();
1111        data.writeInterfaceToken(IApplicationThread.descriptor);
1112        mRemote.transact(GET_MEMORY_INFO_TRANSACTION, data, reply, 0);
1113        reply.readException();
1114        outInfo.readFromParcel(reply);
1115        data.recycle();
1116        reply.recycle();
1117    }
1118
1119    public void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException {
1120        Parcel data = Parcel.obtain();
1121        data.writeInterfaceToken(IApplicationThread.descriptor);
1122        data.writeInt(cmd);
1123        data.writeStringArray(packages);
1124        mRemote.transact(DISPATCH_PACKAGE_BROADCAST_TRANSACTION, data, null,
1125                IBinder.FLAG_ONEWAY);
1126        data.recycle();
1127
1128    }
1129
1130    public void scheduleCrash(String msg) throws RemoteException {
1131        Parcel data = Parcel.obtain();
1132        data.writeInterfaceToken(IApplicationThread.descriptor);
1133        data.writeString(msg);
1134        mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
1135                IBinder.FLAG_ONEWAY);
1136        data.recycle();
1137
1138    }
1139
1140    public void dumpHeap(boolean managed, String path,
1141            ParcelFileDescriptor fd) throws RemoteException {
1142        Parcel data = Parcel.obtain();
1143        data.writeInterfaceToken(IApplicationThread.descriptor);
1144        data.writeInt(managed ? 1 : 0);
1145        data.writeString(path);
1146        if (fd != null) {
1147            data.writeInt(1);
1148            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1149        } else {
1150            data.writeInt(0);
1151        }
1152        mRemote.transact(DUMP_HEAP_TRANSACTION, data, null,
1153                IBinder.FLAG_ONEWAY);
1154        data.recycle();
1155    }
1156
1157    public void dumpActivity(FileDescriptor fd, IBinder token, String prefix, String[] args)
1158            throws RemoteException {
1159        Parcel data = Parcel.obtain();
1160        data.writeInterfaceToken(IApplicationThread.descriptor);
1161        data.writeFileDescriptor(fd);
1162        data.writeStrongBinder(token);
1163        data.writeString(prefix);
1164        data.writeStringArray(args);
1165        mRemote.transact(DUMP_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1166        data.recycle();
1167    }
1168
1169    public void setCoreSettings(Bundle coreSettings) throws RemoteException {
1170        Parcel data = Parcel.obtain();
1171        data.writeInterfaceToken(IApplicationThread.descriptor);
1172        data.writeBundle(coreSettings);
1173        mRemote.transact(SET_CORE_SETTINGS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1174    }
1175
1176    public void updatePackageCompatibilityInfo(String pkg, CompatibilityInfo info)
1177            throws RemoteException {
1178        Parcel data = Parcel.obtain();
1179        data.writeInterfaceToken(IApplicationThread.descriptor);
1180        data.writeString(pkg);
1181        info.writeToParcel(data, 0);
1182        mRemote.transact(UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION, data, null,
1183                IBinder.FLAG_ONEWAY);
1184    }
1185
1186    public void scheduleTrimMemory(int level) throws RemoteException {
1187        Parcel data = Parcel.obtain();
1188        data.writeInterfaceToken(IApplicationThread.descriptor);
1189        data.writeInt(level);
1190        mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null,
1191                IBinder.FLAG_ONEWAY);
1192    }
1193
1194    public Debug.MemoryInfo dumpMemInfo(FileDescriptor fd, boolean checkin, boolean dumpInfo,
1195            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        data.writeInt(checkin ? 1 : 0);
1201        data.writeInt(dumpInfo ? 1 : 0);
1202        data.writeInt(dumpDalvik ? 1 : 0);
1203        data.writeStringArray(args);
1204        mRemote.transact(DUMP_MEM_INFO_TRANSACTION, data, reply, 0);
1205        reply.readException();
1206        Debug.MemoryInfo info = new Debug.MemoryInfo();
1207        info.readFromParcel(reply);
1208        data.recycle();
1209        reply.recycle();
1210        return info;
1211    }
1212
1213    public void dumpGfxInfo(FileDescriptor fd, String[] args) throws RemoteException {
1214        Parcel data = Parcel.obtain();
1215        data.writeInterfaceToken(IApplicationThread.descriptor);
1216        data.writeFileDescriptor(fd);
1217        data.writeStringArray(args);
1218        mRemote.transact(DUMP_GFX_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1219        data.recycle();
1220    }
1221
1222    public void dumpDbInfo(FileDescriptor fd, String[] args) throws RemoteException {
1223        Parcel data = Parcel.obtain();
1224        data.writeInterfaceToken(IApplicationThread.descriptor);
1225        data.writeFileDescriptor(fd);
1226        data.writeStringArray(args);
1227        mRemote.transact(DUMP_DB_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1228        data.recycle();
1229    }
1230
1231    @Override
1232    public void unstableProviderDied(IBinder provider) throws RemoteException {
1233        Parcel data = Parcel.obtain();
1234        data.writeInterfaceToken(IApplicationThread.descriptor);
1235        data.writeStrongBinder(provider);
1236        mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1237        data.recycle();
1238    }
1239
1240    @Override
1241    public void requestActivityExtras(IBinder activityToken, IBinder requestToken, int requestType)
1242            throws RemoteException {
1243        Parcel data = Parcel.obtain();
1244        data.writeInterfaceToken(IApplicationThread.descriptor);
1245        data.writeStrongBinder(activityToken);
1246        data.writeStrongBinder(requestToken);
1247        data.writeInt(requestType);
1248        mRemote.transact(REQUEST_ACTIVITY_EXTRAS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1249        data.recycle();
1250    }
1251
1252    @Override
1253    public void scheduleTranslucentConversionComplete(IBinder token, boolean timeout)
1254            throws RemoteException {
1255        Parcel data = Parcel.obtain();
1256        data.writeInterfaceToken(IApplicationThread.descriptor);
1257        data.writeStrongBinder(token);
1258        data.writeInt(timeout ? 1 : 0);
1259        mRemote.transact(SCHEDULE_TRANSLUCENT_CONVERSION_COMPLETE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1260        data.recycle();
1261    }
1262
1263    @Override
1264    public void setProcessState(int state) throws RemoteException {
1265        Parcel data = Parcel.obtain();
1266        data.writeInterfaceToken(IApplicationThread.descriptor);
1267        data.writeInt(state);
1268        mRemote.transact(SET_PROCESS_STATE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1269        data.recycle();
1270    }
1271}
1272