/frameworks/base/core/tests/coretests/src/android/text/method/ |
D | BackspaceTest.java | 61 private void backspace(final EditorState state, int modifiers) { in backspace() argument 62 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace() 64 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace() 70 state.mText = mTextView.getText(); in backspace() 71 state.mSelectionStart = mTextView.getSelectionStart(); in backspace() 72 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace() 77 EditorState state = new EditorState(); in testCombiningEnclosingKeycaps() local 79 state.setByString("'1' U+E0101 U+20E3 |"); in testCombiningEnclosingKeycaps() 80 backspace(state, 0); in testCombiningEnclosingKeycaps() 81 state.assertEquals("|"); in testCombiningEnclosingKeycaps() [all …]
|
D | ForwardDeleteTest.java | 59 private void forwardDelete(final EditorState state, int modifiers) { in forwardDelete() argument 60 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete() 62 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete() 68 state.mText = mTextView.getText(); in forwardDelete() 69 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete() 70 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete() 75 EditorState state = new EditorState(); in testCombiningEnclosingKeycaps() local 78 state.setByString("| '1' U+20E3 U+20E3"); in testCombiningEnclosingKeycaps() 79 forwardDelete(state, 0); in testCombiningEnclosingKeycaps() 80 state.assertEquals("|"); in testCombiningEnclosingKeycaps() [all …]
|
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/ |
D | PackageVerificationStateTest.java | 35 PackageVerificationState state = new PackageVerificationState(null); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() local 36 state.addRequiredVerifierUid(REQUIRED_UID_1); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 39 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 41 state.setVerifierResponse(REQUIRED_UID_1, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 44 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 47 state.isInstallAllowed()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 51 PackageVerificationState state = new PackageVerificationState(null); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() local 52 state.addRequiredVerifierUid(REQUIRED_UID_1); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() 55 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() 57 state.setVerifierResponse(REQUIRED_UID_1, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/libcore/regression/ |
D | StrictMathPerfTest.java | 77 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsD() local 78 while (state.keepRunning()) { in timeAbsD() 85 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsF() local 86 while (state.keepRunning()) { in timeAbsF() 93 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsI() local 94 while (state.keepRunning()) { in timeAbsI() 101 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsL() local 102 while (state.keepRunning()) { in timeAbsL() 109 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAcos() local 110 while (state.keepRunning()) { in timeAcos() [all …]
|
D | MathPerfTest.java | 51 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsD() local 52 while (state.keepRunning()) { in timeAbsD() 60 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsF() local 61 while (state.keepRunning()) { in timeAbsF() 69 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsI() local 70 while (state.keepRunning()) { in timeAbsI() 78 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAbsL() local 79 while (state.keepRunning()) { in timeAbsL() 87 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeAcos() local 88 while (state.keepRunning()) { in timeAcos() [all …]
|
D | IntegralToStringPerfTest.java | 40 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in time_IntegerToString_small() local 41 while (state.keepRunning()) { in time_IntegerToString_small() 48 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in time_IntegerToString_medium() local 49 while (state.keepRunning()) { in time_IntegerToString_medium() 56 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in time_IntegerToString_large() local 57 while (state.keepRunning()) { in time_IntegerToString_large() 64 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in time_IntegerToString2_small() local 65 while (state.keepRunning()) { in time_IntegerToString2_small() 72 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in time_IntegerToString2_medium() local 73 while (state.keepRunning()) { in time_IntegerToString2_medium() [all …]
|
D | AnnotatedElementPerfTest.java | 55 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetTypeAnnotations() local 56 while (state.keepRunning()) { in timeGetTypeAnnotations() 63 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetFieldAnnotations() local 64 while (state.keepRunning()) { in timeGetFieldAnnotations() 71 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetMethodAnnotations() local 72 while (state.keepRunning()) { in timeGetMethodAnnotations() 79 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetParameterAnnotations() local 80 while (state.keepRunning()) { in timeGetParameterAnnotations() 87 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetTypeAnnotation() local 88 while (state.keepRunning()) { in timeGetTypeAnnotation() [all …]
|
D | RealToStringPerfTest.java | 40 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeFloat_toString_NaN() local 41 while (state.keepRunning()) { in timeFloat_toString_NaN() 48 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeFloat_toString_NEGATIVE_INFINITY() local 49 while (state.keepRunning()) { in timeFloat_toString_NEGATIVE_INFINITY() 56 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeFloat_toString_POSITIVE_INFINITY() local 57 while (state.keepRunning()) { in timeFloat_toString_POSITIVE_INFINITY() 64 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeFloat_toString_zero() local 65 while (state.keepRunning()) { in timeFloat_toString_zero() 72 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeFloat_toString_minusZero() local 73 while (state.keepRunning()) { in timeFloat_toString_minusZero() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/ |
D | MobileStateTest.kt | 32 private val state = MobileState() constant in com.android.systemui.statusbar.connectivity.MobileStateTest 37 state.iconGroup = TelephonyIcons.DATA_DISABLED in testIsDataDisabledOrNotDefault_dataDisabled() 38 state.userSetup = true in testIsDataDisabledOrNotDefault_dataDisabled() 39 assertTrue(state.isDataDisabledOrNotDefault) in testIsDataDisabledOrNotDefault_dataDisabled() 44 state.iconGroup = TelephonyIcons.NOT_DEFAULT_DATA in testIsDataDisabledOrNotDefault_notDefaultData() 45 state.userSetup = true in testIsDataDisabledOrNotDefault_notDefaultData() 46 assertTrue(state.isDataDisabledOrNotDefault) in testIsDataDisabledOrNotDefault_notDefaultData() 51 state.iconGroup = TelephonyIcons.G in testIsDataDisabledOrNotDefault_notDisabled() 52 state.userSetup = true in testIsDataDisabledOrNotDefault_notDisabled() 53 assertFalse(state.isDataDisabledOrNotDefault) in testIsDataDisabledOrNotDefault_notDisabled() [all …]
|
/frameworks/base/cmds/incident_helper/tests/ |
D | CpuFreqParser_test.cpp | 60 CpuFreqProto::Stats::TimeInState* state; in TEST_F() local 64 state = cpu0->add_times(); in TEST_F() 65 state->set_state_khz(307200); in TEST_F() 66 state->set_time_jiffy(23860761); in TEST_F() 67 state = cpu0->add_times(); in TEST_F() 68 state->set_state_khz(384000); in TEST_F() 69 state->set_time_jiffy(83124); in TEST_F() 70 state = cpu0->add_times(); in TEST_F() 71 state->set_state_khz(768000); in TEST_F() 72 state->set_time_jiffy(22652); in TEST_F() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
D | ServiceStateStatsTest.java | 160 CellularServiceState state = captor.getValue(); in conclude_inService() local 161 assertEquals(TelephonyManager.NETWORK_TYPE_LTE, state.voiceRat); in conclude_inService() 162 assertEquals(TelephonyManager.NETWORK_TYPE_LTE, state.dataRat); in conclude_inService() 163 assertEquals(ServiceState.ROAMING_TYPE_NOT_ROAMING, state.voiceRoamingType); in conclude_inService() 164 assertEquals(ServiceState.ROAMING_TYPE_NOT_ROAMING, state.dataRoamingType); in conclude_inService() 165 assertFalse(state.isEndc); in conclude_inService() 166 assertEquals(0, state.simSlotIndex); in conclude_inService() 167 assertFalse(state.isMultiSim); in conclude_inService() 168 assertEquals(CARRIER1_ID, state.carrierId); in conclude_inService() 169 assertEquals(100L, state.totalTimeMillis); in conclude_inService() [all …]
|
D | SimSlotStateTest.java | 96 SimSlotState state = SimSlotState.getCurrentState(); in testEmptySlots() local 99 assertEquals(0, state.numActiveSlots); in testEmptySlots() 100 assertEquals(0, state.numActiveSims); in testEmptySlots() 101 assertEquals(0, state.numActiveEsims); in testEmptySlots() 102 assertEquals(0, state.numActiveEsimSlots); in testEmptySlots() 103 assertEquals(0, state.numActiveMepSlots); in testEmptySlots() 112 SimSlotState state = SimSlotState.getCurrentState(); in testSingleSim_nullSlot() local 115 assertEquals(0, state.numActiveSlots); in testSingleSim_nullSlot() 116 assertEquals(0, state.numActiveSims); in testSingleSim_nullSlot() 117 assertEquals(0, state.numActiveEsims); in testSingleSim_nullSlot() [all …]
|
/frameworks/libs/binary_translation/guest_state/ |
D | guest_state.cc | 60 void InitThreadState(ThreadState* state) { in InitThreadState() argument 62 memset(&(state->cpu), 0, sizeof(CPUState)); in InitThreadState() 65 state->thread = nullptr; in InitThreadState() 66 SetTlsAddr(*state, 0); in InitThreadState() 68 state->pending_signals_status.store(kPendingSignalsDisabled, std::memory_order_relaxed); in InitThreadState() 69 state->residence = kOutsideGeneratedCode; in InitThreadState() 70 state->instrument_data = nullptr; in InitThreadState() 74 const ThreadState* state) { in InitializeNativeBridgeGuestStateHeader() argument 78 guest_state_header->guest_state_data = state; in InitializeNativeBridgeGuestStateHeader() 89 ThreadState* state = in CreateThreadState() local [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/ |
D | QSTileViewImplTest.kt | 69 val state = QSTile.State() in testSecondaryLabelNotModified_unavailable() constant 71 state.state = Tile.STATE_UNAVAILABLE in testSecondaryLabelNotModified_unavailable() 72 state.secondaryLabel = testString in testSecondaryLabelNotModified_unavailable() 74 tileView.changeState(state) in testSecondaryLabelNotModified_unavailable() 76 assertThat(state.secondaryLabel as CharSequence).isEqualTo(testString) in testSecondaryLabelNotModified_unavailable() 81 val state = QSTile.BooleanState() in testSecondaryLabelNotModified_booleanInactive() constant 83 state.state = Tile.STATE_INACTIVE in testSecondaryLabelNotModified_booleanInactive() 84 state.secondaryLabel = testString in testSecondaryLabelNotModified_booleanInactive() 86 tileView.changeState(state) in testSecondaryLabelNotModified_booleanInactive() 88 assertThat(state.secondaryLabel as CharSequence).isEqualTo(testString) in testSecondaryLabelNotModified_booleanInactive() [all …]
|
/frameworks/libs/binary_translation/guest_abi/arm/ |
D | guest_params_test.cc | 27 void SetVfpFloat(ThreadState* state, int index, float v) { in SetVfpFloat() argument 28 reinterpret_cast<float*>(state->cpu.d)[index] = v; in SetVfpFloat() 31 void SetVfpDouble(ThreadState* state, int index, double v) { in SetVfpDouble() argument 32 reinterpret_cast<double*>(state->cpu.d)[index] = v; in SetVfpDouble() 36 ThreadState state{}; in TEST() local 38 auto&& [ret] = GuestReturnReference<int()>(&state); in TEST() 39 auto&& [retf] = GuestReturnReference<int (*)()>(&state); in TEST() 40 auto&& [retv] = GuestReturnReference<int(...)>(&state); in TEST() 41 auto&& [retfv] = GuestReturnReference<int (*)(...)>(&state); in TEST() 44 EXPECT_EQ(123u, state.cpu.r[0]); in TEST() [all …]
|
/frameworks/native/services/vibratorservice/benchmarks/ |
D | VibratorHalControllerBenchmarks.cpp | 141 auto getOtherArg(const State& state, std::size_t index) const { return state.range(index + 0); } in getOtherArg() argument 152 bool shouldSkipWithMissingCapabilityMessage(vibrator::Capabilities query, State& state) { in shouldSkipWithMissingCapabilityMessage() argument 155 state.SkipWithError(result.errorMessage()); in shouldSkipWithMissingCapabilityMessage() 159 state.SkipWithMessage("capability result is unsupported"); in shouldSkipWithMissingCapabilityMessage() 163 state.SkipWithMessage("missing capability"); in shouldSkipWithMissingCapabilityMessage() 171 const char* label, State& state) { in shouldSkipWithError() argument 172 return shouldSkipWithError(mController.doWithRetry<R>(halFn, label), state); in shouldSkipWithError() 176 bool shouldSkipWithError(const vibrator::HalResult<R>& result, State& state) { in shouldSkipWithError() argument 178 state.SkipWithError(result.errorMessage()); in shouldSkipWithError() 196 (State& state){code} BENCHMARK_REGISTER_F(fixt, test) \ [all …]
|
/frameworks/base/libs/input/ |
D | SpriteController.cpp | 125 if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) { in doUpdateSprites() 126 update.state.surfaceWidth = update.state.icon.width(); in doUpdateSprites() 127 update.state.surfaceHeight = update.state.icon.height(); in doUpdateSprites() 128 update.state.surfaceDrawn = false; in doUpdateSprites() 129 update.state.surfaceVisible = false; in doUpdateSprites() 130 update.state.surfaceControl = in doUpdateSprites() 131 obtainSurface(update.state.surfaceWidth, update.state.surfaceHeight, in doUpdateSprites() 132 update.state.displayId, update.state.skipScreenshot); in doUpdateSprites() 133 if (update.state.surfaceControl != NULL) { in doUpdateSprites() 144 if (update.state.surfaceControl == nullptr) { in doUpdateSprites() [all …]
|
/frameworks/libs/binary_translation/guest_abi/arm64/ |
D | guest_params_test.cc | 31 ThreadState state{}; in TEST() local 35 state.cpu.x[0] = ToGuestAddr(&x); in TEST() 36 state.cpu.x[1] = static_cast<uint64_t>(1234u); in TEST() 37 state.cpu.x[2] = static_cast<uint64_t>(-7); in TEST() 39 auto [param1, param2, param3] = GuestParamsValues<void(int*, unsigned int, int)>(&state); in TEST() 40 auto [param1f, param2f, param3f] = GuestParamsValues<void (*)(int*, unsigned int, int)>(&state); in TEST() 41 auto [param1v, param2v, param3v] = GuestParamsValues<void(int*, unsigned int, int, ...)>(&state); in TEST() 43 GuestParamsValues<void (*)(int*, unsigned int, int, ...)>(&state); in TEST() 63 ThreadState state{}; in TEST() local 65 auto&& [ret] = GuestReturnReference<int()>(&state); in TEST() [all …]
|
/frameworks/native/services/surfaceflinger/tests/unittests/ |
D | SurfaceFlinger_SetDisplayStateTest.cpp | 40 DisplayState state; in TEST_F() local 41 state.what = DisplayState::eLayerStackChanged; in TEST_F() 42 state.token = displayToken; in TEST_F() 43 state.layerStack = LAYER_STACK; in TEST_F() 48 uint32_t flags = mFlinger.setDisplayStateLocked(state); in TEST_F() 71 DisplayState state; in TEST_F() local 72 state.what = 0; in TEST_F() 73 state.token = display.token(); in TEST_F() 78 uint32_t flags = mFlinger.setDisplayStateLocked(state); in TEST_F() 104 DisplayState state; in TEST_F() local [all …]
|
/frameworks/libs/binary_translation/guest_abi/riscv64/ |
D | guest_params_test.cc | 32 ThreadState state{}; in TEST() local 36 SetXReg<A0>(state.cpu, ToGuestAddr(&x)); in TEST() 37 SetXReg<A1>(state.cpu, 1234); in TEST() 38 SetXReg<A2>(state.cpu, 0xffff'ffff'ffff'fff9U); in TEST() 41 GuestParamsValues<void(int*, unsigned int, int), GuestAbi::kLp64d>(&state); in TEST() 43 GuestParamsValues<void (*)(int*, unsigned int, int), GuestAbi::kLp64d>(&state); in TEST() 45 GuestParamsValues<void(int*, unsigned int, int, ...), GuestAbi::kLp64d>(&state); in TEST() 47 GuestParamsValues<void (*)(int*, unsigned int, int, ...), GuestAbi::kLp64d>(&state); in TEST() 67 ThreadState state{}; in TEST() local 69 auto&& [ret] = GuestReturnReference<int(), GuestAbi::kLp64d>(&state); in TEST() [all …]
|
/frameworks/base/core/java/android/text/method/ |
D | MetaKeyKeyListener.java | 347 int state = content.getSpanFlags(what); in press() local 349 if (state == PRESSED) in press() 351 else if (state == RELEASED) in press() 353 else if (state == USED) in press() 355 else if (state == LOCKED) in press() 435 public static long resetLockedMeta(long state) { in resetLockedMeta() argument 436 if ((state & META_CAP_LOCKED) != 0) { in resetLockedMeta() 437 state &= ~META_SHIFT_MASK; in resetLockedMeta() 439 if ((state & META_ALT_LOCKED) != 0) { in resetLockedMeta() 440 state &= ~META_ALT_MASK; in resetLockedMeta() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/content/res/ |
D | XmlBlockBenchmark.java | 96 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in throwNpeCausedByNullDocument() local 98 while (state.keepRunning()) { in throwNpeCausedByNullDocument() 110 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getNext() local 111 while (state.keepRunning()) { in getNext() 113 state.pauseTiming(); in getNext() 117 state.resumeTiming(); in getNext() 121 private <T> void benchmarkTagFunction(BenchmarkState state, String name, in benchmarkTagFunction() argument 124 while (state.keepRunning()) { in benchmarkTagFunction() 125 state.pauseTiming(); in benchmarkTagFunction() 130 state.resumeTiming(); in benchmarkTagFunction() [all …]
|
/frameworks/rs/ |
D | rsType.cpp | 55 if (mHal.state.lodCount) { in clear() 56 delete [] mHal.state.lodDimX; in clear() 57 delete [] mHal.state.lodDimY; in clear() 58 delete [] mHal.state.lodDimZ; in clear() 60 if (mHal.state.arrayCount > 0) { in clear() 61 delete [] mHal.state.arrays; in clear() 75 uint32_t oldLODCount = mHal.state.lodCount; in compute() 77 uint32_t l2x = rsFindHighBit(mHal.state.dimX) + 1; in compute() 78 uint32_t l2y = rsFindHighBit(mHal.state.dimY) + 1; in compute() 79 uint32_t l2z = rsFindHighBit(mHal.state.dimZ) + 1; in compute() [all …]
|
D | rsProgram.cpp | 32 mHal.state.inputElementsCount++; in Program() 35 mHal.state.constantsCount++; in Program() 38 mHal.state.texturesCount++; in Program() 42 mTextures = new ObjectBaseRef<Allocation>[mHal.state.texturesCount]; in Program() 43 mSamplers = new ObjectBaseRef<Sampler>[mHal.state.texturesCount]; in Program() 44 mInputElements = new ObjectBaseRef<Element>[mHal.state.inputElementsCount]; in Program() 45 mConstantTypes = new ObjectBaseRef<Type>[mHal.state.constantsCount]; in Program() 46 mConstants = new ObjectBaseRef<Allocation>[mHal.state.constantsCount]; in Program() 48 mHal.state.textures = new Allocation*[mHal.state.texturesCount]; in Program() 49 mHal.state.samplers = new Sampler*[mHal.state.texturesCount]; in Program() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | StaticLayoutPerfTest.java | 98 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() local 100 while (state.keepRunning()) { in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() 110 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() local 111 while (state.keepRunning()) { in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 112 state.pauseTiming(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 114 state.resumeTiming(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 125 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() local 126 while (state.keepRunning()) { in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 127 state.pauseTiming(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 129 state.resumeTiming(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() [all …]
|