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