1 /* 2 * Copyright (C) 2015, 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 #include "tests/test_data.h" 18 19 namespace android { 20 namespace aidl { 21 namespace test_data { 22 namespace example_interface { 23 24 const char kCanonicalName[] = "android.test.IExampleInterface"; 25 26 const char kJavaOutputPath[] = "some/path/to/output.java"; 27 28 const char* kImportedParcelables[] = { 29 "android.foo.ExampleParcelable", 30 nullptr, 31 }; 32 33 const char* kImportedInterfaces[] = { 34 "android.bar.IAuxInterface", 35 "android.test.IAuxInterface2", 36 nullptr, 37 }; 38 39 const char kInterfaceDefinition[] = R"( 40 package android.test; 41 42 import android.foo.ExampleParcelable; 43 import android.test.CompoundParcelable; 44 import android.bar.IAuxInterface; 45 import android.test.IAuxInterface2; 46 47 interface IExampleInterface { 48 const int EXAMPLE_CONSTANT = 3; 49 boolean isEnabled(); 50 int getState(); 51 String getAddress(); 52 53 /* Test long comment */ 54 ExampleParcelable[] getParcelables(); 55 56 // Test short comment 57 boolean setScanMode(int mode, int duration); 58 59 /* Test long comment */ 60 // And short comment 61 void registerBinder(IAuxInterface foo); 62 IExampleInterface getRecursiveBinder(); 63 64 int takesAnInterface(in IAuxInterface2 arg); 65 int takesAParcelable(in CompoundParcelable.Subclass1 arg, 66 inout CompoundParcelable.Subclass2 arg2); 67 } 68 )"; 69 70 const char kInterfaceDefinitionOutlining[] = R"( 71 package android.test; 72 73 import android.foo.ExampleParcelable; 74 import android.test.CompoundParcelable; 75 import android.bar.IAuxInterface; 76 import android.test.IAuxInterface2; 77 78 interface IExampleInterface { 79 const int EXAMPLE_CONSTANT = 3; 80 boolean isEnabled(); 81 int getState(int a, int b); 82 String getAddress(); 83 84 /* Test long comment */ 85 ExampleParcelable[] getParcelables(); 86 87 // Test short comment 88 boolean setScanMode(int mode, int duration); 89 90 /* Test long comment */ 91 // And short comment 92 void registerBinder(IAuxInterface foo); 93 IExampleInterface getRecursiveBinder(); 94 95 int takesAnInterface(in IAuxInterface2 arg); 96 int takesAParcelable(in CompoundParcelable.Subclass1 arg, 97 inout CompoundParcelable.Subclass2 arg2); 98 } 99 )"; 100 101 const char kExpectedJavaDepsOutput[] = 102 R"(some/path/to/output.java : \ 103 android/test/IExampleInterface.aidl \ 104 ./android/foo/ExampleParcelable.aidl \ 105 ./android/test/CompoundParcelable.aidl \ 106 ./android/bar/IAuxInterface.aidl \ 107 ./android/test/IAuxInterface2.aidl 108 109 android/test/IExampleInterface.aidl : 110 ./android/foo/ExampleParcelable.aidl : 111 ./android/test/CompoundParcelable.aidl : 112 ./android/bar/IAuxInterface.aidl : 113 ./android/test/IAuxInterface2.aidl : 114 )"; 115 116 const char kExpectedJavaOutput[] = 117 R"(/* 118 * This file is auto-generated. DO NOT MODIFY. 119 * Original file: android/test/IExampleInterface.aidl 120 */ 121 package android.test; 122 public interface IExampleInterface extends android.os.IInterface 123 { 124 /** Local-side IPC implementation stub class. */ 125 public static abstract class Stub extends android.os.Binder implements android.test.IExampleInterface 126 { 127 private static final java.lang.String DESCRIPTOR = "android.test.IExampleInterface"; 128 /** Construct the stub at attach it to the interface. */ 129 public Stub() 130 { 131 this.attachInterface(this, DESCRIPTOR); 132 } 133 /** 134 * Cast an IBinder object into an android.test.IExampleInterface interface, 135 * generating a proxy if needed. 136 */ 137 public static android.test.IExampleInterface asInterface(android.os.IBinder obj) 138 { 139 if ((obj==null)) { 140 return null; 141 } 142 android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); 143 if (((iin!=null)&&(iin instanceof android.test.IExampleInterface))) { 144 return ((android.test.IExampleInterface)iin); 145 } 146 return new android.test.IExampleInterface.Stub.Proxy(obj); 147 } 148 @Override public android.os.IBinder asBinder() 149 { 150 return this; 151 } 152 @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException 153 { 154 java.lang.String descriptor = DESCRIPTOR; 155 switch (code) 156 { 157 case INTERFACE_TRANSACTION: 158 { 159 reply.writeString(descriptor); 160 return true; 161 } 162 case TRANSACTION_isEnabled: 163 { 164 data.enforceInterface(descriptor); 165 boolean _result = this.isEnabled(); 166 reply.writeNoException(); 167 reply.writeInt(((_result)?(1):(0))); 168 return true; 169 } 170 case TRANSACTION_getState: 171 { 172 data.enforceInterface(descriptor); 173 int _result = this.getState(); 174 reply.writeNoException(); 175 reply.writeInt(_result); 176 return true; 177 } 178 case TRANSACTION_getAddress: 179 { 180 data.enforceInterface(descriptor); 181 java.lang.String _result = this.getAddress(); 182 reply.writeNoException(); 183 reply.writeString(_result); 184 return true; 185 } 186 case TRANSACTION_getParcelables: 187 { 188 data.enforceInterface(descriptor); 189 android.foo.ExampleParcelable[] _result = this.getParcelables(); 190 reply.writeNoException(); 191 reply.writeTypedArray(_result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 192 return true; 193 } 194 case TRANSACTION_setScanMode: 195 { 196 data.enforceInterface(descriptor); 197 int _arg0; 198 _arg0 = data.readInt(); 199 int _arg1; 200 _arg1 = data.readInt(); 201 boolean _result = this.setScanMode(_arg0, _arg1); 202 reply.writeNoException(); 203 reply.writeInt(((_result)?(1):(0))); 204 return true; 205 } 206 case TRANSACTION_registerBinder: 207 { 208 data.enforceInterface(descriptor); 209 android.bar.IAuxInterface _arg0; 210 _arg0 = android.bar.IAuxInterface.Stub.asInterface(data.readStrongBinder()); 211 this.registerBinder(_arg0); 212 reply.writeNoException(); 213 return true; 214 } 215 case TRANSACTION_getRecursiveBinder: 216 { 217 data.enforceInterface(descriptor); 218 android.test.IExampleInterface _result = this.getRecursiveBinder(); 219 reply.writeNoException(); 220 reply.writeStrongBinder((((_result!=null))?(_result.asBinder()):(null))); 221 return true; 222 } 223 case TRANSACTION_takesAnInterface: 224 { 225 data.enforceInterface(descriptor); 226 android.test.IAuxInterface2 _arg0; 227 _arg0 = android.test.IAuxInterface2.Stub.asInterface(data.readStrongBinder()); 228 int _result = this.takesAnInterface(_arg0); 229 reply.writeNoException(); 230 reply.writeInt(_result); 231 return true; 232 } 233 case TRANSACTION_takesAParcelable: 234 { 235 data.enforceInterface(descriptor); 236 android.test.CompoundParcelable.Subclass1 _arg0; 237 if ((0!=data.readInt())) { 238 _arg0 = android.test.CompoundParcelable.Subclass1.CREATOR.createFromParcel(data); 239 } 240 else { 241 _arg0 = null; 242 } 243 android.test.CompoundParcelable.Subclass2 _arg1; 244 if ((0!=data.readInt())) { 245 _arg1 = android.test.CompoundParcelable.Subclass2.CREATOR.createFromParcel(data); 246 } 247 else { 248 _arg1 = null; 249 } 250 int _result = this.takesAParcelable(_arg0, _arg1); 251 reply.writeNoException(); 252 reply.writeInt(_result); 253 if ((_arg1!=null)) { 254 reply.writeInt(1); 255 _arg1.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 256 } 257 else { 258 reply.writeInt(0); 259 } 260 return true; 261 } 262 default: 263 { 264 return super.onTransact(code, data, reply, flags); 265 } 266 } 267 } 268 private static class Proxy implements android.test.IExampleInterface 269 { 270 private android.os.IBinder mRemote; 271 Proxy(android.os.IBinder remote) 272 { 273 mRemote = remote; 274 } 275 @Override public android.os.IBinder asBinder() 276 { 277 return mRemote; 278 } 279 public java.lang.String getInterfaceDescriptor() 280 { 281 return DESCRIPTOR; 282 } 283 @Override public boolean isEnabled() throws android.os.RemoteException 284 { 285 android.os.Parcel _data = android.os.Parcel.obtain(); 286 android.os.Parcel _reply = android.os.Parcel.obtain(); 287 boolean _result; 288 try { 289 _data.writeInterfaceToken(DESCRIPTOR); 290 mRemote.transact(Stub.TRANSACTION_isEnabled, _data, _reply, 0); 291 _reply.readException(); 292 _result = (0!=_reply.readInt()); 293 } 294 finally { 295 _reply.recycle(); 296 _data.recycle(); 297 } 298 return _result; 299 } 300 @Override public int getState() throws android.os.RemoteException 301 { 302 android.os.Parcel _data = android.os.Parcel.obtain(); 303 android.os.Parcel _reply = android.os.Parcel.obtain(); 304 int _result; 305 try { 306 _data.writeInterfaceToken(DESCRIPTOR); 307 mRemote.transact(Stub.TRANSACTION_getState, _data, _reply, 0); 308 _reply.readException(); 309 _result = _reply.readInt(); 310 } 311 finally { 312 _reply.recycle(); 313 _data.recycle(); 314 } 315 return _result; 316 } 317 @Override public java.lang.String getAddress() throws android.os.RemoteException 318 { 319 android.os.Parcel _data = android.os.Parcel.obtain(); 320 android.os.Parcel _reply = android.os.Parcel.obtain(); 321 java.lang.String _result; 322 try { 323 _data.writeInterfaceToken(DESCRIPTOR); 324 mRemote.transact(Stub.TRANSACTION_getAddress, _data, _reply, 0); 325 _reply.readException(); 326 _result = _reply.readString(); 327 } 328 finally { 329 _reply.recycle(); 330 _data.recycle(); 331 } 332 return _result; 333 } 334 /* Test long comment */ 335 @Override public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException 336 { 337 android.os.Parcel _data = android.os.Parcel.obtain(); 338 android.os.Parcel _reply = android.os.Parcel.obtain(); 339 android.foo.ExampleParcelable[] _result; 340 try { 341 _data.writeInterfaceToken(DESCRIPTOR); 342 mRemote.transact(Stub.TRANSACTION_getParcelables, _data, _reply, 0); 343 _reply.readException(); 344 _result = _reply.createTypedArray(android.foo.ExampleParcelable.CREATOR); 345 } 346 finally { 347 _reply.recycle(); 348 _data.recycle(); 349 } 350 return _result; 351 } 352 // Test short comment 353 354 @Override public boolean setScanMode(int mode, int duration) throws android.os.RemoteException 355 { 356 android.os.Parcel _data = android.os.Parcel.obtain(); 357 android.os.Parcel _reply = android.os.Parcel.obtain(); 358 boolean _result; 359 try { 360 _data.writeInterfaceToken(DESCRIPTOR); 361 _data.writeInt(mode); 362 _data.writeInt(duration); 363 mRemote.transact(Stub.TRANSACTION_setScanMode, _data, _reply, 0); 364 _reply.readException(); 365 _result = (0!=_reply.readInt()); 366 } 367 finally { 368 _reply.recycle(); 369 _data.recycle(); 370 } 371 return _result; 372 } 373 /* Test long comment */// And short comment 374 375 @Override public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException 376 { 377 android.os.Parcel _data = android.os.Parcel.obtain(); 378 android.os.Parcel _reply = android.os.Parcel.obtain(); 379 try { 380 _data.writeInterfaceToken(DESCRIPTOR); 381 _data.writeStrongBinder((((foo!=null))?(foo.asBinder()):(null))); 382 mRemote.transact(Stub.TRANSACTION_registerBinder, _data, _reply, 0); 383 _reply.readException(); 384 } 385 finally { 386 _reply.recycle(); 387 _data.recycle(); 388 } 389 } 390 @Override public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException 391 { 392 android.os.Parcel _data = android.os.Parcel.obtain(); 393 android.os.Parcel _reply = android.os.Parcel.obtain(); 394 android.test.IExampleInterface _result; 395 try { 396 _data.writeInterfaceToken(DESCRIPTOR); 397 mRemote.transact(Stub.TRANSACTION_getRecursiveBinder, _data, _reply, 0); 398 _reply.readException(); 399 _result = android.test.IExampleInterface.Stub.asInterface(_reply.readStrongBinder()); 400 } 401 finally { 402 _reply.recycle(); 403 _data.recycle(); 404 } 405 return _result; 406 } 407 @Override public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException 408 { 409 android.os.Parcel _data = android.os.Parcel.obtain(); 410 android.os.Parcel _reply = android.os.Parcel.obtain(); 411 int _result; 412 try { 413 _data.writeInterfaceToken(DESCRIPTOR); 414 _data.writeStrongBinder((((arg!=null))?(arg.asBinder()):(null))); 415 mRemote.transact(Stub.TRANSACTION_takesAnInterface, _data, _reply, 0); 416 _reply.readException(); 417 _result = _reply.readInt(); 418 } 419 finally { 420 _reply.recycle(); 421 _data.recycle(); 422 } 423 return _result; 424 } 425 @Override public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException 426 { 427 android.os.Parcel _data = android.os.Parcel.obtain(); 428 android.os.Parcel _reply = android.os.Parcel.obtain(); 429 int _result; 430 try { 431 _data.writeInterfaceToken(DESCRIPTOR); 432 if ((arg!=null)) { 433 _data.writeInt(1); 434 arg.writeToParcel(_data, 0); 435 } 436 else { 437 _data.writeInt(0); 438 } 439 if ((arg2!=null)) { 440 _data.writeInt(1); 441 arg2.writeToParcel(_data, 0); 442 } 443 else { 444 _data.writeInt(0); 445 } 446 mRemote.transact(Stub.TRANSACTION_takesAParcelable, _data, _reply, 0); 447 _reply.readException(); 448 _result = _reply.readInt(); 449 if ((0!=_reply.readInt())) { 450 arg2.readFromParcel(_reply); 451 } 452 } 453 finally { 454 _reply.recycle(); 455 _data.recycle(); 456 } 457 return _result; 458 } 459 } 460 static final int TRANSACTION_isEnabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); 461 static final int TRANSACTION_getState = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); 462 static final int TRANSACTION_getAddress = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); 463 static final int TRANSACTION_getParcelables = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); 464 static final int TRANSACTION_setScanMode = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); 465 static final int TRANSACTION_registerBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); 466 static final int TRANSACTION_getRecursiveBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); 467 static final int TRANSACTION_takesAnInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); 468 static final int TRANSACTION_takesAParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); 469 } 470 public static final int EXAMPLE_CONSTANT = 3; 471 public boolean isEnabled() throws android.os.RemoteException; 472 public int getState() throws android.os.RemoteException; 473 public java.lang.String getAddress() throws android.os.RemoteException; 474 /* Test long comment */ 475 public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException; 476 // Test short comment 477 478 public boolean setScanMode(int mode, int duration) throws android.os.RemoteException; 479 /* Test long comment */// And short comment 480 481 public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException; 482 public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException; 483 public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException; 484 public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException; 485 } 486 )"; 487 488 const char kExpectedJavaOutputWithTrace[] = 489 R"(/* 490 * This file is auto-generated. DO NOT MODIFY. 491 * Original file: android/test/IExampleInterface.aidl 492 */ 493 package android.test; 494 public interface IExampleInterface extends android.os.IInterface 495 { 496 /** Local-side IPC implementation stub class. */ 497 public static abstract class Stub extends android.os.Binder implements android.test.IExampleInterface 498 { 499 private static final java.lang.String DESCRIPTOR = "android.test.IExampleInterface"; 500 /** Construct the stub at attach it to the interface. */ 501 public Stub() 502 { 503 this.attachInterface(this, DESCRIPTOR); 504 } 505 /** 506 * Cast an IBinder object into an android.test.IExampleInterface interface, 507 * generating a proxy if needed. 508 */ 509 public static android.test.IExampleInterface asInterface(android.os.IBinder obj) 510 { 511 if ((obj==null)) { 512 return null; 513 } 514 android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); 515 if (((iin!=null)&&(iin instanceof android.test.IExampleInterface))) { 516 return ((android.test.IExampleInterface)iin); 517 } 518 return new android.test.IExampleInterface.Stub.Proxy(obj); 519 } 520 @Override public android.os.IBinder asBinder() 521 { 522 return this; 523 } 524 @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException 525 { 526 java.lang.String descriptor = DESCRIPTOR; 527 switch (code) 528 { 529 case INTERFACE_TRANSACTION: 530 { 531 reply.writeString(descriptor); 532 return true; 533 } 534 case TRANSACTION_isEnabled: 535 { 536 data.enforceInterface(descriptor); 537 boolean _result; 538 try { 539 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::isEnabled::server"); 540 _result = this.isEnabled(); 541 } 542 finally { 543 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 544 } 545 reply.writeNoException(); 546 reply.writeInt(((_result)?(1):(0))); 547 return true; 548 } 549 case TRANSACTION_getState: 550 { 551 data.enforceInterface(descriptor); 552 int _result; 553 try { 554 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getState::server"); 555 _result = this.getState(); 556 } 557 finally { 558 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 559 } 560 reply.writeNoException(); 561 reply.writeInt(_result); 562 return true; 563 } 564 case TRANSACTION_getAddress: 565 { 566 data.enforceInterface(descriptor); 567 java.lang.String _result; 568 try { 569 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getAddress::server"); 570 _result = this.getAddress(); 571 } 572 finally { 573 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 574 } 575 reply.writeNoException(); 576 reply.writeString(_result); 577 return true; 578 } 579 case TRANSACTION_getParcelables: 580 { 581 data.enforceInterface(descriptor); 582 android.foo.ExampleParcelable[] _result; 583 try { 584 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getParcelables::server"); 585 _result = this.getParcelables(); 586 } 587 finally { 588 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 589 } 590 reply.writeNoException(); 591 reply.writeTypedArray(_result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 592 return true; 593 } 594 case TRANSACTION_setScanMode: 595 { 596 data.enforceInterface(descriptor); 597 int _arg0; 598 _arg0 = data.readInt(); 599 int _arg1; 600 _arg1 = data.readInt(); 601 boolean _result; 602 try { 603 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::setScanMode::server"); 604 _result = this.setScanMode(_arg0, _arg1); 605 } 606 finally { 607 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 608 } 609 reply.writeNoException(); 610 reply.writeInt(((_result)?(1):(0))); 611 return true; 612 } 613 case TRANSACTION_registerBinder: 614 { 615 data.enforceInterface(descriptor); 616 android.bar.IAuxInterface _arg0; 617 _arg0 = android.bar.IAuxInterface.Stub.asInterface(data.readStrongBinder()); 618 try { 619 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::registerBinder::server"); 620 this.registerBinder(_arg0); 621 } 622 finally { 623 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 624 } 625 reply.writeNoException(); 626 return true; 627 } 628 case TRANSACTION_getRecursiveBinder: 629 { 630 data.enforceInterface(descriptor); 631 android.test.IExampleInterface _result; 632 try { 633 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getRecursiveBinder::server"); 634 _result = this.getRecursiveBinder(); 635 } 636 finally { 637 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 638 } 639 reply.writeNoException(); 640 reply.writeStrongBinder((((_result!=null))?(_result.asBinder()):(null))); 641 return true; 642 } 643 case TRANSACTION_takesAnInterface: 644 { 645 data.enforceInterface(descriptor); 646 android.test.IAuxInterface2 _arg0; 647 _arg0 = android.test.IAuxInterface2.Stub.asInterface(data.readStrongBinder()); 648 int _result; 649 try { 650 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::takesAnInterface::server"); 651 _result = this.takesAnInterface(_arg0); 652 } 653 finally { 654 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 655 } 656 reply.writeNoException(); 657 reply.writeInt(_result); 658 return true; 659 } 660 case TRANSACTION_takesAParcelable: 661 { 662 data.enforceInterface(descriptor); 663 android.test.CompoundParcelable.Subclass1 _arg0; 664 if ((0!=data.readInt())) { 665 _arg0 = android.test.CompoundParcelable.Subclass1.CREATOR.createFromParcel(data); 666 } 667 else { 668 _arg0 = null; 669 } 670 android.test.CompoundParcelable.Subclass2 _arg1; 671 if ((0!=data.readInt())) { 672 _arg1 = android.test.CompoundParcelable.Subclass2.CREATOR.createFromParcel(data); 673 } 674 else { 675 _arg1 = null; 676 } 677 int _result; 678 try { 679 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::takesAParcelable::server"); 680 _result = this.takesAParcelable(_arg0, _arg1); 681 } 682 finally { 683 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 684 } 685 reply.writeNoException(); 686 reply.writeInt(_result); 687 if ((_arg1!=null)) { 688 reply.writeInt(1); 689 _arg1.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 690 } 691 else { 692 reply.writeInt(0); 693 } 694 return true; 695 } 696 default: 697 { 698 return super.onTransact(code, data, reply, flags); 699 } 700 } 701 } 702 private static class Proxy implements android.test.IExampleInterface 703 { 704 private android.os.IBinder mRemote; 705 Proxy(android.os.IBinder remote) 706 { 707 mRemote = remote; 708 } 709 @Override public android.os.IBinder asBinder() 710 { 711 return mRemote; 712 } 713 public java.lang.String getInterfaceDescriptor() 714 { 715 return DESCRIPTOR; 716 } 717 @Override public boolean isEnabled() throws android.os.RemoteException 718 { 719 android.os.Parcel _data = android.os.Parcel.obtain(); 720 android.os.Parcel _reply = android.os.Parcel.obtain(); 721 boolean _result; 722 try { 723 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::isEnabled::client"); 724 _data.writeInterfaceToken(DESCRIPTOR); 725 mRemote.transact(Stub.TRANSACTION_isEnabled, _data, _reply, 0); 726 _reply.readException(); 727 _result = (0!=_reply.readInt()); 728 } 729 finally { 730 _reply.recycle(); 731 _data.recycle(); 732 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 733 } 734 return _result; 735 } 736 @Override public int getState() throws android.os.RemoteException 737 { 738 android.os.Parcel _data = android.os.Parcel.obtain(); 739 android.os.Parcel _reply = android.os.Parcel.obtain(); 740 int _result; 741 try { 742 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getState::client"); 743 _data.writeInterfaceToken(DESCRIPTOR); 744 mRemote.transact(Stub.TRANSACTION_getState, _data, _reply, 0); 745 _reply.readException(); 746 _result = _reply.readInt(); 747 } 748 finally { 749 _reply.recycle(); 750 _data.recycle(); 751 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 752 } 753 return _result; 754 } 755 @Override public java.lang.String getAddress() throws android.os.RemoteException 756 { 757 android.os.Parcel _data = android.os.Parcel.obtain(); 758 android.os.Parcel _reply = android.os.Parcel.obtain(); 759 java.lang.String _result; 760 try { 761 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getAddress::client"); 762 _data.writeInterfaceToken(DESCRIPTOR); 763 mRemote.transact(Stub.TRANSACTION_getAddress, _data, _reply, 0); 764 _reply.readException(); 765 _result = _reply.readString(); 766 } 767 finally { 768 _reply.recycle(); 769 _data.recycle(); 770 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 771 } 772 return _result; 773 } 774 /* Test long comment */ 775 @Override public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException 776 { 777 android.os.Parcel _data = android.os.Parcel.obtain(); 778 android.os.Parcel _reply = android.os.Parcel.obtain(); 779 android.foo.ExampleParcelable[] _result; 780 try { 781 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getParcelables::client"); 782 _data.writeInterfaceToken(DESCRIPTOR); 783 mRemote.transact(Stub.TRANSACTION_getParcelables, _data, _reply, 0); 784 _reply.readException(); 785 _result = _reply.createTypedArray(android.foo.ExampleParcelable.CREATOR); 786 } 787 finally { 788 _reply.recycle(); 789 _data.recycle(); 790 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 791 } 792 return _result; 793 } 794 // Test short comment 795 796 @Override public boolean setScanMode(int mode, int duration) throws android.os.RemoteException 797 { 798 android.os.Parcel _data = android.os.Parcel.obtain(); 799 android.os.Parcel _reply = android.os.Parcel.obtain(); 800 boolean _result; 801 try { 802 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::setScanMode::client"); 803 _data.writeInterfaceToken(DESCRIPTOR); 804 _data.writeInt(mode); 805 _data.writeInt(duration); 806 mRemote.transact(Stub.TRANSACTION_setScanMode, _data, _reply, 0); 807 _reply.readException(); 808 _result = (0!=_reply.readInt()); 809 } 810 finally { 811 _reply.recycle(); 812 _data.recycle(); 813 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 814 } 815 return _result; 816 } 817 /* Test long comment */// And short comment 818 819 @Override public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException 820 { 821 android.os.Parcel _data = android.os.Parcel.obtain(); 822 android.os.Parcel _reply = android.os.Parcel.obtain(); 823 try { 824 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::registerBinder::client"); 825 _data.writeInterfaceToken(DESCRIPTOR); 826 _data.writeStrongBinder((((foo!=null))?(foo.asBinder()):(null))); 827 mRemote.transact(Stub.TRANSACTION_registerBinder, _data, _reply, 0); 828 _reply.readException(); 829 } 830 finally { 831 _reply.recycle(); 832 _data.recycle(); 833 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 834 } 835 } 836 @Override public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException 837 { 838 android.os.Parcel _data = android.os.Parcel.obtain(); 839 android.os.Parcel _reply = android.os.Parcel.obtain(); 840 android.test.IExampleInterface _result; 841 try { 842 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::getRecursiveBinder::client"); 843 _data.writeInterfaceToken(DESCRIPTOR); 844 mRemote.transact(Stub.TRANSACTION_getRecursiveBinder, _data, _reply, 0); 845 _reply.readException(); 846 _result = android.test.IExampleInterface.Stub.asInterface(_reply.readStrongBinder()); 847 } 848 finally { 849 _reply.recycle(); 850 _data.recycle(); 851 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 852 } 853 return _result; 854 } 855 @Override public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException 856 { 857 android.os.Parcel _data = android.os.Parcel.obtain(); 858 android.os.Parcel _reply = android.os.Parcel.obtain(); 859 int _result; 860 try { 861 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::takesAnInterface::client"); 862 _data.writeInterfaceToken(DESCRIPTOR); 863 _data.writeStrongBinder((((arg!=null))?(arg.asBinder()):(null))); 864 mRemote.transact(Stub.TRANSACTION_takesAnInterface, _data, _reply, 0); 865 _reply.readException(); 866 _result = _reply.readInt(); 867 } 868 finally { 869 _reply.recycle(); 870 _data.recycle(); 871 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 872 } 873 return _result; 874 } 875 @Override public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException 876 { 877 android.os.Parcel _data = android.os.Parcel.obtain(); 878 android.os.Parcel _reply = android.os.Parcel.obtain(); 879 int _result; 880 try { 881 android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "IExampleInterface::takesAParcelable::client"); 882 _data.writeInterfaceToken(DESCRIPTOR); 883 if ((arg!=null)) { 884 _data.writeInt(1); 885 arg.writeToParcel(_data, 0); 886 } 887 else { 888 _data.writeInt(0); 889 } 890 if ((arg2!=null)) { 891 _data.writeInt(1); 892 arg2.writeToParcel(_data, 0); 893 } 894 else { 895 _data.writeInt(0); 896 } 897 mRemote.transact(Stub.TRANSACTION_takesAParcelable, _data, _reply, 0); 898 _reply.readException(); 899 _result = _reply.readInt(); 900 if ((0!=_reply.readInt())) { 901 arg2.readFromParcel(_reply); 902 } 903 } 904 finally { 905 _reply.recycle(); 906 _data.recycle(); 907 android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL); 908 } 909 return _result; 910 } 911 } 912 static final int TRANSACTION_isEnabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); 913 static final int TRANSACTION_getState = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); 914 static final int TRANSACTION_getAddress = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); 915 static final int TRANSACTION_getParcelables = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); 916 static final int TRANSACTION_setScanMode = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); 917 static final int TRANSACTION_registerBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); 918 static final int TRANSACTION_getRecursiveBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); 919 static final int TRANSACTION_takesAnInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); 920 static final int TRANSACTION_takesAParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); 921 } 922 public static final int EXAMPLE_CONSTANT = 3; 923 public boolean isEnabled() throws android.os.RemoteException; 924 public int getState() throws android.os.RemoteException; 925 public java.lang.String getAddress() throws android.os.RemoteException; 926 /* Test long comment */ 927 public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException; 928 // Test short comment 929 930 public boolean setScanMode(int mode, int duration) throws android.os.RemoteException; 931 /* Test long comment */// And short comment 932 933 public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException; 934 public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException; 935 public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException; 936 public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException; 937 } 938 )"; 939 940 const char kExpectedJavaOutputOutlining[] = 941 R"(/* 942 * This file is auto-generated. DO NOT MODIFY. 943 * Original file: android/test/IExampleInterface.aidl 944 */ 945 package android.test; 946 public interface IExampleInterface extends android.os.IInterface 947 { 948 /** Local-side IPC implementation stub class. */ 949 public static abstract class Stub extends android.os.Binder implements android.test.IExampleInterface 950 { 951 private static final java.lang.String DESCRIPTOR = "android.test.IExampleInterface"; 952 /** Construct the stub at attach it to the interface. */ 953 public Stub() 954 { 955 this.attachInterface(this, DESCRIPTOR); 956 } 957 /** 958 * Cast an IBinder object into an android.test.IExampleInterface interface, 959 * generating a proxy if needed. 960 */ 961 public static android.test.IExampleInterface asInterface(android.os.IBinder obj) 962 { 963 if ((obj==null)) { 964 return null; 965 } 966 android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); 967 if (((iin!=null)&&(iin instanceof android.test.IExampleInterface))) { 968 return ((android.test.IExampleInterface)iin); 969 } 970 return new android.test.IExampleInterface.Stub.Proxy(obj); 971 } 972 @Override public android.os.IBinder asBinder() 973 { 974 return this; 975 } 976 @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException 977 { 978 java.lang.String descriptor = DESCRIPTOR; 979 switch (code) 980 { 981 case INTERFACE_TRANSACTION: 982 { 983 reply.writeString(descriptor); 984 return true; 985 } 986 case TRANSACTION_isEnabled: 987 { 988 data.enforceInterface(descriptor); 989 boolean _result = this.isEnabled(); 990 reply.writeNoException(); 991 reply.writeInt(((_result)?(1):(0))); 992 return true; 993 } 994 case TRANSACTION_getState: 995 { 996 return this.onTransact$getState$(data, reply); 997 } 998 case TRANSACTION_getAddress: 999 { 1000 data.enforceInterface(descriptor); 1001 java.lang.String _result = this.getAddress(); 1002 reply.writeNoException(); 1003 reply.writeString(_result); 1004 return true; 1005 } 1006 case TRANSACTION_getParcelables: 1007 { 1008 data.enforceInterface(descriptor); 1009 android.foo.ExampleParcelable[] _result = this.getParcelables(); 1010 reply.writeNoException(); 1011 reply.writeTypedArray(_result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 1012 return true; 1013 } 1014 case TRANSACTION_setScanMode: 1015 { 1016 return this.onTransact$setScanMode$(data, reply); 1017 } 1018 case TRANSACTION_registerBinder: 1019 { 1020 return this.onTransact$registerBinder$(data, reply); 1021 } 1022 case TRANSACTION_getRecursiveBinder: 1023 { 1024 return this.onTransact$getRecursiveBinder$(data, reply); 1025 } 1026 case TRANSACTION_takesAnInterface: 1027 { 1028 return this.onTransact$takesAnInterface$(data, reply); 1029 } 1030 case TRANSACTION_takesAParcelable: 1031 { 1032 return this.onTransact$takesAParcelable$(data, reply); 1033 } 1034 default: 1035 { 1036 return super.onTransact(code, data, reply, flags); 1037 } 1038 } 1039 } 1040 private static class Proxy implements android.test.IExampleInterface 1041 { 1042 private android.os.IBinder mRemote; 1043 Proxy(android.os.IBinder remote) 1044 { 1045 mRemote = remote; 1046 } 1047 @Override public android.os.IBinder asBinder() 1048 { 1049 return mRemote; 1050 } 1051 public java.lang.String getInterfaceDescriptor() 1052 { 1053 return DESCRIPTOR; 1054 } 1055 @Override public boolean isEnabled() throws android.os.RemoteException 1056 { 1057 android.os.Parcel _data = android.os.Parcel.obtain(); 1058 android.os.Parcel _reply = android.os.Parcel.obtain(); 1059 boolean _result; 1060 try { 1061 _data.writeInterfaceToken(DESCRIPTOR); 1062 mRemote.transact(Stub.TRANSACTION_isEnabled, _data, _reply, 0); 1063 _reply.readException(); 1064 _result = (0!=_reply.readInt()); 1065 } 1066 finally { 1067 _reply.recycle(); 1068 _data.recycle(); 1069 } 1070 return _result; 1071 } 1072 @Override public int getState(int a, int b) throws android.os.RemoteException 1073 { 1074 android.os.Parcel _data = android.os.Parcel.obtain(); 1075 android.os.Parcel _reply = android.os.Parcel.obtain(); 1076 int _result; 1077 try { 1078 _data.writeInterfaceToken(DESCRIPTOR); 1079 _data.writeInt(a); 1080 _data.writeInt(b); 1081 mRemote.transact(Stub.TRANSACTION_getState, _data, _reply, 0); 1082 _reply.readException(); 1083 _result = _reply.readInt(); 1084 } 1085 finally { 1086 _reply.recycle(); 1087 _data.recycle(); 1088 } 1089 return _result; 1090 } 1091 @Override public java.lang.String getAddress() throws android.os.RemoteException 1092 { 1093 android.os.Parcel _data = android.os.Parcel.obtain(); 1094 android.os.Parcel _reply = android.os.Parcel.obtain(); 1095 java.lang.String _result; 1096 try { 1097 _data.writeInterfaceToken(DESCRIPTOR); 1098 mRemote.transact(Stub.TRANSACTION_getAddress, _data, _reply, 0); 1099 _reply.readException(); 1100 _result = _reply.readString(); 1101 } 1102 finally { 1103 _reply.recycle(); 1104 _data.recycle(); 1105 } 1106 return _result; 1107 } 1108 /* Test long comment */ 1109 @Override public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException 1110 { 1111 android.os.Parcel _data = android.os.Parcel.obtain(); 1112 android.os.Parcel _reply = android.os.Parcel.obtain(); 1113 android.foo.ExampleParcelable[] _result; 1114 try { 1115 _data.writeInterfaceToken(DESCRIPTOR); 1116 mRemote.transact(Stub.TRANSACTION_getParcelables, _data, _reply, 0); 1117 _reply.readException(); 1118 _result = _reply.createTypedArray(android.foo.ExampleParcelable.CREATOR); 1119 } 1120 finally { 1121 _reply.recycle(); 1122 _data.recycle(); 1123 } 1124 return _result; 1125 } 1126 // Test short comment 1127 1128 @Override public boolean setScanMode(int mode, int duration) throws android.os.RemoteException 1129 { 1130 android.os.Parcel _data = android.os.Parcel.obtain(); 1131 android.os.Parcel _reply = android.os.Parcel.obtain(); 1132 boolean _result; 1133 try { 1134 _data.writeInterfaceToken(DESCRIPTOR); 1135 _data.writeInt(mode); 1136 _data.writeInt(duration); 1137 mRemote.transact(Stub.TRANSACTION_setScanMode, _data, _reply, 0); 1138 _reply.readException(); 1139 _result = (0!=_reply.readInt()); 1140 } 1141 finally { 1142 _reply.recycle(); 1143 _data.recycle(); 1144 } 1145 return _result; 1146 } 1147 /* Test long comment */// And short comment 1148 1149 @Override public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException 1150 { 1151 android.os.Parcel _data = android.os.Parcel.obtain(); 1152 android.os.Parcel _reply = android.os.Parcel.obtain(); 1153 try { 1154 _data.writeInterfaceToken(DESCRIPTOR); 1155 _data.writeStrongBinder((((foo!=null))?(foo.asBinder()):(null))); 1156 mRemote.transact(Stub.TRANSACTION_registerBinder, _data, _reply, 0); 1157 _reply.readException(); 1158 } 1159 finally { 1160 _reply.recycle(); 1161 _data.recycle(); 1162 } 1163 } 1164 @Override public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException 1165 { 1166 android.os.Parcel _data = android.os.Parcel.obtain(); 1167 android.os.Parcel _reply = android.os.Parcel.obtain(); 1168 android.test.IExampleInterface _result; 1169 try { 1170 _data.writeInterfaceToken(DESCRIPTOR); 1171 mRemote.transact(Stub.TRANSACTION_getRecursiveBinder, _data, _reply, 0); 1172 _reply.readException(); 1173 _result = android.test.IExampleInterface.Stub.asInterface(_reply.readStrongBinder()); 1174 } 1175 finally { 1176 _reply.recycle(); 1177 _data.recycle(); 1178 } 1179 return _result; 1180 } 1181 @Override public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException 1182 { 1183 android.os.Parcel _data = android.os.Parcel.obtain(); 1184 android.os.Parcel _reply = android.os.Parcel.obtain(); 1185 int _result; 1186 try { 1187 _data.writeInterfaceToken(DESCRIPTOR); 1188 _data.writeStrongBinder((((arg!=null))?(arg.asBinder()):(null))); 1189 mRemote.transact(Stub.TRANSACTION_takesAnInterface, _data, _reply, 0); 1190 _reply.readException(); 1191 _result = _reply.readInt(); 1192 } 1193 finally { 1194 _reply.recycle(); 1195 _data.recycle(); 1196 } 1197 return _result; 1198 } 1199 @Override public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException 1200 { 1201 android.os.Parcel _data = android.os.Parcel.obtain(); 1202 android.os.Parcel _reply = android.os.Parcel.obtain(); 1203 int _result; 1204 try { 1205 _data.writeInterfaceToken(DESCRIPTOR); 1206 if ((arg!=null)) { 1207 _data.writeInt(1); 1208 arg.writeToParcel(_data, 0); 1209 } 1210 else { 1211 _data.writeInt(0); 1212 } 1213 if ((arg2!=null)) { 1214 _data.writeInt(1); 1215 arg2.writeToParcel(_data, 0); 1216 } 1217 else { 1218 _data.writeInt(0); 1219 } 1220 mRemote.transact(Stub.TRANSACTION_takesAParcelable, _data, _reply, 0); 1221 _reply.readException(); 1222 _result = _reply.readInt(); 1223 if ((0!=_reply.readInt())) { 1224 arg2.readFromParcel(_reply); 1225 } 1226 } 1227 finally { 1228 _reply.recycle(); 1229 _data.recycle(); 1230 } 1231 return _result; 1232 } 1233 } 1234 static final int TRANSACTION_isEnabled = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); 1235 static final int TRANSACTION_getState = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); 1236 private boolean onTransact$getState$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1237 { 1238 data.enforceInterface(DESCRIPTOR); 1239 int _arg0; 1240 _arg0 = data.readInt(); 1241 int _arg1; 1242 _arg1 = data.readInt(); 1243 int _result = this.getState(_arg0, _arg1); 1244 reply.writeNoException(); 1245 reply.writeInt(_result); 1246 return true; 1247 } 1248 static final int TRANSACTION_getAddress = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); 1249 static final int TRANSACTION_getParcelables = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); 1250 static final int TRANSACTION_setScanMode = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); 1251 private boolean onTransact$setScanMode$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1252 { 1253 data.enforceInterface(DESCRIPTOR); 1254 int _arg0; 1255 _arg0 = data.readInt(); 1256 int _arg1; 1257 _arg1 = data.readInt(); 1258 boolean _result = this.setScanMode(_arg0, _arg1); 1259 reply.writeNoException(); 1260 reply.writeInt(((_result)?(1):(0))); 1261 return true; 1262 } 1263 static final int TRANSACTION_registerBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); 1264 private boolean onTransact$registerBinder$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1265 { 1266 data.enforceInterface(DESCRIPTOR); 1267 android.bar.IAuxInterface _arg0; 1268 _arg0 = android.bar.IAuxInterface.Stub.asInterface(data.readStrongBinder()); 1269 this.registerBinder(_arg0); 1270 reply.writeNoException(); 1271 return true; 1272 } 1273 static final int TRANSACTION_getRecursiveBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); 1274 private boolean onTransact$getRecursiveBinder$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1275 { 1276 data.enforceInterface(DESCRIPTOR); 1277 android.test.IExampleInterface _result = this.getRecursiveBinder(); 1278 reply.writeNoException(); 1279 reply.writeStrongBinder((((_result!=null))?(_result.asBinder()):(null))); 1280 return true; 1281 } 1282 static final int TRANSACTION_takesAnInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7); 1283 private boolean onTransact$takesAnInterface$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1284 { 1285 data.enforceInterface(DESCRIPTOR); 1286 android.test.IAuxInterface2 _arg0; 1287 _arg0 = android.test.IAuxInterface2.Stub.asInterface(data.readStrongBinder()); 1288 int _result = this.takesAnInterface(_arg0); 1289 reply.writeNoException(); 1290 reply.writeInt(_result); 1291 return true; 1292 } 1293 static final int TRANSACTION_takesAParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8); 1294 private boolean onTransact$takesAParcelable$(android.os.Parcel data, android.os.Parcel reply) throws android.os.RemoteException 1295 { 1296 data.enforceInterface(DESCRIPTOR); 1297 android.test.CompoundParcelable.Subclass1 _arg0; 1298 if ((0!=data.readInt())) { 1299 _arg0 = android.test.CompoundParcelable.Subclass1.CREATOR.createFromParcel(data); 1300 } 1301 else { 1302 _arg0 = null; 1303 } 1304 android.test.CompoundParcelable.Subclass2 _arg1; 1305 if ((0!=data.readInt())) { 1306 _arg1 = android.test.CompoundParcelable.Subclass2.CREATOR.createFromParcel(data); 1307 } 1308 else { 1309 _arg1 = null; 1310 } 1311 int _result = this.takesAParcelable(_arg0, _arg1); 1312 reply.writeNoException(); 1313 reply.writeInt(_result); 1314 if ((_arg1!=null)) { 1315 reply.writeInt(1); 1316 _arg1.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE); 1317 } 1318 else { 1319 reply.writeInt(0); 1320 } 1321 return true; 1322 } 1323 } 1324 public static final int EXAMPLE_CONSTANT = 3; 1325 public boolean isEnabled() throws android.os.RemoteException; 1326 public int getState(int a, int b) throws android.os.RemoteException; 1327 public java.lang.String getAddress() throws android.os.RemoteException; 1328 /* Test long comment */ 1329 public android.foo.ExampleParcelable[] getParcelables() throws android.os.RemoteException; 1330 // Test short comment 1331 1332 public boolean setScanMode(int mode, int duration) throws android.os.RemoteException; 1333 /* Test long comment */// And short comment 1334 1335 public void registerBinder(android.bar.IAuxInterface foo) throws android.os.RemoteException; 1336 public android.test.IExampleInterface getRecursiveBinder() throws android.os.RemoteException; 1337 public int takesAnInterface(android.test.IAuxInterface2 arg) throws android.os.RemoteException; 1338 public int takesAParcelable(android.test.CompoundParcelable.Subclass1 arg, android.test.CompoundParcelable.Subclass2 arg2) throws android.os.RemoteException; 1339 } 1340 )"; 1341 1342 } // namespace example_interface 1343 } // namespace test_data 1344 } // namespace aidl 1345 } // namespace android 1346