/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/ |
D | PackageVerificationStateTest.java | 33 PackageVerificationState state = new PackageVerificationState(null); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() local 34 state.setRequiredVerifierUid(REQUIRED_UID); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 37 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 39 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 42 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 45 state.isInstallAllowed()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() 49 PackageVerificationState state = new PackageVerificationState(null); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() local 50 state.setRequiredVerifierUid(REQUIRED_UID); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() 53 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() 55 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() [all …]
|
/frameworks/native/services/vibratorservice/benchmarks/ |
D | VibratorHalControllerBenchmarks.cpp | 40 void TearDown(State& state) override { turnVibratorOff(state); } in TearDown() argument 51 auto getOtherArg(const State& state, std::size_t index) const { return state.range(index + 0); } in getOtherArg() argument 53 bool hasCapabilities(vibrator::Capabilities&& query, State& state) { in hasCapabilities() argument 56 state.SkipWithError(result.errorMessage()); in hasCapabilities() 65 void turnVibratorOff(State& state) { in turnVibratorOff() argument 66 checkHalResult(halCall<void>(mController, [](auto hal) { return hal->off(); }), state); in turnVibratorOff() 70 bool checkHalResult(const vibrator::HalResult<R>& result, State& state) { in checkHalResult() argument 72 state.SkipWithError(result.errorMessage()); in checkHalResult() 88 (State& state){code} BENCHMARK_REGISTER_F(fixt, test) \ 93 for (auto _ : state) { [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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
D | ServiceStateStatsTest.java | 135 CellularServiceState state = captor.getValue(); in conclude_inService() local 136 assertEquals(TelephonyManager.NETWORK_TYPE_LTE, state.voiceRat); in conclude_inService() 137 assertEquals(TelephonyManager.NETWORK_TYPE_LTE, state.dataRat); in conclude_inService() 138 assertEquals(ServiceState.ROAMING_TYPE_NOT_ROAMING, state.voiceRoamingType); in conclude_inService() 139 assertEquals(ServiceState.ROAMING_TYPE_NOT_ROAMING, state.dataRoamingType); in conclude_inService() 140 assertFalse(state.isEndc); in conclude_inService() 141 assertEquals(0, state.simSlotIndex); in conclude_inService() 142 assertFalse(state.isMultiSim); in conclude_inService() 143 assertEquals(CARRIER1_ID, state.carrierId); in conclude_inService() 144 assertEquals(100L, state.totalTimeMillis); in conclude_inService() [all …]
|
D | SimSlotStateTest.java | 91 SimSlotState state = SimSlotState.getCurrentState(); in testEmptySlots() local 94 assertEquals(0, state.numActiveSlots); in testEmptySlots() 95 assertEquals(0, state.numActiveSims); in testEmptySlots() 96 assertEquals(0, state.numActiveEsims); in testEmptySlots() 105 SimSlotState state = SimSlotState.getCurrentState(); in testSingleSim_nullSlot() local 108 assertEquals(0, state.numActiveSlots); in testSingleSim_nullSlot() 109 assertEquals(0, state.numActiveSims); in testSingleSim_nullSlot() 110 assertEquals(0, state.numActiveEsims); in testSingleSim_nullSlot() 119 SimSlotState state = SimSlotState.getCurrentState(); in testSingleSim_inactiveSlot() local 122 assertEquals(0, state.numActiveSlots); in testSingleSim_inactiveSlot() [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/base/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/ |
D | QSTileViewImplTest.kt | 66 val state = QSTile.State() in testSecondaryLabelNotModified_unavailable() constant 68 state.state = Tile.STATE_UNAVAILABLE in testSecondaryLabelNotModified_unavailable() 69 state.secondaryLabel = testString in testSecondaryLabelNotModified_unavailable() 71 tileView.changeState(state) in testSecondaryLabelNotModified_unavailable() 73 assertThat(state.secondaryLabel as CharSequence).isEqualTo(testString) in testSecondaryLabelNotModified_unavailable() 78 val state = QSTile.BooleanState() in testSecondaryLabelNotModified_booleanInactive() constant 80 state.state = Tile.STATE_INACTIVE in testSecondaryLabelNotModified_booleanInactive() 81 state.secondaryLabel = testString in testSecondaryLabelNotModified_booleanInactive() 83 tileView.changeState(state) in testSecondaryLabelNotModified_booleanInactive() 85 assertThat(state.secondaryLabel as CharSequence).isEqualTo(testString) in testSecondaryLabelNotModified_booleanInactive() [all …]
|
/frameworks/base/libs/input/ |
D | SpriteController.cpp | 129 if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) { in doUpdateSprites() 130 update.state.surfaceWidth = update.state.icon.width(); in doUpdateSprites() 131 update.state.surfaceHeight = update.state.icon.height(); in doUpdateSprites() 132 update.state.surfaceDrawn = false; in doUpdateSprites() 133 update.state.surfaceVisible = false; in doUpdateSprites() 134 update.state.surfaceControl = obtainSurface( in doUpdateSprites() 135 update.state.surfaceWidth, update.state.surfaceHeight); in doUpdateSprites() 136 if (update.state.surfaceControl != NULL) { in doUpdateSprites() 147 if (update.state.surfaceControl == nullptr) { in doUpdateSprites() 151 if (update.state.wantSurfaceVisible()) { in doUpdateSprites() [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/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/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/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | VrPipline1.java | 36 public void initBuffers(VrState state) { in initBuffers() argument 37 super.initBuffers(state); in initBuffers() 55 private void creatOpacityAllocation(VrState state) { in creatOpacityAllocation() argument 56 scriptC_vr.set_opacity(state.mMaterial.getOpacityAllocation(state.mRs)); in creatOpacityAllocation() 59 private void creatColorMapAllocation(VrState state) { in creatColorMapAllocation() argument 60 scriptC_vr.set_color_map(state.mMaterial.getColorMapAllocation(state.mRs)); in creatColorMapAllocation() 64 public void setupTriangles(VrState state) { in setupTriangles() argument 65 super.setupTriangles(state); in setupTriangles() 69 Matrix m = state.mTransform.getMatrix(Transform.SCREEN_SPACE, Transform.VOLUME_SPACE); in setupTriangles() 73 scriptC_vr = new ScriptC_vr(state.mRs); in setupTriangles() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/ |
D | PowerUITest.java | 349 BatteryStateSnapshotWrapper state = new BatteryStateSnapshotWrapper(); in testMaybeShowHybridWarning() local 350 BatteryStateSnapshot lastState = state.get(); in testMaybeShowHybridWarning() 351 state.mTimeRemainingMillis = Duration.ofHours(2).toMillis(); in testMaybeShowHybridWarning() 352 state.mBatteryLevel = 15; in testMaybeShowHybridWarning() 354 mPowerUI.maybeShowHybridWarning(state.get(), lastState); in testMaybeShowHybridWarning() 360 lastState = state.get(); in testMaybeShowHybridWarning() 361 state.mBatteryLevel = 1; in testMaybeShowHybridWarning() 362 state.mTimeRemainingMillis = Duration.ofMinutes(10).toMillis(); in testMaybeShowHybridWarning() 364 mPowerUI.maybeShowHybridWarning(state.get(), lastState); in testMaybeShowHybridWarning() 370 lastState = state.get(); in testMaybeShowHybridWarning() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | StaticLayoutPerfTest.java | 70 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() local 72 while (state.keepRunning()) { in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() 82 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() local 83 while (state.keepRunning()) { in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 84 state.pauseTiming(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 86 state.resumeTiming(); in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 97 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() local 98 while (state.keepRunning()) { in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 99 state.pauseTiming(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 101 state.resumeTiming(); in testCreate_RandomText_NoStyled_Greedy_Hyphenation() [all …]
|
/frameworks/av/media/libmediatranscoding/transcoder/benchmark/ |
D | MediaTranscoderBenchmark.cpp | 106 static void TranscodeMediaFile(benchmark::State& state, const std::string& srcFileName, in TranscodeMediaFile() argument 135 state.SkipWithError("Unable to open source file"); in TranscodeMediaFile() 139 state.SkipWithError("Unable to open destination file"); in TranscodeMediaFile() 143 for (auto _ : state) { in TranscodeMediaFile() 149 state.SkipWithError("Unable to configure transcoder source"); in TranscodeMediaFile() 155 state.SkipWithError("Unable to configure transcoder destination"); in TranscodeMediaFile() 166 state.SkipWithError("Source track format does not have MIME type"); in TranscodeMediaFile() 173 state.counters[PARAM_VIDEO_FRAME_RATE] = benchmark::Counter( in TranscodeMediaFile() 177 state.SkipWithError("Video source track format does not have width"); in TranscodeMediaFile() 181 state.SkipWithError("Video source track format does not have height"); in TranscodeMediaFile() [all …]
|
/frameworks/av/media/codecs/amrnb/dec/src/ |
D | ph_disp.cpp | 208 Word16 ph_disp_reset(ph_dispState *state) in ph_disp_reset() argument 212 if (state == (ph_dispState *) NULL) in ph_disp_reset() 219 state->gainMem[i] = 0; in ph_disp_reset() 221 state->prevState = 0; in ph_disp_reset() 222 state->prevCbGain = 0; in ph_disp_reset() 223 state->lockFull = 0; in ph_disp_reset() 224 state->onset = 0; /* assume no onset in start */ in ph_disp_reset() 299 void ph_disp_lock(ph_dispState *state) in ph_disp_lock() argument 301 state->lockFull = 1; in ph_disp_lock() 376 void ph_disp_release(ph_dispState *state) in ph_disp_release() argument [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NfcActivityManager.java | 164 for (NfcActivityState state : mActivities) { in findActivityState() 165 if (state.activity == activity) { in findActivityState() 166 return state; in findActivityState() 174 NfcActivityState state = findActivityState(activity); in getActivityState() local 175 if (state == null) { in getActivityState() 176 state = new NfcActivityState(activity); in getActivityState() 177 mActivities.add(state); in getActivityState() 179 return state; in getActivityState() 183 for (NfcActivityState state : mActivities) { in findResumedActivityState() 184 if (state.resumed) { in findResumedActivityState() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/app/ |
D | ResourcesPerfTest.java | 60 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getValue() local 62 while (state.keepRunning()) { in getValue() 69 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getFrameworkValue() local 71 while (state.keepRunning()) { in getFrameworkValue() 79 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getValueString() local 81 while (state.keepRunning()) { in getValueString() 88 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getFrameworkStringValue() local 90 while (state.keepRunning()) { in getFrameworkStringValue() 97 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in getValueManyConfigurations() local 99 while (state.keepRunning()) { in getValueManyConfigurations() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/ |
D | QSTileViewImpl.kt | 312 override fun onStateChanged(state: QSTile.State) { in <lambda>() 314 handleStateChanged(state) in <lambda>() 433 protected open fun handleStateChanged(state: QSTile.State) { in <lambda>() 435 showRippleEffect = state.showRippleEffect in <lambda>() 436 isClickable = state.state != Tile.STATE_UNAVAILABLE in <lambda>() 437 isLongClickable = state.handlesLongClick in <lambda>() 438 icon.setIcon(state, allowAnimations) in <lambda>() 439 contentDescription = state.contentDescription in <lambda>() 443 val arrayResId = SubtitleArrayMapping.getSubtitleId(state.spec) in <lambda>() 444 val stateText = state.getStateText(arrayResId, resources) in <lambda>() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/libcore/ |
D | MethodInvocationPerfTest.java | 46 public void timeInternalGetter(BenchmarkState state) { in timeInternalGetter() argument 48 while (state.keepRunning()) { in timeInternalGetter() 53 public void timeInternalFieldAccess(BenchmarkState state) { in timeInternalFieldAccess() argument 55 while (state.keepRunning()) { in timeInternalFieldAccess() 68 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeInternalGetter() local 69 new C().timeInternalGetter(state); in timeInternalGetter() 73 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeInternalFieldAccess() local 74 new C().timeInternalFieldAccess(state); in timeInternalFieldAccess() 81 BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeStringLength() local 82 while (state.keepRunning()) { in timeStringLength() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/ |
D | NotificationShadeWindowControllerImpl.java | 303 private void applyKeyguardFlags(NotificationShadeWindowState state) { in applyKeyguardFlags() argument 304 final boolean keyguardOrAod = state.keyguardShowing in applyKeyguardFlags() 305 || (state.dozing && mDozeParameters.getAlwaysOn()); in applyKeyguardFlags() 306 if ((keyguardOrAod && !state.mediaBackdropShowing && !state.lightRevealScrimOpaque) in applyKeyguardFlags() 317 if (state.dozing) { in applyKeyguardFlags() 324 boolean onKeyguard = state.statusBarState == StatusBarState.KEYGUARD in applyKeyguardFlags() 325 && !state.keyguardFadingAway && !state.keyguardGoingAway; in applyKeyguardFlags() 339 && state.statusBarState == StatusBarState.KEYGUARD in applyKeyguardFlags() 340 && !state.keyguardFadingAway && !state.keyguardGoingAway; in applyKeyguardFlags() 341 if (state.dozing || bypassOnKeyguard) { in applyKeyguardFlags() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | OomAdjuster.java | 498 final ProcessStateRecord state = app.mState; in performUpdateOomAdjLSP() local 499 final boolean wasCached = state.isCached(); in performUpdateOomAdjLSP() 500 final int oldAdj = state.getCurRawAdj(); in performUpdateOomAdjLSP() 504 state.getSetProcState()); in performUpdateOomAdjLSP() 505 final int oldCap = state.getSetCapability(); in performUpdateOomAdjLSP() 506 state.setContainsCycle(false); in performUpdateOomAdjLSP() 507 state.setProcStateChanged(false); in performUpdateOomAdjLSP() 508 state.resetCachedInfo(); in performUpdateOomAdjLSP() 509 state.setCurBoundByNonBgRestrictedApp(false); in performUpdateOomAdjLSP() 516 if (!success || (wasCached == state.isCached() && oldAdj != ProcessList.INVALID_ADJ in performUpdateOomAdjLSP() [all …]
|