/aosp14/frameworks/base/core/tests/coretests/src/android/util/ |
H A D | SparseDoubleArrayTest.java | 46 final int[] keys = {1, 6, -14, 53251, 5, -13412, 12, 0, 2}; in testPutGet() local 52 for (int i = 0; i < keys.length; i++) { in testPutGet() 53 sda.put(keys[i], values[i]); in testPutGet() 56 assertEquals("Wrong size array", keys.length, sda.size()); in testPutGet() 58 for (int i = 0; i < keys.length; i++) { in testPutGet() 82 final int[] keys = {1, 6, -14, 53251, 5, -13412, 12, 0, 2}; in testKeyValueAt() local 88 for (int i = 0; i < keys.length; i++) { in testKeyValueAt() 89 sda.put(keys[i], values[i]); in testKeyValueAt() 94 for (int i = 0; i < keys.length; i++) { in testKeyValueAt() 95 map.put(keys[i], values[i]); in testKeyValueAt() [all …]
|
H A D | SparseLongArrayTest.java | 79 final int[] keys = new int[size]; in generateRandomKeys() local 80 keys[0] = -1 * mRandom.nextInt(size * 500); in generateRandomKeys() 82 keys[i] = keys[i - 1] + 1 + mRandom.nextInt(1000); in generateRandomKeys() 83 assertTrue(keys[i] > keys[i - 1]); in generateRandomKeys() 85 return keys; in generateRandomKeys()
|
/aosp14/frameworks/base/services/core/java/com/android/server/power/stats/ |
H A D | BluetoothPowerCalculator.java | 49 public BatteryConsumer.Key[] keys; field in BluetoothPowerCalculator.PowerAndDuration 77 BatteryConsumer.Key[] keys = UNINITIALIZED_KEYS; in calculate() local 84 if (keys == UNINITIALIZED_KEYS) { in calculate() 87 powerAndDuration.keys = keys; in calculate() 90 keys = null; in calculate() 150 for (int j = 0; j < powerAndDuration.keys.length; j++) { in calculateApp() 151 BatteryConsumer.Key key = powerAndDuration.keys[j]; in calculateApp() 188 if (uid != null && powerAndDuration.keys != null) { in calculatePowerAndDuration() 189 for (int i = 0; i < powerAndDuration.keys.length; i++) { in calculatePowerAndDuration() 190 BatteryConsumer.Key key = powerAndDuration.keys[i]; in calculatePowerAndDuration() [all …]
|
H A D | WifiPowerCalculator.java | 58 public BatteryConsumer.Key[] keys; field in WifiPowerCalculator.PowerDurationAndTraffic 91 BatteryConsumer.Key[] keys = UNINITIALIZED_KEYS; in calculate() local 99 if (keys == UNINITIALIZED_KEYS) { in calculate() 101 keys = app.getKeys(BatteryConsumer.POWER_COMPONENT_WIFI); in calculate() 102 powerDurationAndTraffic.keys = keys; in calculate() 105 keys = null; in calculate() 126 if (query.isProcessStateDataNeeded() && keys != null) { in calculate() 127 for (int j = 0; j < keys.length; j++) { in calculate() 128 BatteryConsumer.Key key = keys[j]; in calculate() 202 if (powerDurationAndTraffic.keys != null) { in calculateApp() [all …]
|
H A D | CpuPowerCalculator.java | 105 BatteryConsumer.Key[] keys = UNINITIALIZED_KEYS; in calculate() local 114 if (keys == UNINITIALIZED_KEYS) { in calculate() 116 keys = app.getKeys(BatteryConsumer.POWER_COMPONENT_CPU); in calculate() 118 keys = null; in calculate() 121 calculateApp(app, app.getBatteryStatsUid(), query, result, keys); in calculate() 151 if (query.isProcessStateDataNeeded() && keys != null) { in calculateApp() 154 calculateEnergyConsumptionPerProcessState(app, u, keys); in calculateApp() 164 BatteryStats.Uid u, BatteryConsumer.Key[] keys) { in calculateEnergyConsumptionPerProcessState() argument 165 for (BatteryConsumer.Key key : keys) { in calculateEnergyConsumptionPerProcessState() 183 BatteryStats.Uid u, BatteryConsumer.Key[] keys, Result result) { in calculateModeledPowerPerProcessState() argument [all …]
|
H A D | MobileRadioPowerCalculator.java | 150 BatteryConsumer.Key[] keys = UNINITIALIZED_KEYS; in calculate() local 155 if (keys == UNINITIALIZED_KEYS) { in calculate() 157 keys = app.getKeys(BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO); in calculate() 159 keys = null; in calculate() 183 if (query.isProcessStateDataNeeded() && keys != null) { in calculate() 184 for (BatteryConsumer.Key key : keys) { in calculate() 233 if (query.isProcessStateDataNeeded() && keys != null) { in calculate() 235 for (BatteryConsumer.Key key : keys) { in calculate()
|
/aosp14/frameworks/base/core/java/android/os/health/ |
H A D | HealthStatsWriter.java | 166 int[] keys; in flattenToParcel() local 174 for (int i=0; i<keys.length; i++) { in flattenToParcel() 176 out.writeInt(keys[i]); in flattenToParcel() 185 for (int i=0; i<keys.length; i++) { in flattenToParcel() 187 out.writeInt(keys[i]); in flattenToParcel() 195 for (int i=0; i<keys.length; i++) { in flattenToParcel() 197 out.writeInt(keys[i]); in flattenToParcel() 205 for (int i=0; i<keys.length; i++) { in flattenToParcel() 207 out.writeInt(keys[i]); in flattenToParcel() 215 for (int i=0; i<keys.length; i++) { in flattenToParcel() [all …]
|
H A D | HealthKeys.java | 103 final SortedIntArray[] keys = new SortedIntArray[mKeys.length]; in Constants() local 104 for (int i=0; i<keys.length; i++) { in Constants() 105 keys[i] = new SortedIntArray(N); in Constants() 113 if (type >= keys.length) { in Constants() 118 keys[type].addValue(field.getInt(null)); in Constants() 126 for (int i=0; i<keys.length; i++) { in Constants() 127 mKeys[i] = keys[i].getArray(); in Constants()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
H A D | ForegroundServicesUserState.java | 57 final ArraySet<Integer> keys = mAppOps.get(pkg); in removeOp() local 58 if (keys == null) { in removeOp() 61 found = keys.remove(op); in removeOp() 62 if (keys.size() == 0) { in removeOp() 103 final ArraySet<String> keys = map.get(pkg); in removeNotification() local 104 if (keys == null) { in removeNotification() 107 found = keys.remove(key); in removeNotification() 108 if (keys.size() == 0) { in removeNotification()
|
/aosp14/frameworks/base/test-base/src/android/test/ |
H A D | InstrumentationTestCase.java | 254 final String[] keys = keysSequence.split(" "); in sendKeys() local 255 final int count = keys.length; in sendKeys() 260 String key = keys[i]; in sendKeys() 305 public void sendKeys(int... keys) { in sendKeys() argument 306 final int count = keys.length; in sendKeys() 311 instrumentation.sendKeyDownUpSync(keys[i]); in sendKeys() 329 public void sendRepeatedKeys(int... keys) { in sendRepeatedKeys() argument 330 final int count = keys.length; in sendRepeatedKeys() 339 final int keyCount = keys[i]; in sendRepeatedKeys() 340 final int keyCode = keys[i + 1]; in sendRepeatedKeys()
|
/aosp14/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/scaffold/ |
H A D | RestrictedMenuItemTest.kt | 51 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) 60 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) 70 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 80 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 91 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 101 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 112 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 122 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY))
|
/aosp14/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/preference/ |
H A D | RestrictedSwitchPreferenceTest.kt | 58 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) 68 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) 78 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 89 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 100 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 111 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 122 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) 134 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY))
|
/aosp14/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/ |
H A D | KeySetManagerServiceTest.java | 420 keys.add(keyA); in testAddDefinedKSToPackageEmpty() 447 keys.add(keyA); in testAddDefinedKSToPackageDoubleAlias() 477 keys.add(keyA); in testAddDefinedKSToPackageOrthoUpgr() 484 keys.add(keyB); in testAddDefinedKSToPackageOrthoUpgr() 517 keys.add(keyA); in testAddDefinedKSToPackageOrthoUpgrAliasSame() 524 keys.add(keyB); in testAddDefinedKSToPackageOrthoUpgrAliasSame() 662 keys.add(keyA); in testAddUpgradeKSToPackageEmpty() 684 keys.add(keyA); in testAddUpgradeKSToPackageWrong() 711 keys.add(keyA); in testAddUpgradeKSToPackageDisappear() 720 keys.add(keyB); in testAddUpgradeKSToPackageDisappear() [all …]
|
/aosp14/frameworks/base/core/java/android/os/ |
H A D | PowerComponents.java | 65 final BatteryConsumer.Key[] keys = in getConsumedPower() local 68 for (int i = keys.length - 1; i >= 0; i--) { in getConsumedPower() 69 totalPowerMah += mData.getDouble(keys[i].mPowerColumnIndex); in getConsumedPower() 223 for (BatteryConsumer.Key key : keys) { in writeStatsProtoImpl() 333 for (BatteryConsumer.Key key : keys) { in writeToXml() 469 for (BatteryConsumer.Key[] keys : mData.layout.keys) { in Builder() 470 for (BatteryConsumer.Key key : keys) { in Builder() 557 final BatteryConsumer.Key[] keys = mData.layout.keys[componentId]; in addPowerAndDuration() local 558 for (BatteryConsumer.Key key: keys) { in addPowerAndDuration() 646 for (BatteryConsumer.Key[] keys : mData.layout.keys) { in build() [all …]
|
H A D | BatteryConsumer.java | 589 return layout.keys[componentId]; in getKeys() 615 return layout.keys[componentId][0]; in getKey() 617 for (Key key : layout.keys[componentId]) { in getKey() 689 public final Key[][] keys; field in BatteryConsumer.BatteryConsumerDataLayout 707 keys = new Key[POWER_COMPONENT_COUNT][]; in BatteryConsumerDataLayout() 747 keys[componentId] = perComponentKeys.toArray(KEY_ARRAY); in BatteryConsumerDataLayout() 759 for (int i = 0; i < keys.length; i++) { in BatteryConsumerDataLayout() 760 for (int j = 0; j < keys[i].length; j++) { in BatteryConsumerDataLayout() 761 if (keys[i][j].processState == processState) { in BatteryConsumerDataLayout() 762 perProcStateKeys.add(keys[i][j]); in BatteryConsumerDataLayout()
|
/aosp14/frameworks/base/core/java/android/app/backup/ |
H A D | FileBackupHelperBase.java | 55 ParcelFileDescriptor newState, String[] files, String[] keys) { in performBackup_checked() argument 66 if (files.length != keys.length) { in performBackup_checked() 68 + " keys.length=" + keys.length); in performBackup_checked() 77 int err = performBackup_native(oldStateFd, data.mBackupWriter, newStateFd, files, keys); in performBackup_checked() 124 long data, FileDescriptor newState, String[] files, String[] keys); in performBackup_native() argument
|
/aosp14/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
H A D | MessageUtilsTest.java | 55 private SparseArray<String> makeSparseArray(int[] keys, String[] values) throws Exception { in makeSparseArray() argument 56 assertEquals("Must specify same number of keys and values", keys.length, values.length); in makeSparseArray() 58 for (int i = 0; i < keys.length; i++) { in makeSparseArray() 59 out.put(keys[i], values[i]); in makeSparseArray()
|
/aosp14/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | SnapshotStatistics.java | 415 int[] keys = mTimeBins.userKeys(); in dumpTimes() local 416 for (int i = 0; i < keys.length; i++) { in dumpTimes() 418 TextUtils.formatSimple("<= %dms", keys[i])); in dumpTimes() 421 TextUtils.formatSimple("> %dms", keys[keys.length - 1])); in dumpTimes() 436 int[] keys = mUseBins.userKeys(); in dumpUsage() local 437 for (int i = 0; i < keys.length; i++) { in dumpUsage() 438 pw.format(Locale.US, " %10s", TextUtils.formatSimple("<= %d", keys[i])); in dumpUsage() 441 TextUtils.formatSimple("> %d", keys[keys.length - 1])); in dumpUsage()
|
/aosp14/frameworks/base/core/jni/ |
H A D | android_backup_FileBackupHelperBase.cpp | 42 jobject newState, jobjectArray files, jobjectArray keys) in performBackup_native() argument 57 const int keyCount = env->GetArrayLength(keys); in performBackup_native() 60 keysUTF[i] = env->GetStringUTFChars((jstring)env->GetObjectArrayElement(keys, i), NULL); in performBackup_native() 71 env->ReleaseStringUTFChars((jstring)env->GetObjectArrayElement(keys, i), keysUTF[i]); in performBackup_native()
|
/aosp14/frameworks/base/media/jni/ |
H A D | android_media_Streams.cpp | 105 JNIEnv *env, jobjectArray keys, jobjectArray values, in ConvertKeyValueArraysToKeyedVector() argument 110 if (keys != NULL && values != NULL) { in ConvertKeyValueArraysToKeyedVector() 111 nKeyValuePairs = env->GetArrayLength(keys); in ConvertKeyValueArraysToKeyedVector() 116 failed = ((keys != NULL && values == NULL) || in ConvertKeyValueArraysToKeyedVector() 117 (keys == NULL && values != NULL)); in ConvertKeyValueArraysToKeyedVector() 129 jstring key = (jstring) env->GetObjectArrayElement(keys, i); in ConvertKeyValueArraysToKeyedVector() 359 JNIEnv *env, jobjectArray keys, jobjectArray values, in ConvertKeyValueArraysToMessage() argument 376 if (keys != NULL) { in ConvertKeyValueArraysToMessage() 381 numEntries = env->GetArrayLength(keys); in ConvertKeyValueArraysToMessage() 391 jobject keyObj = env->GetObjectArrayElement(keys, i); in ConvertKeyValueArraysToMessage()
|
/aosp14/frameworks/base/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/ |
H A D | RestrictionsProvider.kt | 37 val keys: List<String>, 95 for (key in restrictions.keys) { 100 for (key in restrictions.keys) {
|
/aosp14/frameworks/base/media/java/android/media/ |
H A D | MediaMuxer.java | 295 long nativeObject, @NonNull String[] keys, @NonNull Object[] values); in nativeAddTrack() argument 649 String[] keys = null; in addTrack() local 653 keys = new String[mapSize]; in addTrack() 657 keys[i] = entry.getKey(); in addTrack() 661 trackIndex = nativeAddTrack(mNativeObject, keys, values); in addTrack()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/ |
H A D | DynamicCodeLoggerTests.java | 138 assertThat(mMessagesForUid.keys()).containsExactly(OWNER_UID); in testOneLoader_ownFile_withFileHash() 153 assertThat(mMessagesForUid.keys()).containsExactly(OWNER_UID); in testOneLoader_ownFile_noFileHash() 169 assertThat(mMessagesForUid.keys()).containsExactly(OWNER_UID); in testOneLoader_ownFile_hashingFails() 207 assertThat(mMessagesForUid.keys()).containsExactly(1001); in testOneLoader_differentOwner() 231 assertThat(mMessagesForUid.keys()).containsExactly(OWNER_UID); in testNativeCodeLoad() 254 assertThat(mMessagesForUid.keys()).containsExactly(1001, 1001, 1002, OWNER_UID); in testMultipleLoadersAndFiles()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
H A D | ExtensionControllerImplTest.java | 98 String[] keys = new String[] { "key1", "key2" }; in testTuner() local 101 public String[] keys() { in testTuner() 102 return keys; in testTuner() 113 verify(mTunerService).addTunable(any(), eq(keys[0]), eq(keys[1])); in testTuner()
|
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
H A D | KeySyncUtils.java | 160 SecretKey recoveryKey, Map<String, Pair<SecretKey, byte[]>> keys) in encryptKeysWithRecoveryKey() argument 163 for (String alias : keys.keySet()) { in encryptKeysWithRecoveryKey() 164 SecretKey key = keys.get(alias).first; in encryptKeysWithRecoveryKey() 165 byte[] metadata = keys.get(alias).second; in encryptKeysWithRecoveryKey()
|