ApplicationThreadNative.java revision c2be0d61830dd867f3092923e149e0cc251cdfc5
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
623        return super.onTransact(code, data, reply, flags);
624    }
625
626    public IBinder asBinder()
627    {
628        return this;
629    }
630}
631
632class ApplicationThreadProxy implements IApplicationThread {
633    private final IBinder mRemote;
634
635    public ApplicationThreadProxy(IBinder remote) {
636        mRemote = remote;
637    }
638
639    public final IBinder asBinder() {
640        return mRemote;
641    }
642
643    public final void schedulePauseActivity(IBinder token, boolean finished,
644            boolean userLeaving, int configChanges) throws RemoteException {
645        Parcel data = Parcel.obtain();
646        data.writeInterfaceToken(IApplicationThread.descriptor);
647        data.writeStrongBinder(token);
648        data.writeInt(finished ? 1 : 0);
649        data.writeInt(userLeaving ? 1 :0);
650        data.writeInt(configChanges);
651        mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
652                IBinder.FLAG_ONEWAY);
653        data.recycle();
654    }
655
656    public final void scheduleStopActivity(IBinder token, boolean showWindow,
657            int configChanges) throws RemoteException {
658        Parcel data = Parcel.obtain();
659        data.writeInterfaceToken(IApplicationThread.descriptor);
660        data.writeStrongBinder(token);
661        data.writeInt(showWindow ? 1 : 0);
662        data.writeInt(configChanges);
663        mRemote.transact(SCHEDULE_STOP_ACTIVITY_TRANSACTION, data, null,
664                IBinder.FLAG_ONEWAY);
665        data.recycle();
666    }
667
668    public final void scheduleWindowVisibility(IBinder token,
669            boolean showWindow) throws RemoteException {
670        Parcel data = Parcel.obtain();
671        data.writeInterfaceToken(IApplicationThread.descriptor);
672        data.writeStrongBinder(token);
673        data.writeInt(showWindow ? 1 : 0);
674        mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null,
675                IBinder.FLAG_ONEWAY);
676        data.recycle();
677    }
678
679    public final void scheduleSleeping(IBinder token,
680            boolean sleeping) throws RemoteException {
681        Parcel data = Parcel.obtain();
682        data.writeInterfaceToken(IApplicationThread.descriptor);
683        data.writeStrongBinder(token);
684        data.writeInt(sleeping ? 1 : 0);
685        mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null,
686                IBinder.FLAG_ONEWAY);
687        data.recycle();
688    }
689
690    public final void scheduleResumeActivity(IBinder token, int procState, boolean isForward)
691            throws RemoteException {
692        Parcel data = Parcel.obtain();
693        data.writeInterfaceToken(IApplicationThread.descriptor);
694        data.writeStrongBinder(token);
695        data.writeInt(procState);
696        data.writeInt(isForward ? 1 : 0);
697        mRemote.transact(SCHEDULE_RESUME_ACTIVITY_TRANSACTION, data, null,
698                IBinder.FLAG_ONEWAY);
699        data.recycle();
700    }
701
702    public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
703    		throws RemoteException {
704        Parcel data = Parcel.obtain();
705        data.writeInterfaceToken(IApplicationThread.descriptor);
706        data.writeStrongBinder(token);
707        data.writeTypedList(results);
708        mRemote.transact(SCHEDULE_SEND_RESULT_TRANSACTION, data, null,
709                IBinder.FLAG_ONEWAY);
710        data.recycle();
711    }
712
713    public final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,
714            ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,
715            int procState, Bundle state, List<ResultInfo> pendingResults,
716    		List<Intent> pendingNewIntents, boolean notResumed, boolean isForward,
717    		String profileName, ParcelFileDescriptor profileFd, boolean autoStopProfiler)
718    		throws RemoteException {
719        Parcel data = Parcel.obtain();
720        data.writeInterfaceToken(IApplicationThread.descriptor);
721        intent.writeToParcel(data, 0);
722        data.writeStrongBinder(token);
723        data.writeInt(ident);
724        info.writeToParcel(data, 0);
725        curConfig.writeToParcel(data, 0);
726        compatInfo.writeToParcel(data, 0);
727        data.writeInt(procState);
728        data.writeBundle(state);
729        data.writeTypedList(pendingResults);
730        data.writeTypedList(pendingNewIntents);
731        data.writeInt(notResumed ? 1 : 0);
732        data.writeInt(isForward ? 1 : 0);
733        data.writeString(profileName);
734        if (profileFd != null) {
735            data.writeInt(1);
736            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
737        } else {
738            data.writeInt(0);
739        }
740        data.writeInt(autoStopProfiler ? 1 : 0);
741        mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
742                IBinder.FLAG_ONEWAY);
743        data.recycle();
744    }
745
746    public final void scheduleRelaunchActivity(IBinder token,
747            List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
748            int configChanges, boolean notResumed, Configuration config)
749            throws RemoteException {
750        Parcel data = Parcel.obtain();
751        data.writeInterfaceToken(IApplicationThread.descriptor);
752        data.writeStrongBinder(token);
753        data.writeTypedList(pendingResults);
754        data.writeTypedList(pendingNewIntents);
755        data.writeInt(configChanges);
756        data.writeInt(notResumed ? 1 : 0);
757        if (config != null) {
758            data.writeInt(1);
759            config.writeToParcel(data, 0);
760        } else {
761            data.writeInt(0);
762        }
763        mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
764                IBinder.FLAG_ONEWAY);
765        data.recycle();
766    }
767
768    public void scheduleNewIntent(List<Intent> intents, IBinder token)
769            throws RemoteException {
770        Parcel data = Parcel.obtain();
771        data.writeInterfaceToken(IApplicationThread.descriptor);
772        data.writeTypedList(intents);
773        data.writeStrongBinder(token);
774        mRemote.transact(SCHEDULE_NEW_INTENT_TRANSACTION, data, null,
775                IBinder.FLAG_ONEWAY);
776        data.recycle();
777    }
778
779    public final void scheduleDestroyActivity(IBinder token, boolean finishing,
780            int configChanges) throws RemoteException {
781        Parcel data = Parcel.obtain();
782        data.writeInterfaceToken(IApplicationThread.descriptor);
783        data.writeStrongBinder(token);
784        data.writeInt(finishing ? 1 : 0);
785        data.writeInt(configChanges);
786        mRemote.transact(SCHEDULE_FINISH_ACTIVITY_TRANSACTION, data, null,
787                IBinder.FLAG_ONEWAY);
788        data.recycle();
789    }
790
791    public final void scheduleReceiver(Intent intent, ActivityInfo info,
792            CompatibilityInfo compatInfo, int resultCode, String resultData,
793            Bundle map, boolean sync, int sendingUser, int processState) throws RemoteException {
794        Parcel data = Parcel.obtain();
795        data.writeInterfaceToken(IApplicationThread.descriptor);
796        intent.writeToParcel(data, 0);
797        info.writeToParcel(data, 0);
798        compatInfo.writeToParcel(data, 0);
799        data.writeInt(resultCode);
800        data.writeString(resultData);
801        data.writeBundle(map);
802        data.writeInt(sync ? 1 : 0);
803        data.writeInt(sendingUser);
804        data.writeInt(processState);
805        mRemote.transact(SCHEDULE_RECEIVER_TRANSACTION, data, null,
806                IBinder.FLAG_ONEWAY);
807        data.recycle();
808    }
809
810    public final void scheduleCreateBackupAgent(ApplicationInfo app,
811            CompatibilityInfo compatInfo, int backupMode) throws RemoteException {
812        Parcel data = Parcel.obtain();
813        data.writeInterfaceToken(IApplicationThread.descriptor);
814        app.writeToParcel(data, 0);
815        compatInfo.writeToParcel(data, 0);
816        data.writeInt(backupMode);
817        mRemote.transact(SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION, data, null,
818                IBinder.FLAG_ONEWAY);
819        data.recycle();
820    }
821
822    public final void scheduleDestroyBackupAgent(ApplicationInfo app,
823            CompatibilityInfo compatInfo) throws RemoteException {
824        Parcel data = Parcel.obtain();
825        data.writeInterfaceToken(IApplicationThread.descriptor);
826        app.writeToParcel(data, 0);
827        compatInfo.writeToParcel(data, 0);
828        mRemote.transact(SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION, data, null,
829                IBinder.FLAG_ONEWAY);
830        data.recycle();
831    }
832
833    public final void scheduleCreateService(IBinder token, ServiceInfo info,
834            CompatibilityInfo compatInfo, int processState) throws RemoteException {
835        Parcel data = Parcel.obtain();
836        data.writeInterfaceToken(IApplicationThread.descriptor);
837        data.writeStrongBinder(token);
838        info.writeToParcel(data, 0);
839        compatInfo.writeToParcel(data, 0);
840        data.writeInt(processState);
841        mRemote.transact(SCHEDULE_CREATE_SERVICE_TRANSACTION, data, null,
842                IBinder.FLAG_ONEWAY);
843        data.recycle();
844    }
845
846    public final void scheduleBindService(IBinder token, Intent intent, boolean rebind,
847            int processState) throws RemoteException {
848        Parcel data = Parcel.obtain();
849        data.writeInterfaceToken(IApplicationThread.descriptor);
850        data.writeStrongBinder(token);
851        intent.writeToParcel(data, 0);
852        data.writeInt(rebind ? 1 : 0);
853        data.writeInt(processState);
854        mRemote.transact(SCHEDULE_BIND_SERVICE_TRANSACTION, data, null,
855                IBinder.FLAG_ONEWAY);
856        data.recycle();
857    }
858
859    public final void scheduleUnbindService(IBinder token, Intent intent)
860            throws RemoteException {
861        Parcel data = Parcel.obtain();
862        data.writeInterfaceToken(IApplicationThread.descriptor);
863        data.writeStrongBinder(token);
864        intent.writeToParcel(data, 0);
865        mRemote.transact(SCHEDULE_UNBIND_SERVICE_TRANSACTION, data, null,
866                IBinder.FLAG_ONEWAY);
867        data.recycle();
868    }
869
870    public final void scheduleServiceArgs(IBinder token, boolean taskRemoved, int startId,
871	    int flags, Intent args) throws RemoteException {
872        Parcel data = Parcel.obtain();
873        data.writeInterfaceToken(IApplicationThread.descriptor);
874        data.writeStrongBinder(token);
875        data.writeInt(taskRemoved ? 1 : 0);
876        data.writeInt(startId);
877        data.writeInt(flags);
878        if (args != null) {
879            data.writeInt(1);
880            args.writeToParcel(data, 0);
881        } else {
882            data.writeInt(0);
883        }
884        mRemote.transact(SCHEDULE_SERVICE_ARGS_TRANSACTION, data, null,
885                IBinder.FLAG_ONEWAY);
886        data.recycle();
887    }
888
889    public final void scheduleStopService(IBinder token)
890            throws RemoteException {
891        Parcel data = Parcel.obtain();
892        data.writeInterfaceToken(IApplicationThread.descriptor);
893        data.writeStrongBinder(token);
894        mRemote.transact(SCHEDULE_STOP_SERVICE_TRANSACTION, data, null,
895                IBinder.FLAG_ONEWAY);
896        data.recycle();
897    }
898
899    public final void bindApplication(String packageName, ApplicationInfo info,
900            List<ProviderInfo> providers, ComponentName testName, String profileName,
901            ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle testArgs,
902            IInstrumentationWatcher testWatcher,
903            IUiAutomationConnection uiAutomationConnection, int debugMode,
904            boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
905            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
906            Bundle coreSettings) throws RemoteException {
907        Parcel data = Parcel.obtain();
908        data.writeInterfaceToken(IApplicationThread.descriptor);
909        data.writeString(packageName);
910        info.writeToParcel(data, 0);
911        data.writeTypedList(providers);
912        if (testName == null) {
913            data.writeInt(0);
914        } else {
915            data.writeInt(1);
916            testName.writeToParcel(data, 0);
917        }
918        data.writeString(profileName);
919        if (profileFd != null) {
920            data.writeInt(1);
921            profileFd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
922        } else {
923            data.writeInt(0);
924        }
925        data.writeInt(autoStopProfiler ? 1 : 0);
926        data.writeBundle(testArgs);
927        data.writeStrongInterface(testWatcher);
928        data.writeStrongInterface(uiAutomationConnection);
929        data.writeInt(debugMode);
930        data.writeInt(openGlTrace ? 1 : 0);
931        data.writeInt(restrictedBackupMode ? 1 : 0);
932        data.writeInt(persistent ? 1 : 0);
933        config.writeToParcel(data, 0);
934        compatInfo.writeToParcel(data, 0);
935        data.writeMap(services);
936        data.writeBundle(coreSettings);
937        mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null,
938                IBinder.FLAG_ONEWAY);
939        data.recycle();
940    }
941
942    public final void scheduleExit() throws RemoteException {
943        Parcel data = Parcel.obtain();
944        data.writeInterfaceToken(IApplicationThread.descriptor);
945        mRemote.transact(SCHEDULE_EXIT_TRANSACTION, data, null,
946                IBinder.FLAG_ONEWAY);
947        data.recycle();
948    }
949
950    public final void scheduleSuicide() throws RemoteException {
951        Parcel data = Parcel.obtain();
952        data.writeInterfaceToken(IApplicationThread.descriptor);
953        mRemote.transact(SCHEDULE_SUICIDE_TRANSACTION, data, null,
954                IBinder.FLAG_ONEWAY);
955        data.recycle();
956    }
957
958    public final void requestThumbnail(IBinder token)
959            throws RemoteException {
960        Parcel data = Parcel.obtain();
961        data.writeInterfaceToken(IApplicationThread.descriptor);
962        data.writeStrongBinder(token);
963        mRemote.transact(REQUEST_THUMBNAIL_TRANSACTION, data, null,
964                IBinder.FLAG_ONEWAY);
965        data.recycle();
966    }
967
968    public final void scheduleConfigurationChanged(Configuration config)
969            throws RemoteException {
970        Parcel data = Parcel.obtain();
971        data.writeInterfaceToken(IApplicationThread.descriptor);
972        config.writeToParcel(data, 0);
973        mRemote.transact(SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION, data, null,
974                IBinder.FLAG_ONEWAY);
975        data.recycle();
976    }
977
978    public void updateTimeZone() throws RemoteException {
979        Parcel data = Parcel.obtain();
980        data.writeInterfaceToken(IApplicationThread.descriptor);
981        mRemote.transact(UPDATE_TIME_ZONE_TRANSACTION, data, null,
982                IBinder.FLAG_ONEWAY);
983        data.recycle();
984    }
985
986    public void clearDnsCache() throws RemoteException {
987        Parcel data = Parcel.obtain();
988        data.writeInterfaceToken(IApplicationThread.descriptor);
989        mRemote.transact(CLEAR_DNS_CACHE_TRANSACTION, data, null,
990                IBinder.FLAG_ONEWAY);
991        data.recycle();
992    }
993
994    public void setHttpProxy(String proxy, String port, String exclList,
995            String pacFileUrl) throws RemoteException {
996        Parcel data = Parcel.obtain();
997        data.writeInterfaceToken(IApplicationThread.descriptor);
998        data.writeString(proxy);
999        data.writeString(port);
1000        data.writeString(exclList);
1001        data.writeString(pacFileUrl);
1002        mRemote.transact(SET_HTTP_PROXY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1003        data.recycle();
1004    }
1005
1006    public void processInBackground() throws RemoteException {
1007        Parcel data = Parcel.obtain();
1008        data.writeInterfaceToken(IApplicationThread.descriptor);
1009        mRemote.transact(PROCESS_IN_BACKGROUND_TRANSACTION, data, null,
1010                IBinder.FLAG_ONEWAY);
1011        data.recycle();
1012    }
1013
1014    public void dumpService(FileDescriptor fd, IBinder token, String[] args)
1015            throws RemoteException {
1016        Parcel data = Parcel.obtain();
1017        data.writeInterfaceToken(IApplicationThread.descriptor);
1018        data.writeFileDescriptor(fd);
1019        data.writeStrongBinder(token);
1020        data.writeStringArray(args);
1021        mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1022        data.recycle();
1023    }
1024
1025    public void dumpProvider(FileDescriptor fd, IBinder token, String[] args)
1026            throws RemoteException {
1027        Parcel data = Parcel.obtain();
1028        data.writeInterfaceToken(IApplicationThread.descriptor);
1029        data.writeFileDescriptor(fd);
1030        data.writeStrongBinder(token);
1031        data.writeStringArray(args);
1032        mRemote.transact(DUMP_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1033        data.recycle();
1034    }
1035
1036    public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
1037            int resultCode, String dataStr, Bundle extras, boolean ordered,
1038            boolean sticky, int sendingUser, int processState) throws RemoteException {
1039        Parcel data = Parcel.obtain();
1040        data.writeInterfaceToken(IApplicationThread.descriptor);
1041        data.writeStrongBinder(receiver.asBinder());
1042        intent.writeToParcel(data, 0);
1043        data.writeInt(resultCode);
1044        data.writeString(dataStr);
1045        data.writeBundle(extras);
1046        data.writeInt(ordered ? 1 : 0);
1047        data.writeInt(sticky ? 1 : 0);
1048        data.writeInt(sendingUser);
1049        data.writeInt(processState);
1050        mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
1051                IBinder.FLAG_ONEWAY);
1052        data.recycle();
1053    }
1054
1055    public final void scheduleLowMemory() throws RemoteException {
1056        Parcel data = Parcel.obtain();
1057        data.writeInterfaceToken(IApplicationThread.descriptor);
1058        mRemote.transact(SCHEDULE_LOW_MEMORY_TRANSACTION, data, null,
1059                IBinder.FLAG_ONEWAY);
1060        data.recycle();
1061    }
1062
1063    public final void scheduleActivityConfigurationChanged(
1064            IBinder token) throws RemoteException {
1065        Parcel data = Parcel.obtain();
1066        data.writeInterfaceToken(IApplicationThread.descriptor);
1067        data.writeStrongBinder(token);
1068        mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
1069                IBinder.FLAG_ONEWAY);
1070        data.recycle();
1071    }
1072
1073    public void profilerControl(boolean start, String path,
1074            ParcelFileDescriptor fd, int profileType) throws RemoteException {
1075        Parcel data = Parcel.obtain();
1076        data.writeInterfaceToken(IApplicationThread.descriptor);
1077        data.writeInt(start ? 1 : 0);
1078        data.writeInt(profileType);
1079        data.writeString(path);
1080        if (fd != null) {
1081            data.writeInt(1);
1082            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1083        } else {
1084            data.writeInt(0);
1085        }
1086        mRemote.transact(PROFILER_CONTROL_TRANSACTION, data, null,
1087                IBinder.FLAG_ONEWAY);
1088        data.recycle();
1089    }
1090
1091    public void setSchedulingGroup(int group) throws RemoteException {
1092        Parcel data = Parcel.obtain();
1093        data.writeInterfaceToken(IApplicationThread.descriptor);
1094        data.writeInt(group);
1095        mRemote.transact(SET_SCHEDULING_GROUP_TRANSACTION, data, null,
1096                IBinder.FLAG_ONEWAY);
1097        data.recycle();
1098    }
1099
1100    public void dispatchPackageBroadcast(int cmd, String[] packages) throws RemoteException {
1101        Parcel data = Parcel.obtain();
1102        data.writeInterfaceToken(IApplicationThread.descriptor);
1103        data.writeInt(cmd);
1104        data.writeStringArray(packages);
1105        mRemote.transact(DISPATCH_PACKAGE_BROADCAST_TRANSACTION, data, null,
1106                IBinder.FLAG_ONEWAY);
1107        data.recycle();
1108
1109    }
1110
1111    public void scheduleCrash(String msg) throws RemoteException {
1112        Parcel data = Parcel.obtain();
1113        data.writeInterfaceToken(IApplicationThread.descriptor);
1114        data.writeString(msg);
1115        mRemote.transact(SCHEDULE_CRASH_TRANSACTION, data, null,
1116                IBinder.FLAG_ONEWAY);
1117        data.recycle();
1118
1119    }
1120
1121    public void dumpHeap(boolean managed, String path,
1122            ParcelFileDescriptor fd) throws RemoteException {
1123        Parcel data = Parcel.obtain();
1124        data.writeInterfaceToken(IApplicationThread.descriptor);
1125        data.writeInt(managed ? 1 : 0);
1126        data.writeString(path);
1127        if (fd != null) {
1128            data.writeInt(1);
1129            fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
1130        } else {
1131            data.writeInt(0);
1132        }
1133        mRemote.transact(DUMP_HEAP_TRANSACTION, data, null,
1134                IBinder.FLAG_ONEWAY);
1135        data.recycle();
1136    }
1137
1138    public void dumpActivity(FileDescriptor fd, IBinder token, String prefix, String[] args)
1139            throws RemoteException {
1140        Parcel data = Parcel.obtain();
1141        data.writeInterfaceToken(IApplicationThread.descriptor);
1142        data.writeFileDescriptor(fd);
1143        data.writeStrongBinder(token);
1144        data.writeString(prefix);
1145        data.writeStringArray(args);
1146        mRemote.transact(DUMP_ACTIVITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1147        data.recycle();
1148    }
1149
1150    public void setCoreSettings(Bundle coreSettings) throws RemoteException {
1151        Parcel data = Parcel.obtain();
1152        data.writeInterfaceToken(IApplicationThread.descriptor);
1153        data.writeBundle(coreSettings);
1154        mRemote.transact(SET_CORE_SETTINGS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1155    }
1156
1157    public void updatePackageCompatibilityInfo(String pkg, CompatibilityInfo info)
1158            throws RemoteException {
1159        Parcel data = Parcel.obtain();
1160        data.writeInterfaceToken(IApplicationThread.descriptor);
1161        data.writeString(pkg);
1162        info.writeToParcel(data, 0);
1163        mRemote.transact(UPDATE_PACKAGE_COMPATIBILITY_INFO_TRANSACTION, data, null,
1164                IBinder.FLAG_ONEWAY);
1165    }
1166
1167    public void scheduleTrimMemory(int level) throws RemoteException {
1168        Parcel data = Parcel.obtain();
1169        data.writeInterfaceToken(IApplicationThread.descriptor);
1170        data.writeInt(level);
1171        mRemote.transact(SCHEDULE_TRIM_MEMORY_TRANSACTION, data, null,
1172                IBinder.FLAG_ONEWAY);
1173    }
1174
1175    public void dumpMemInfo(FileDescriptor fd, Debug.MemoryInfo mem, boolean checkin,
1176            boolean dumpInfo, boolean dumpDalvik, String[] args) throws RemoteException {
1177        Parcel data = Parcel.obtain();
1178        Parcel reply = Parcel.obtain();
1179        data.writeInterfaceToken(IApplicationThread.descriptor);
1180        data.writeFileDescriptor(fd);
1181        mem.writeToParcel(data, 0);
1182        data.writeInt(checkin ? 1 : 0);
1183        data.writeInt(dumpInfo ? 1 : 0);
1184        data.writeInt(dumpDalvik ? 1 : 0);
1185        data.writeStringArray(args);
1186        mRemote.transact(DUMP_MEM_INFO_TRANSACTION, data, reply, 0);
1187        reply.readException();
1188        data.recycle();
1189        reply.recycle();
1190    }
1191
1192    public void dumpGfxInfo(FileDescriptor fd, String[] args) throws RemoteException {
1193        Parcel data = Parcel.obtain();
1194        data.writeInterfaceToken(IApplicationThread.descriptor);
1195        data.writeFileDescriptor(fd);
1196        data.writeStringArray(args);
1197        mRemote.transact(DUMP_GFX_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1198        data.recycle();
1199    }
1200
1201    public void dumpDbInfo(FileDescriptor fd, String[] args) throws RemoteException {
1202        Parcel data = Parcel.obtain();
1203        data.writeInterfaceToken(IApplicationThread.descriptor);
1204        data.writeFileDescriptor(fd);
1205        data.writeStringArray(args);
1206        mRemote.transact(DUMP_DB_INFO_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1207        data.recycle();
1208    }
1209
1210    @Override
1211    public void unstableProviderDied(IBinder provider) throws RemoteException {
1212        Parcel data = Parcel.obtain();
1213        data.writeInterfaceToken(IApplicationThread.descriptor);
1214        data.writeStrongBinder(provider);
1215        mRemote.transact(UNSTABLE_PROVIDER_DIED_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1216        data.recycle();
1217    }
1218
1219    @Override
1220    public void requestAssistContextExtras(IBinder activityToken, IBinder requestToken,
1221            int requestType) throws RemoteException {
1222        Parcel data = Parcel.obtain();
1223        data.writeInterfaceToken(IApplicationThread.descriptor);
1224        data.writeStrongBinder(activityToken);
1225        data.writeStrongBinder(requestToken);
1226        data.writeInt(requestType);
1227        mRemote.transact(REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION, data, null,
1228                IBinder.FLAG_ONEWAY);
1229        data.recycle();
1230    }
1231
1232    @Override
1233    public void scheduleTranslucentConversionComplete(IBinder token, boolean timeout)
1234            throws RemoteException {
1235        Parcel data = Parcel.obtain();
1236        data.writeInterfaceToken(IApplicationThread.descriptor);
1237        data.writeStrongBinder(token);
1238        data.writeInt(timeout ? 1 : 0);
1239        mRemote.transact(SCHEDULE_TRANSLUCENT_CONVERSION_COMPLETE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1240        data.recycle();
1241    }
1242
1243    @Override
1244    public void setProcessState(int state) throws RemoteException {
1245        Parcel data = Parcel.obtain();
1246        data.writeInterfaceToken(IApplicationThread.descriptor);
1247        data.writeInt(state);
1248        mRemote.transact(SET_PROCESS_STATE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
1249        data.recycle();
1250    }
1251}
1252