xref: /aosp_15_r20/cts/tests/tests/binder_ndk/libbinder_ndk_test/test_package/Foo.aidl (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1 package test_package;
2 
3 import test_package.Bar;
4 import test_package.ByteEnum;
5 import test_package.IntEnum;
6 import test_package.LongEnum;
7 import test_package.SimpleUnion;
8 import android.os.PersistableBundle;
9 
10 parcelable Foo {
11     const int kZero = 0;
12     const int kOne = 1;
13     const int kOnes = 0xffffffff;
14     const byte kByteOne = 1;
15     const long kLongOnes = 0xffffffffffffffff;
16     const String kEmpty = "";
17     const String kFoo = "foo";
18 
19     String a="FOO";
20     int b=42;
21     float c=3.14f;
22     Bar d;
23     Bar e;
24     int f=3;
25     ByteEnum shouldBeByteBar;
26     IntEnum shouldBeIntBar;
27     LongEnum shouldBeLongBar;
28     ByteEnum[] shouldContainTwoByteFoos;
29     IntEnum[] shouldContainTwoIntFoos;
30     LongEnum[] shouldContainTwoLongFoos;
31     @nullable String[] g;
32     @nullable SimpleUnion u;
33 
34     // example: using int constants
35     const int BIT0 = 0x1;
36     const int BIT1 = 0x1 << 1;
37     const int BIT2 = 0x1 << 2;
38     int shouldSetBit0AndBit2;
39 
40     // example: using a String constant of union
41     @nullable SimpleUnion shouldBeConstS1;
42 
43     PersistableBundle bundle1;
44     @nullable PersistableBundle bundle2;
45     PersistableBundle[] bundleArray;
46 }
47