ApplicationThreadNative.java revision 54b6cfa9a9e5b861a9930af873580d6dc20f773c
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.pm.ActivityInfo;
22import android.content.pm.ApplicationInfo;
23import android.content.pm.ProviderInfo;
24import android.content.pm.ServiceInfo;
25import android.content.res.Configuration;
26import android.os.Binder;
27import android.os.Bundle;
28import android.os.RemoteException;
29import android.os.IBinder;
30import android.os.Parcel;
31import android.os.ParcelFileDescriptor;
32
33import java.io.FileDescriptor;
34import java.io.IOException;
35import java.util.HashMap;
36import java.util.List;
37import java.util.Map;
38
39/** {@hide} */
40public abstract class ApplicationThreadNative extends Binder
41        implements IApplicationThread {
42    /**
43     * Cast a Binder object into an application thread interface, generating
44     * a proxy if needed.
45     */
46    static public IApplicationThread asInterface(IBinder obj) {
47        if (obj == null) {
48            return null;
49        }
50        IApplicationThread in =
51            (IApplicationThread)obj.queryLocalInterface(descriptor);
52        if (in != null) {
53            return in;
54        }
55
56        return new ApplicationThreadProxy(obj);
57    }
58
59    public ApplicationThreadNative() {
60        attachInterface(this, descriptor);
61    }
62
63    @Override
64    public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
65            throws RemoteException {
66        switch (code) {
67        case SCHEDULE_PAUSE_ACTIVITY_TRANSACTION:
68        {
69            data.enforceInterface(IApplicationThread.descriptor);
70            IBinder b = data.readStrongBinder();
71            boolean finished = data.readInt() != 0;
72            int configChanges = data.readInt();
73            schedulePauseActivity(b, finished, configChanges);
74            return true;
75        }
76
77        case SCHEDULE_STOP_ACTIVITY_TRANSACTION:
78        {
79            data.enforceInterface(IApplicationThread.descriptor);
80            IBinder b = data.readStrongBinder();
81            boolean show = data.readInt() != 0;
82            int configChanges = data.readInt();
83            scheduleStopActivity(b, show, configChanges);
84            return true;
85        }
86
87        case SCHEDULE_WINDOW_VISIBILITY_TRANSACTION:
88        {
89            data.enforceInterface(IApplicationThread.descriptor);
90            IBinder b = data.readStrongBinder();
91            boolean show = data.readInt() != 0;
92            scheduleWindowVisibility(b, show);
93            return true;
94        }
95
96        case SCHEDULE_RESUME_ACTIVITY_TRANSACTION:
97        {
98            data.enforceInterface(IApplicationThread.descriptor);
99            IBinder b = data.readStrongBinder();
100            scheduleResumeActivity(b);
101            return true;
102        }
103
104        case SCHEDULE_SEND_RESULT_TRANSACTION:
105        {
106            data.enforceInterface(IApplicationThread.descriptor);
107            IBinder b = data.readStrongBinder();
108            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
109            scheduleSendResult(b, ri);
110            return true;
111        }
112
113        case SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION:
114        {
115            data.enforceInterface(IApplicationThread.descriptor);
116            Intent intent = Intent.CREATOR.createFromParcel(data);
117            IBinder b = data.readStrongBinder();
118            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
119            Bundle state = data.readBundle();
120            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
121            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
122            boolean notResumed = data.readInt() != 0;
123            scheduleLaunchActivity(intent, b, info, state, ri, pi, notResumed);
124            return true;
125        }
126
127        case SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION:
128        {
129            data.enforceInterface(IApplicationThread.descriptor);
130            IBinder b = data.readStrongBinder();
131            List<ResultInfo> ri = data.createTypedArrayList(ResultInfo.CREATOR);
132            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
133            int configChanges = data.readInt();
134            boolean notResumed = data.readInt() != 0;
135            scheduleRelaunchActivity(b, ri, pi, configChanges, notResumed);
136            return true;
137        }
138
139        case SCHEDULE_NEW_INTENT_TRANSACTION:
140        {
141            data.enforceInterface(IApplicationThread.descriptor);
142            List<Intent> pi = data.createTypedArrayList(Intent.CREATOR);
143            IBinder b = data.readStrongBinder();
144            scheduleNewIntent(pi, b);
145            return true;
146        }
147
148        case SCHEDULE_FINISH_ACTIVITY_TRANSACTION:
149        {
150            data.enforceInterface(IApplicationThread.descriptor);
151            IBinder b = data.readStrongBinder();
152            boolean finishing = data.readInt() != 0;
153            int configChanges = data.readInt();
154            scheduleDestroyActivity(b, finishing, configChanges);
155            return true;
156        }
157
158        case SCHEDULE_RECEIVER_TRANSACTION:
159        {
160            data.enforceInterface(IApplicationThread.descriptor);
161            Intent intent = Intent.CREATOR.createFromParcel(data);
162            ActivityInfo info = ActivityInfo.CREATOR.createFromParcel(data);
163            int resultCode = data.readInt();
164            String resultData = data.readString();
165            Bundle resultExtras = data.readBundle();
166            boolean sync = data.readInt() != 0;
167            scheduleReceiver(intent, info, resultCode, resultData,
168                    resultExtras, sync);
169            return true;
170        }
171
172        case SCHEDULE_CREATE_SERVICE_TRANSACTION: {
173            data.enforceInterface(IApplicationThread.descriptor);
174            IBinder token = data.readStrongBinder();
175            ServiceInfo info = ServiceInfo.CREATOR.createFromParcel(data);
176            scheduleCreateService(token, info);
177            return true;
178        }
179
180        case SCHEDULE_BIND_SERVICE_TRANSACTION: {
181            data.enforceInterface(IApplicationThread.descriptor);
182            IBinder token = data.readStrongBinder();
183            Intent intent = Intent.CREATOR.createFromParcel(data);
184            boolean rebind = data.readInt() != 0;
185            scheduleBindService(token, intent, rebind);
186            return true;
187        }
188
189        case SCHEDULE_UNBIND_SERVICE_TRANSACTION: {
190            data.enforceInterface(IApplicationThread.descriptor);
191            IBinder token = data.readStrongBinder();
192            Intent intent = Intent.CREATOR.createFromParcel(data);
193            scheduleUnbindService(token, intent);
194            return true;
195        }
196
197        case SCHEDULE_SERVICE_ARGS_TRANSACTION:
198        {
199            data.enforceInterface(IApplicationThread.descriptor);
200            IBinder token = data.readStrongBinder();
201            int startId = data.readInt();
202            Intent args = Intent.CREATOR.createFromParcel(data);
203            scheduleServiceArgs(token, startId, args);
204            return true;
205        }
206
207        case SCHEDULE_STOP_SERVICE_TRANSACTION:
208        {
209            data.enforceInterface(IApplicationThread.descriptor);
210            IBinder token = data.readStrongBinder();
211            scheduleStopService(token);
212            return true;
213        }
214
215        case BIND_APPLICATION_TRANSACTION:
216        {
217            data.enforceInterface(IApplicationThread.descriptor);
218            String packageName = data.readString();
219            ApplicationInfo info =
220                ApplicationInfo.CREATOR.createFromParcel(data);
221            List<ProviderInfo> providers =
222                data.createTypedArrayList(ProviderInfo.CREATOR);
223            ComponentName testName = (data.readInt() != 0)
224                ? new ComponentName(data) : null;
225            String profileName = data.readString();
226            Bundle testArgs = data.readBundle();
227            IBinder binder = data.readStrongBinder();
228            IInstrumentationWatcher testWatcher = IInstrumentationWatcher.Stub.asInterface(binder);
229            int testMode = data.readInt();
230            Configuration config = Configuration.CREATOR.createFromParcel(data);
231            HashMap<String, IBinder> services = data.readHashMap(null);
232            bindApplication(packageName, info,
233                            providers, testName, profileName,
234                            testArgs, testWatcher, testMode, config, services);
235            return true;
236        }
237
238        case SCHEDULE_EXIT_TRANSACTION:
239        {
240            data.enforceInterface(IApplicationThread.descriptor);
241            scheduleExit();
242            return true;
243        }
244
245        case REQUEST_THUMBNAIL_TRANSACTION:
246        {
247            data.enforceInterface(IApplicationThread.descriptor);
248            IBinder b = data.readStrongBinder();
249            requestThumbnail(b);
250            return true;
251        }
252
253        case SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION:
254        {
255            data.enforceInterface(IApplicationThread.descriptor);
256            Configuration config = Configuration.CREATOR.createFromParcel(data);
257            scheduleConfigurationChanged(config);
258            return true;
259        }
260
261        case UPDATE_TIME_ZONE_TRANSACTION: {
262            data.enforceInterface(IApplicationThread.descriptor);
263            updateTimeZone();
264            return true;
265        }
266
267        case PROCESS_IN_BACKGROUND_TRANSACTION: {
268            data.enforceInterface(IApplicationThread.descriptor);
269            processInBackground();
270            return true;
271        }
272
273        case DUMP_SERVICE_TRANSACTION: {
274            data.enforceInterface(IApplicationThread.descriptor);
275            ParcelFileDescriptor fd = data.readFileDescriptor();
276            final IBinder service = data.readStrongBinder();
277            final String[] args = data.readStringArray();
278            if (fd != null) {
279                dumpService(fd.getFileDescriptor(), service, args);
280                try {
281                    fd.close();
282                } catch (IOException e) {
283                }
284            }
285            return true;
286        }
287
288        case SCHEDULE_REGISTERED_RECEIVER_TRANSACTION: {
289            data.enforceInterface(IApplicationThread.descriptor);
290            IIntentReceiver receiver = IIntentReceiver.Stub.asInterface(
291                    data.readStrongBinder());
292            Intent intent = Intent.CREATOR.createFromParcel(data);
293            int resultCode = data.readInt();
294            String dataStr = data.readString();
295            Bundle extras = data.readBundle();
296            boolean ordered = data.readInt() != 0;
297            scheduleRegisteredReceiver(receiver, intent,
298                    resultCode, dataStr, extras, ordered);
299            return true;
300        }
301
302        case SCHEDULE_LOW_MEMORY_TRANSACTION:
303        {
304            scheduleLowMemory();
305            return true;
306        }
307
308        case SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION:
309        {
310            data.enforceInterface(IApplicationThread.descriptor);
311            IBinder b = data.readStrongBinder();
312            scheduleActivityConfigurationChanged(b);
313            return true;
314        }
315
316        case REQUEST_PSS_TRANSACTION:
317        {
318            data.enforceInterface(IApplicationThread.descriptor);
319            requestPss();
320            return true;
321        }
322        }
323
324        return super.onTransact(code, data, reply, flags);
325    }
326
327    public IBinder asBinder()
328    {
329        return this;
330    }
331}
332
333class ApplicationThreadProxy implements IApplicationThread {
334    private final IBinder mRemote;
335
336    public ApplicationThreadProxy(IBinder remote) {
337        mRemote = remote;
338    }
339
340    public final IBinder asBinder() {
341        return mRemote;
342    }
343
344    public final void schedulePauseActivity(IBinder token, boolean finished,
345            int configChanges) throws RemoteException {
346        Parcel data = Parcel.obtain();
347        data.writeInterfaceToken(IApplicationThread.descriptor);
348        data.writeStrongBinder(token);
349        data.writeInt(finished ? 1 : 0);
350        data.writeInt(configChanges);
351        mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
352                IBinder.FLAG_ONEWAY);
353        data.recycle();
354    }
355
356    public final void scheduleStopActivity(IBinder token, boolean showWindow,
357            int configChanges) throws RemoteException {
358        Parcel data = Parcel.obtain();
359        data.writeInterfaceToken(IApplicationThread.descriptor);
360        data.writeStrongBinder(token);
361        data.writeInt(showWindow ? 1 : 0);
362        data.writeInt(configChanges);
363        mRemote.transact(SCHEDULE_STOP_ACTIVITY_TRANSACTION, data, null,
364                IBinder.FLAG_ONEWAY);
365        data.recycle();
366    }
367
368    public final void scheduleWindowVisibility(IBinder token,
369            boolean showWindow) throws RemoteException {
370        Parcel data = Parcel.obtain();
371        data.writeInterfaceToken(IApplicationThread.descriptor);
372        data.writeStrongBinder(token);
373        data.writeInt(showWindow ? 1 : 0);
374        mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null,
375                IBinder.FLAG_ONEWAY);
376        data.recycle();
377    }
378
379    public final void scheduleResumeActivity(IBinder token)
380            throws RemoteException {
381        Parcel data = Parcel.obtain();
382        data.writeInterfaceToken(IApplicationThread.descriptor);
383        data.writeStrongBinder(token);
384        mRemote.transact(SCHEDULE_RESUME_ACTIVITY_TRANSACTION, data, null,
385                IBinder.FLAG_ONEWAY);
386        data.recycle();
387    }
388
389    public final void scheduleSendResult(IBinder token, List<ResultInfo> results)
390    		throws RemoteException {
391        Parcel data = Parcel.obtain();
392        data.writeInterfaceToken(IApplicationThread.descriptor);
393        data.writeStrongBinder(token);
394        data.writeTypedList(results);
395        mRemote.transact(SCHEDULE_SEND_RESULT_TRANSACTION, data, null,
396                IBinder.FLAG_ONEWAY);
397        data.recycle();
398    }
399
400    public final void scheduleLaunchActivity(Intent intent, IBinder token,
401            ActivityInfo info, Bundle state, List<ResultInfo> pendingResults,
402    		List<Intent> pendingNewIntents, boolean notResumed)
403    		throws RemoteException {
404        Parcel data = Parcel.obtain();
405        data.writeInterfaceToken(IApplicationThread.descriptor);
406        intent.writeToParcel(data, 0);
407        data.writeStrongBinder(token);
408        info.writeToParcel(data, 0);
409        data.writeBundle(state);
410        data.writeTypedList(pendingResults);
411        data.writeTypedList(pendingNewIntents);
412        data.writeInt(notResumed ? 1 : 0);
413        mRemote.transact(SCHEDULE_LAUNCH_ACTIVITY_TRANSACTION, data, null,
414                IBinder.FLAG_ONEWAY);
415        data.recycle();
416    }
417
418    public final void scheduleRelaunchActivity(IBinder token,
419            List<ResultInfo> pendingResults, List<Intent> pendingNewIntents,
420            int configChanges, boolean notResumed) throws RemoteException {
421        Parcel data = Parcel.obtain();
422        data.writeInterfaceToken(IApplicationThread.descriptor);
423        data.writeStrongBinder(token);
424        data.writeTypedList(pendingResults);
425        data.writeTypedList(pendingNewIntents);
426        data.writeInt(configChanges);
427        data.writeInt(notResumed ? 1 : 0);
428        mRemote.transact(SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION, data, null,
429                IBinder.FLAG_ONEWAY);
430        data.recycle();
431    }
432
433    public void scheduleNewIntent(List<Intent> intents, IBinder token)
434            throws RemoteException {
435        Parcel data = Parcel.obtain();
436        data.writeInterfaceToken(IApplicationThread.descriptor);
437        data.writeTypedList(intents);
438        data.writeStrongBinder(token);
439        mRemote.transact(SCHEDULE_NEW_INTENT_TRANSACTION, data, null,
440                IBinder.FLAG_ONEWAY);
441        data.recycle();
442    }
443
444    public final void scheduleDestroyActivity(IBinder token, boolean finishing,
445            int configChanges) throws RemoteException {
446        Parcel data = Parcel.obtain();
447        data.writeInterfaceToken(IApplicationThread.descriptor);
448        data.writeStrongBinder(token);
449        data.writeInt(finishing ? 1 : 0);
450        data.writeInt(configChanges);
451        mRemote.transact(SCHEDULE_FINISH_ACTIVITY_TRANSACTION, data, null,
452                IBinder.FLAG_ONEWAY);
453        data.recycle();
454    }
455
456    public final void scheduleReceiver(Intent intent, ActivityInfo info,
457            int resultCode, String resultData,
458            Bundle map, boolean sync) throws RemoteException {
459        Parcel data = Parcel.obtain();
460        data.writeInterfaceToken(IApplicationThread.descriptor);
461        intent.writeToParcel(data, 0);
462        info.writeToParcel(data, 0);
463        data.writeInt(resultCode);
464        data.writeString(resultData);
465        data.writeBundle(map);
466        data.writeInt(sync ? 1 : 0);
467        mRemote.transact(SCHEDULE_RECEIVER_TRANSACTION, data, null,
468                IBinder.FLAG_ONEWAY);
469        data.recycle();
470    }
471
472    public final void scheduleCreateService(IBinder token, ServiceInfo info)
473            throws RemoteException {
474        Parcel data = Parcel.obtain();
475        data.writeInterfaceToken(IApplicationThread.descriptor);
476        data.writeStrongBinder(token);
477        info.writeToParcel(data, 0);
478        mRemote.transact(SCHEDULE_CREATE_SERVICE_TRANSACTION, data, null,
479                IBinder.FLAG_ONEWAY);
480        data.recycle();
481    }
482
483    public final void scheduleBindService(IBinder token, Intent intent, boolean rebind)
484            throws RemoteException {
485        Parcel data = Parcel.obtain();
486        data.writeInterfaceToken(IApplicationThread.descriptor);
487        data.writeStrongBinder(token);
488        intent.writeToParcel(data, 0);
489        data.writeInt(rebind ? 1 : 0);
490        mRemote.transact(SCHEDULE_BIND_SERVICE_TRANSACTION, data, null,
491                IBinder.FLAG_ONEWAY);
492        data.recycle();
493    }
494
495    public final void scheduleUnbindService(IBinder token, Intent intent)
496            throws RemoteException {
497        Parcel data = Parcel.obtain();
498        data.writeInterfaceToken(IApplicationThread.descriptor);
499        data.writeStrongBinder(token);
500        intent.writeToParcel(data, 0);
501        mRemote.transact(SCHEDULE_UNBIND_SERVICE_TRANSACTION, data, null,
502                IBinder.FLAG_ONEWAY);
503        data.recycle();
504    }
505
506    public final void scheduleServiceArgs(IBinder token, int startId,
507	    Intent args) throws RemoteException {
508        Parcel data = Parcel.obtain();
509        data.writeInterfaceToken(IApplicationThread.descriptor);
510        data.writeStrongBinder(token);
511        data.writeInt(startId);
512        args.writeToParcel(data, 0);
513        mRemote.transact(SCHEDULE_SERVICE_ARGS_TRANSACTION, data, null,
514                IBinder.FLAG_ONEWAY);
515        data.recycle();
516    }
517
518    public final void scheduleStopService(IBinder token)
519            throws RemoteException {
520        Parcel data = Parcel.obtain();
521        data.writeInterfaceToken(IApplicationThread.descriptor);
522        data.writeStrongBinder(token);
523        mRemote.transact(SCHEDULE_STOP_SERVICE_TRANSACTION, data, null,
524                IBinder.FLAG_ONEWAY);
525        data.recycle();
526    }
527
528    public final void bindApplication(String packageName, ApplicationInfo info,
529            List<ProviderInfo> providers, ComponentName testName,
530            String profileName, Bundle testArgs, IInstrumentationWatcher testWatcher, int debugMode,
531            Configuration config, Map<String, IBinder> services) throws RemoteException {
532        Parcel data = Parcel.obtain();
533        data.writeInterfaceToken(IApplicationThread.descriptor);
534        data.writeString(packageName);
535        info.writeToParcel(data, 0);
536        data.writeTypedList(providers);
537        if (testName == null) {
538            data.writeInt(0);
539        } else {
540            data.writeInt(1);
541            testName.writeToParcel(data, 0);
542        }
543        data.writeString(profileName);
544        data.writeBundle(testArgs);
545        data.writeStrongInterface(testWatcher);
546        data.writeInt(debugMode);
547        config.writeToParcel(data, 0);
548        data.writeMap(services);
549        mRemote.transact(BIND_APPLICATION_TRANSACTION, data, null,
550                IBinder.FLAG_ONEWAY);
551        data.recycle();
552    }
553
554    public final void scheduleExit() throws RemoteException {
555        Parcel data = Parcel.obtain();
556        data.writeInterfaceToken(IApplicationThread.descriptor);
557        mRemote.transact(SCHEDULE_EXIT_TRANSACTION, data, null,
558                IBinder.FLAG_ONEWAY);
559        data.recycle();
560    }
561
562    public final void requestThumbnail(IBinder token)
563            throws RemoteException {
564        Parcel data = Parcel.obtain();
565        data.writeInterfaceToken(IApplicationThread.descriptor);
566        data.writeStrongBinder(token);
567        mRemote.transact(REQUEST_THUMBNAIL_TRANSACTION, data, null,
568                IBinder.FLAG_ONEWAY);
569        data.recycle();
570    }
571
572    public final void scheduleConfigurationChanged(Configuration config)
573            throws RemoteException {
574        Parcel data = Parcel.obtain();
575        data.writeInterfaceToken(IApplicationThread.descriptor);
576        config.writeToParcel(data, 0);
577        mRemote.transact(SCHEDULE_CONFIGURATION_CHANGED_TRANSACTION, data, null,
578                IBinder.FLAG_ONEWAY);
579        data.recycle();
580    }
581
582    public void updateTimeZone() throws RemoteException {
583        Parcel data = Parcel.obtain();
584        data.writeInterfaceToken(IApplicationThread.descriptor);
585        mRemote.transact(UPDATE_TIME_ZONE_TRANSACTION, data, null,
586                IBinder.FLAG_ONEWAY);
587        data.recycle();
588    }
589
590    public void processInBackground() throws RemoteException {
591        Parcel data = Parcel.obtain();
592        data.writeInterfaceToken(IApplicationThread.descriptor);
593        mRemote.transact(PROCESS_IN_BACKGROUND_TRANSACTION, data, null,
594                IBinder.FLAG_ONEWAY);
595        data.recycle();
596    }
597
598    public void dumpService(FileDescriptor fd, IBinder token, String[] args)
599            throws RemoteException {
600        Parcel data = Parcel.obtain();
601        data.writeInterfaceToken(IApplicationThread.descriptor);
602        data.writeFileDescriptor(fd);
603        data.writeStrongBinder(token);
604        data.writeStringArray(args);
605        mRemote.transact(DUMP_SERVICE_TRANSACTION, data, null, 0);
606        data.recycle();
607    }
608
609    public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
610            int resultCode, String dataStr, Bundle extras, boolean ordered)
611            throws RemoteException {
612        Parcel data = Parcel.obtain();
613        data.writeInterfaceToken(IApplicationThread.descriptor);
614        data.writeStrongBinder(receiver.asBinder());
615        intent.writeToParcel(data, 0);
616        data.writeInt(resultCode);
617        data.writeString(dataStr);
618        data.writeBundle(extras);
619        data.writeInt(ordered ? 1 : 0);
620        mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
621                IBinder.FLAG_ONEWAY);
622        data.recycle();
623    }
624
625    public final void scheduleLowMemory() throws RemoteException {
626        Parcel data = Parcel.obtain();
627        data.writeInterfaceToken(IApplicationThread.descriptor);
628        mRemote.transact(SCHEDULE_LOW_MEMORY_TRANSACTION, data, null,
629                IBinder.FLAG_ONEWAY);
630        data.recycle();
631    }
632
633    public final void scheduleActivityConfigurationChanged(
634            IBinder token) throws RemoteException {
635        Parcel data = Parcel.obtain();
636        data.writeInterfaceToken(IApplicationThread.descriptor);
637        data.writeStrongBinder(token);
638        mRemote.transact(SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION, data, null,
639                IBinder.FLAG_ONEWAY);
640        data.recycle();
641    }
642
643    public final void requestPss() throws RemoteException {
644        Parcel data = Parcel.obtain();
645        data.writeInterfaceToken(IApplicationThread.descriptor);
646        mRemote.transact(REQUEST_PSS_TRANSACTION, data, null,
647                IBinder.FLAG_ONEWAY);
648        data.recycle();
649    }
650
651}
652
653