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