Home
last modified time | relevance | path

Searched refs:pi (Results 1 – 25 of 174) sorted by relevance

1234567

/frameworks/base/tests/ProtoInputStreamTests/src/com/android/test/protoinputstream/
DProtoInputStreamObjectTest.java38 void parseProto(ProtoInputStream pi) throws IOException { in parseProto() argument
50 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in parseProto()
51 switch (pi.getFieldNumber()) { in parseProto()
53 mChar = (char) pi.readInt(charId); in parseProto()
56 mLargeChar = (char) pi.readInt(largeCharId); in parseProto()
59 mString = pi.readString(stringId); in parseProto()
62 long token = pi.start(nestedId); in parseProto()
64 mNested.parseProto(pi); in parseProto()
65 pi.end(token); in parseProto()
68 fail("Unexpected field id " + pi.getFieldNumber()); in parseProto()
[all …]
DProtoInputStreamEnumTest.java73 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
75 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
76 switch (pi.getFieldNumber()) { in testRead()
81 results[1] = pi.readInt(fieldId2); in testRead()
84 results[2] = pi.readInt(fieldId3); in testRead()
87 results[3] = pi.readInt(fieldId4); in testRead()
90 results[4] = pi.readInt(fieldId5); in testRead()
96 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
131 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
134 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamBoolTest.java65 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
67 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
68 switch (pi.getFieldNumber()) { in testRead()
73 results[1] = pi.readBoolean(fieldId2); in testRead()
79 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
108 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
112 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
113 switch (pi.getFieldNumber()) { in testReadCompat()
115 result = pi.readBoolean(fieldId); in testReadCompat()
118 fail("Unexpected field id " + pi.getFieldNumber()); in testReadCompat()
[all …]
DProtoInputStreamStringTest.java69 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
71 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
73 switch (pi.getFieldNumber()) { in testRead()
75 results[0] = pi.readString(fieldId1); in testRead()
78 results[1] = pi.readString(fieldId2); in testRead()
81 results[2] = pi.readString(fieldId3); in testRead()
84 results[3] = pi.readString(fieldId4); in testRead()
90 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
122 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
126 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamSFixed64Test.java86 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
88 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
89 switch (pi.getFieldNumber()) { in testRead()
94 results[1] = pi.readLong(fieldId2); in testRead()
97 results[2] = pi.readLong(fieldId3); in testRead()
100 results[3] = pi.readLong(fieldId4); in testRead()
103 results[4] = pi.readLong(fieldId5); in testRead()
106 results[5] = pi.readLong(fieldId6); in testRead()
109 results[6] = pi.readLong(fieldId7); in testRead()
115 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
[all …]
DProtoInputStreamUInt64Test.java83 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
85 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
86 switch (pi.getFieldNumber()) { in testRead()
91 results[1] = pi.readLong(fieldId2); in testRead()
94 results[2] = pi.readLong(fieldId3); in testRead()
97 results[3] = pi.readLong(fieldId4); in testRead()
100 results[4] = pi.readLong(fieldId5); in testRead()
103 results[5] = pi.readLong(fieldId6); in testRead()
106 results[6] = pi.readLong(fieldId7); in testRead()
112 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
[all …]
DProtoInputStreamSInt64Test.java81 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
83 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
84 switch (pi.getFieldNumber()) { in testRead()
89 results[1] = pi.readLong(fieldId2); in testRead()
92 results[2] = pi.readLong(fieldId3); in testRead()
95 results[3] = pi.readLong(fieldId4); in testRead()
98 results[4] = pi.readLong(fieldId5); in testRead()
101 results[5] = pi.readLong(fieldId6); in testRead()
104 results[6] = pi.readLong(fieldId7); in testRead()
110 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
[all …]
DProtoInputStreamFixed64Test.java86 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
88 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
89 switch (pi.getFieldNumber()) { in testRead()
94 results[1] = pi.readLong(fieldId2); in testRead()
97 results[2] = pi.readLong(fieldId3); in testRead()
100 results[3] = pi.readLong(fieldId4); in testRead()
103 results[4] = pi.readLong(fieldId5); in testRead()
106 results[5] = pi.readLong(fieldId6); in testRead()
109 results[6] = pi.readLong(fieldId7); in testRead()
115 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
[all …]
DProtoInputStreamInt64Test.java84 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
86 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
87 switch (pi.getFieldNumber()) { in testRead()
92 results[1] = pi.readLong(fieldId2); in testRead()
95 results[2] = pi.readLong(fieldId3); in testRead()
98 results[3] = pi.readLong(fieldId4); in testRead()
101 results[4] = pi.readLong(fieldId5); in testRead()
104 results[5] = pi.readLong(fieldId6); in testRead()
107 results[6] = pi.readLong(fieldId7); in testRead()
113 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
[all …]
DProtoInputStreamSInt32Test.java71 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
73 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
74 switch (pi.getFieldNumber()) { in testRead()
79 results[1] = pi.readInt(fieldId2); in testRead()
82 results[2] = pi.readInt(fieldId3); in testRead()
85 results[3] = pi.readInt(fieldId4); in testRead()
88 results[4] = pi.readInt(fieldId5); in testRead()
94 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
129 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
133 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamFixed32Test.java71 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
73 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
74 switch (pi.getFieldNumber()) { in testRead()
79 results[1] = pi.readInt(fieldId2); in testRead()
82 results[2] = pi.readInt(fieldId3); in testRead()
85 results[3] = pi.readInt(fieldId4); in testRead()
88 results[4] = pi.readInt(fieldId5); in testRead()
94 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
129 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
133 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamSFixed32Test.java71 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
73 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
74 switch (pi.getFieldNumber()) { in testRead()
79 results[1] = pi.readInt(fieldId2); in testRead()
82 results[2] = pi.readInt(fieldId3); in testRead()
85 results[3] = pi.readInt(fieldId4); in testRead()
88 results[4] = pi.readInt(fieldId5); in testRead()
94 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
129 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
133 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamInt32Test.java73 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
75 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
76 switch (pi.getFieldNumber()) { in testRead()
81 results[1] = pi.readInt(fieldId2); in testRead()
84 results[2] = pi.readInt(fieldId3); in testRead()
87 results[3] = pi.readInt(fieldId4); in testRead()
90 results[4] = pi.readInt(fieldId5); in testRead()
96 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
131 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
135 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamUInt32Test.java73 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
75 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
76 switch (pi.getFieldNumber()) { in testRead()
81 results[1] = pi.readInt(fieldId2); in testRead()
84 results[2] = pi.readInt(fieldId3); in testRead()
87 results[3] = pi.readInt(fieldId4); in testRead()
90 results[4] = pi.readInt(fieldId5); in testRead()
96 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
131 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
135 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamBytesTest.java73 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
75 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
77 switch (pi.getFieldNumber()) { in testRead()
79 results[0] = pi.readBytes(fieldId1); in testRead()
82 results[1] = pi.readBytes(fieldId2); in testRead()
85 results[2] = pi.readBytes(fieldId3); in testRead()
88 results[3] = pi.readBytes(fieldId4); in testRead()
94 fail("Unexpected field id " + pi.getFieldNumber()); in testRead()
132 final ProtoInputStream pi = new ProtoInputStream(proto); in testReadCompat() local
136 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testReadCompat()
[all …]
DProtoInputStreamFloatTest.java88 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
90 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
91 switch (pi.getFieldNumber()) { in testRead()
96 results[1] = pi.readFloat(fieldId2); in testRead()
99 results[2] = pi.readFloat(fieldId3); in testRead()
102 results[3] = pi.readFloat(fieldId4); in testRead()
105 results[4] = pi.readFloat(fieldId5); in testRead()
108 results[5] = pi.readFloat(fieldId6); in testRead()
111 results[6] = pi.readFloat(fieldId7); in testRead()
114 results[7] = pi.readFloat(fieldId8); in testRead()
[all …]
DProtoInputStreamDoubleTest.java97 final ProtoInputStream pi = new ProtoInputStream(stream, chunkSize); in testRead() local
99 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testRead()
100 switch (pi.getFieldNumber()) { in testRead()
105 results[1] = pi.readDouble(fieldId2); in testRead()
108 results[2] = pi.readDouble(fieldId3); in testRead()
111 results[3] = pi.readDouble(fieldId4); in testRead()
114 results[4] = pi.readDouble(fieldId5); in testRead()
117 results[5] = pi.readDouble(fieldId6); in testRead()
120 results[6] = pi.readDouble(fieldId7); in testRead()
123 results[7] = pi.readDouble(fieldId8); in testRead()
[all …]
DProtoInputStreamIncompleteValueTest.java46 final ProtoInputStream pi = new ProtoInputStream(stream); in testIncompleteVarint() local
48 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testIncompleteVarint()
50 switch (pi.getFieldNumber()) { in testIncompleteVarint()
52 pi.readInt(fieldId1); in testIncompleteVarint()
56 fail("Unexpected field id " + pi.getFieldNumber()); in testIncompleteVarint()
84 final ProtoInputStream pi = new ProtoInputStream(stream); in testIncompleteFixed64() local
86 while (pi.nextField() != ProtoInputStream.NO_MORE_FIELDS) { in testIncompleteFixed64()
88 switch (pi.getFieldNumber()) { in testIncompleteFixed64()
90 pi.readLong(fieldId2); in testIncompleteFixed64()
94 fail("Unexpected field id " + pi.getFieldNumber()); in testIncompleteFixed64()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/
DUriGrantsMockContext.java171 final ProviderInfo pi = new ProviderInfo(); in buildCameraProvider() local
172 pi.packageName = PKG_CAMERA; in buildCameraProvider()
173 pi.authority = PKG_CAMERA; in buildCameraProvider()
174 pi.readPermission = android.Manifest.permission.READ_EXTERNAL_STORAGE; in buildCameraProvider()
175 pi.writePermission = android.Manifest.permission.WRITE_EXTERNAL_STORAGE; in buildCameraProvider()
176 pi.grantUriPermissions = true; in buildCameraProvider()
177 pi.applicationInfo = new ApplicationInfo(); in buildCameraProvider()
178 pi.applicationInfo.uid = UserHandle.getUid(userId, UID_CAMERA); in buildCameraProvider()
179 return pi; in buildCameraProvider()
183 final ProviderInfo pi = new ProviderInfo(); in buildPrivateProvider() local
[all …]
/frameworks/opt/net/wifi/libwifi_system/
Dsupplicant_manager.cpp43 const prop_info* pi; in StartSupplicant() local
59 pi = __system_property_find(kSupplicantInitProperty); in StartSupplicant()
60 if (pi != NULL) { in StartSupplicant()
61 serial = __system_property_serial(pi); in StartSupplicant()
68 if (pi == NULL) { in StartSupplicant()
69 pi = __system_property_find(kSupplicantInitProperty); in StartSupplicant()
71 if (pi != NULL) { in StartSupplicant()
76 if (__system_property_serial(pi) != serial) { in StartSupplicant()
77 __system_property_read(pi, NULL, supp_status); in StartSupplicant()
/frameworks/base/media/java/android/media/session/
DMediaSessionLegacyHelper.java167 public MediaSession getSession(PendingIntent pi) { in getSession() argument
168 SessionHolder holder = mSessions.get(pi); in getSession()
202 public void addRccListener(PendingIntent pi, MediaSession.Callback listener) { in addRccListener() argument
203 if (pi == null) { in addRccListener()
207 SessionHolder holder = getHolder(pi, true); in addRccListener()
225 Log.d(TAG, "Added rcc listener for " + pi + "."); in addRccListener()
229 public void removeRccListener(PendingIntent pi) { in removeRccListener() argument
230 if (pi == null) { in removeRccListener()
233 SessionHolder holder = getHolder(pi, false); in removeRccListener()
240 Log.d(TAG, "Removed rcc listener for " + pi + "."); in removeRccListener()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/
DTestSystemImpl.java128 public void setPackageInfo(PackageInfo pi) { in setPackageInfo() argument
129 setPackageInfoForUser(PRIMARY_USER_ID, pi); in setPackageInfo()
132 public void setPackageInfoForUser(int userId, PackageInfo pi) { in setPackageInfoForUser() argument
136 if (!mPackages.containsKey(pi.packageName)) { in setPackageInfoForUser()
137 mPackages.put(pi.packageName, new HashMap<Integer, PackageInfo>()); in setPackageInfoForUser()
139 mPackages.get(pi.packageName).put(userId, pi); in setPackageInfoForUser()
151 PackageInfo pi = null; in getFactoryPackageVersion() local
155 pi = userPackages.get(PRIMARY_USER_ID); in getFactoryPackageVersion()
156 if (pi != null && pi.applicationInfo.isSystemApp()) { in getFactoryPackageVersion()
157 return pi.applicationInfo.longVersionCode; in getFactoryPackageVersion()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DShortcutManagerTest5.java78 PackageInfo pi = mShortcutService.getPackageInfo( in testGetPackageInfo() local
80 assertEquals(mMyPackage, pi.packageName); in testGetPackageInfo()
81 assertNull(pi.signatures); in testGetPackageInfo()
82 assertNull(pi.signingInfo); in testGetPackageInfo()
84 pi = mShortcutService.getPackageInfo( in testGetPackageInfo()
86 assertEquals(mMyPackage, pi.packageName); in testGetPackageInfo()
87 assertNull(pi.signatures); in testGetPackageInfo()
88 assertNotNull(pi.signingInfo); in testGetPackageInfo()
90 pi = mShortcutService.getPackageInfo( in testGetPackageInfo()
92 assertNull(pi); in testGetPackageInfo()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DPermissionHelper.java87 PackageInfo pi = mPackageManager.getPackageInfo(pkg, GET_PERMISSIONS, userId); in hasRequestedPermission() local
88 if (pi == null || pi.requestedPermissions == null) { in hasRequestedPermission()
91 for (String perm : pi.requestedPermissions) { in hasRequestedPermission()
111 for (PackageInfo pi : pkgs) { in getAppsRequestingPermission()
115 if (pi.requestedPermissions == null) { in getAppsRequestingPermission()
118 for (String perm : pi.requestedPermissions) { in getAppsRequestingPermission()
120 requested.add(new Pair<>(pi.applicationInfo.uid, pi.packageName)); in getAppsRequestingPermission()
157 for (PackageInfo pi : parceledList.getList()) { in getAppsGrantedPermission()
158 granted.add(new Pair<>(pi.applicationInfo.uid, pi.packageName)); in getAppsGrantedPermission()
288 PackageInfo pi = mPackageManager.getPackageInfo(packageName, GET_PERMISSIONS, userId); in packageRequestsNotificationPermission() local
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DShortcutPackageInfo.java130 public void updateFromPackageInfo(@NonNull PackageInfo pi) { in updateFromPackageInfo() argument
131 if (pi != null) { in updateFromPackageInfo()
132 mVersionCode = pi.getLongVersionCode(); in updateFromPackageInfo()
133 mLastUpdateTime = pi.lastUpdateTime; in updateFromPackageInfo()
134 mBackupAllowed = ShortcutService.shouldBackupApp(pi); in updateFromPackageInfo()
167 final PackageInfo pi = s.getPackageInfoWithSignatures(packageName, packageUserId); in generateForInstalledPackageForTest() local
169 SigningInfo signingInfo = pi.signingInfo; in generateForInstalledPackageForTest()
176 final ShortcutPackageInfo ret = new ShortcutPackageInfo(pi.getLongVersionCode(), in generateForInstalledPackageForTest()
177 pi.lastUpdateTime, BackupUtils.hashSignatureArray(signatures), /* shadow=*/ false); in generateForInstalledPackageForTest()
179 ret.mBackupSourceBackupAllowed = s.shouldBackupApp(pi); in generateForInstalledPackageForTest()
[all …]

1234567