Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 1146) sorted by relevance

12345678910>>...46

/frameworks/base/core/tests/coretests/src/android/text/method/
DBackspaceTest.java56 private void backspace(final EditorState state, int modifiers) { in backspace() argument
57 mTextView.setText(state.mText, BufferType.EDITABLE); in backspace()
59 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in backspace()
65 state.mText = mTextView.getText(); in backspace()
66 state.mSelectionStart = mTextView.getSelectionStart(); in backspace()
67 state.mSelectionEnd = mTextView.getSelectionEnd(); in backspace()
72 EditorState state = new EditorState(); in testCombiningEnclosingKeycaps() local
74 state.setByString("'1' U+E0101 U+20E3 |"); in testCombiningEnclosingKeycaps()
75 backspace(state, 0); in testCombiningEnclosingKeycaps()
76 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
[all …]
DForwardDeleteTest.java56 private void forwardDelete(final EditorState state, int modifiers) { in forwardDelete() argument
57 mTextView.setText(state.mText, BufferType.EDITABLE); in forwardDelete()
59 mTextView.setSelection(state.mSelectionStart, state.mSelectionEnd); in forwardDelete()
65 state.mText = mTextView.getText(); in forwardDelete()
66 state.mSelectionStart = mTextView.getSelectionStart(); in forwardDelete()
67 state.mSelectionEnd = mTextView.getSelectionEnd(); in forwardDelete()
72 EditorState state = new EditorState(); in testCombiningEnclosingKeycaps() local
75 state.setByString("| '1' U+20E3 U+20E3"); in testCombiningEnclosingKeycaps()
76 forwardDelete(state, 0); in testCombiningEnclosingKeycaps()
77 state.assertEquals("|"); in testCombiningEnclosingKeycaps()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageVerificationStateTest.java32 PackageVerificationState state = new PackageVerificationState(REQUIRED_UID, null); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall() local
35 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall()
37 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_ALLOW); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall()
40 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall()
43 state.isInstallAllowed()); in testPackageVerificationState_OnlyRequiredVerifier_AllowedInstall()
47 PackageVerificationState state = new PackageVerificationState(REQUIRED_UID, null); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall() local
50 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
52 state.setVerifierResponse(REQUIRED_UID, PackageManager.VERIFICATION_REJECT); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
55 state.isVerificationComplete()); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
58 state.isInstallAllowed()); in testPackageVerificationState_OnlyRequiredVerifier_DeniedInstall()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DCanvasStateTests.cpp49 CanvasState state(sNullClient); in TEST() local
50 state.initializeSaveStack(200, 200, in TEST()
53 ASSERT_EQ(state.getWidth(), 200); in TEST()
54 ASSERT_EQ(state.getHeight(), 200); in TEST()
58 state.setMatrix(simpleTranslate); in TEST()
60 ASSERT_EQ(state.getRenderTargetClipBounds(), Rect(200, 200)); in TEST()
61 ASSERT_EQ(state.getLocalClipBounds(), Rect(-10, -20, 190, 180)); in TEST()
62 EXPECT_TRUE(approxEqual(*state.currentTransform(), simpleTranslate)); in TEST()
63 EXPECT_TRUE(state.clipIsSimple()); in TEST()
67 CanvasState state(sNullClient); in TEST() local
[all …]
DBakedOpStateTests.cpp38 ResolvedRenderState state(allocator, *parentSnapshot, recordedOp, false, false); in TEST() local
39 EXPECT_MATRIX_APPROX_EQ(state.transform, translate10x20); in TEST()
40 EXPECT_EQ(Rect(100, 200), state.clipRect()); in TEST()
41 EXPECT_EQ(Rect(40, 60, 100, 200), state.clippedBounds); // translated and also clipped in TEST()
42 EXPECT_EQ(OpClipSideFlags::Right | OpClipSideFlags::Bottom, state.clipSideFlags); in TEST()
47 ResolvedRenderState state(allocator, *parentSnapshot, recordedOp, false, false); in TEST() local
51 EXPECT_MATRIX_APPROX_EQ(expectedTranslate, state.transform); in TEST()
54 EXPECT_EQ(Rect(10, 20, 100, 200), state.clipRect()); in TEST()
57 EXPECT_EQ(Rect(50, 80, 100, 200), state.clippedBounds); in TEST()
58 EXPECT_EQ(OpClipSideFlags::Right | OpClipSideFlags::Bottom, state.clipSideFlags); in TEST()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DDimLayerController.java53 final DimLayerState state = getOrCreateDimLayerState(dimLayerUser); in updateDimLayer() local
54 final boolean previousFullscreen = state.dimLayer != null in updateDimLayer()
55 && state.dimLayer == mSharedFullScreenDimLayer; in updateDimLayer()
67 if (state.dimLayer != null) { in updateDimLayer()
69 newDimLayer = state.dimLayer; in updateDimLayer()
78 } else if (state.dimLayer != null) { in updateDimLayer()
79 state.dimLayer.destroySurface(); in updateDimLayer()
82 newDimLayer = (state.dimLayer == null || previousFullscreen) in updateDimLayer()
85 : state.dimLayer; in updateDimLayer()
89 state.dimLayer = newDimLayer; in updateDimLayer()
[all …]
/frameworks/base/libs/input/
DSpriteController.cpp138 if (update.state.surfaceControl == NULL && update.state.wantSurfaceVisible()) { in doUpdateSprites()
139 update.state.surfaceWidth = update.state.icon.bitmap.width(); in doUpdateSprites()
140 update.state.surfaceHeight = update.state.icon.bitmap.height(); in doUpdateSprites()
141 update.state.surfaceDrawn = false; in doUpdateSprites()
142 update.state.surfaceVisible = false; in doUpdateSprites()
143 update.state.surfaceControl = obtainSurface( in doUpdateSprites()
144 update.state.surfaceWidth, update.state.surfaceHeight); in doUpdateSprites()
145 if (update.state.surfaceControl != NULL) { in doUpdateSprites()
156 if (update.state.surfaceControl != NULL && update.state.wantSurfaceVisible()) { in doUpdateSprites()
157 int32_t desiredWidth = update.state.icon.bitmap.width(); in doUpdateSprites()
[all …]
/frameworks/base/core/java/android/text/method/
DMetaKeyKeyListener.java346 int state = content.getSpanFlags(what); in press() local
348 if (state == PRESSED) in press()
350 else if (state == RELEASED) in press()
352 else if (state == USED) in press()
354 else if (state == LOCKED) in press()
432 public static long resetLockedMeta(long state) { in resetLockedMeta() argument
433 if ((state & META_CAP_LOCKED) != 0) { in resetLockedMeta()
434 state &= ~META_SHIFT_MASK; in resetLockedMeta()
436 if ((state & META_ALT_LOCKED) != 0) { in resetLockedMeta()
437 state &= ~META_ALT_MASK; in resetLockedMeta()
[all …]
/frameworks/rs/
DrsType.cpp55 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 …]
DrsProgram.cpp32 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 …]
DrsMesh.cpp26 mHal.state.primitives = nullptr; in Mesh()
27 mHal.state.primitivesCount = 0; in Mesh()
28 mHal.state.indexBuffers = nullptr; in Mesh()
29 mHal.state.indexBuffersCount = 0; in Mesh()
30 mHal.state.vertexBuffers = nullptr; in Mesh()
31 mHal.state.vertexBuffersCount = 0; in Mesh()
42 mHal.state.primitivesCount = primitivesCount; in Mesh()
43 mHal.state.indexBuffersCount = primitivesCount; in Mesh()
44 mHal.state.primitives = new RsPrimitive[mHal.state.primitivesCount]; in Mesh()
45 mHal.state.indexBuffers = new Allocation *[mHal.state.indexBuffersCount]; in Mesh()
[all …]
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
DVrPipline1.java36 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 …]
DBasicPipeline.java40 public void initBuffers(VrState state) { in initBuffers() argument
45 public void setupTriangles(VrState state) { in setupTriangles() argument
46 Matrix m = state.mTransform.getMatrix(Transform.VOLUME_SPACE, Transform.SCREEN_SPACE); in setupTriangles()
47 state.mCubeVolume.transform(m, state.mCubeScreen); in setupTriangles()
51 public void rasterizeTriangles(VrState state) { in rasterizeTriangles() argument
53 scriptC_rasterize = new ScriptC_rasterize(state.mRs); in rasterizeTriangles()
55 scriptC_rasterize.set_index(state.mCubeScreen.mIndex); in rasterizeTriangles()
56 scriptC_rasterize.set_vert(state.mCubeScreen.mVert); in rasterizeTriangles()
58 scriptC_rasterize.invoke_setup_triangles(state.mImgWidth, state.mImgHeight); in rasterizeTriangles()
60 scriptC_rasterize.forEach_render_z(state.mzRangeFullAllocation); in rasterizeTriangles()
[all …]
/frameworks/base/core/java/android/nfc/
DNfcActivityManager.java163 for (NfcActivityState state : mActivities) { in findActivityState()
164 if (state.activity == activity) { in findActivityState()
165 return state; in findActivityState()
173 NfcActivityState state = findActivityState(activity); in getActivityState() local
174 if (state == null) { in getActivityState()
175 state = new NfcActivityState(activity); in getActivityState()
176 mActivities.add(state); in getActivityState()
178 return state; in getActivityState()
182 for (NfcActivityState state : mActivities) { in findResumedActivityState()
183 if (state.resumed) { in findResumedActivityState()
[all …]
/frameworks/av/media/libstagefright/codecs/amrnb/dec/src/
Dph_disp.cpp208 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/rs/driver/
DrsdShader.cpp54 StateBasedKey *state = mStateBasedShaders.at(i); in ~RsdShader() local
55 if (state->mShaderID) { in ~RsdShader()
56 glDeleteShader(state->mShaderID); in ~RsdShader()
58 delete state; in ~RsdShader()
85 for (uint32_t ct = 0; ct < mRSProgram->mHal.state.texturesCount; ct ++) { in getExistingState()
87 if (mRSProgram->mHal.state.textureTargets[ct] == RS_TEXTURE_2D) { in getExistingState()
88 Allocation *a = mRSProgram->mHal.state.textures[ct]; in getExistingState()
89 if (a && a->mHal.state.surfaceTextureID) { in getExistingState()
107 StateBasedKey *state = getExistingState(); in getStateBasedShaderID() local
108 if (state != nullptr) { in getStateBasedShaderID()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DStatusBarWindowManager.java130 private void applyKeyguardFlags(State state) { in applyKeyguardFlags() argument
131 if (state.keyguardShowing) { in applyKeyguardFlags()
137 if (state.keyguardShowing && !state.backdropShowing && !state.dozing) { in applyKeyguardFlags()
144 private void adjustScreenOrientation(State state) { in adjustScreenOrientation() argument
145 if (state.isKeyguardShowingAndNotOccluded() || state.dozing) { in adjustScreenOrientation()
156 private void applyFocusableFlag(State state) { in applyFocusableFlag() argument
157 boolean panelFocusable = state.statusBarFocusable && state.panelExpanded; in applyFocusableFlag()
158 if (state.bouncerShowing && (state.keyguardOccluded || state.keyguardNeedsInput) in applyFocusableFlag()
159 || StatusBar.ENABLE_REMOTE_INPUT && state.remoteInputActive) { in applyFocusableFlag()
162 } else if (state.isKeyguardShowingAndNotOccluded() || panelFocusable) { in applyFocusableFlag()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/os/
DParcelPerfTest.java53 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeSetDataPosition() local
54 while (state.keepRunning()) { in timeSetDataPosition()
61 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetDataPosition() local
62 while (state.keepRunning()) { in timeGetDataPosition()
69 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeSetDataSize() local
70 while (state.keepRunning()) { in timeSetDataSize()
77 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeGetDataSize() local
78 while (state.keepRunning()) { in timeGetDataSize()
85 final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); in timeSetDataCapacity() local
86 while (state.keepRunning()) { in timeSetDataCapacity()
[all …]
/frameworks/rs/tests/lldb/tests/
Drun_test.py46 def _test_pre_run(state): argument
62 assert state.test
63 assert state.bundle
66 log.info('running: {0}'.format(state.name))
69 state.bundle.delete_ndk_cache()
74 target_name = state.test.get_bundle_target()
79 target_name = state.test.bundle_target[state.bundle_type]
88 state.pid = state.bundle.launch(target_name)
89 if not state.pid:
92 state.android.kill_servers()
[all …]
/frameworks/rs/tests/lldb/
Drun_tests.py380 def _launch_emulator(state): argument
392 android = state.android
393 if state.user_specified_device:
394 if android.device_with_substring_exists(state.user_specified_device):
397 state.user_specified_device)
402 assert state.emu_cmd
403 EMU_PROC = subprocess.Popen(state.emu_cmd.split(),
408 log.info('Launching emulator with command line {0}'.format(state.emu_cmd))
443 output = android.adb('push {0} {1}'.format(state.lldb_server_path_host,
444 state.lldb_server_path_device))
[all …]
/frameworks/av/cmds/stagefright/
Dcodec.cpp116 CodecState *state = in decode() local
119 state->mNumBytesDecoded = 0; in decode()
120 state->mNumBuffersDecoded = 0; in decode()
121 state->mIsAudio = isAudio; in decode()
123 state->mCodec = MediaCodec::CreateByType( in decode()
126 CHECK(state->mCodec != NULL); in decode()
128 err = state->mCodec->configure( in decode()
135 state->mSignalledInputEOS = false; in decode()
136 state->mSawOutputEOS = false; in decode()
145 CodecState *state = &stateByTrack.editValueAt(i); in decode() local
[all …]
/frameworks/base/libs/androidfw/tests/
DAssetManager2_bench.cpp39 static void BM_AssetManagerLoadAssets(benchmark::State& state) { in BM_AssetManagerLoadAssets() argument
41 while (state.KeepRunning()) { in BM_AssetManagerLoadAssets()
49 static void BM_AssetManagerLoadAssetsOld(benchmark::State& state) { in BM_AssetManagerLoadAssetsOld() argument
51 while (state.KeepRunning()) { in BM_AssetManagerLoadAssetsOld()
62 static void BM_AssetManagerLoadFrameworkAssets(benchmark::State& state) { in BM_AssetManagerLoadFrameworkAssets() argument
64 while (state.KeepRunning()) { in BM_AssetManagerLoadFrameworkAssets()
72 static void BM_AssetManagerLoadFrameworkAssetsOld(benchmark::State& state) { in BM_AssetManagerLoadFrameworkAssetsOld() argument
74 while (state.KeepRunning()) { in BM_AssetManagerLoadFrameworkAssetsOld()
87 benchmark::State& state) { in GetResourceBenchmark() argument
93 state.SkipWithError(base::StringPrintf("Failed to load assets %s", path.c_str()).c_str()); in GetResourceBenchmark()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageSettingBase.java286 PackageUserState state = userState.get(userId); in modifyUserState() local
287 if (state == null) { in modifyUserState()
288 state = new PackageUserState(); in modifyUserState()
289 userState.put(userId, state); in modifyUserState()
291 return state; in modifyUserState()
295 PackageUserState state = userState.get(userId); in readUserState() local
296 if (state == null) { in readUserState()
299 state.categoryHint = categoryHint; in readUserState()
300 return state; in readUserState()
303 void setEnabled(int state, int userId, String callingPackage) { in setEnabled() argument
[all …]
/frameworks/base/libs/hwui/
DBakedOpDispatcher.cpp58 const BakedOpState& state = *(opList.states[i]); in onMergedBitmapOps() local
62 Rect opBounds = state.op->unmappedBounds; in onMergedBitmapOps()
63 state.computedState.transform.mapRect(opBounds); in onMergedBitmapOps()
64 if (CC_LIKELY(state.computedState.transform.isPureTranslate())) { in onMergedBitmapOps()
119 const BakedOpState& state = *opList.states[i]; in onMergedPatchOps() local
133 const float tx = floorf(state.computedState.transform.getTranslateX() in onMergedPatchOps()
135 const float ty = floorf(state.computedState.transform.getTranslateY() in onMergedPatchOps()
259 static void renderText(BakedOpRenderer& renderer, const TextOp& op, const BakedOpState& state, in renderText() argument
264 const Matrix4& transform = state.computedState.transform; in renderText()
295 int alpha = PaintUtils::getAlphaDirect(op.paint) * state.alpha; in renderText()
[all …]
/frameworks/av/media/libstagefright/codecs/amrnb/enc/src/
Dpre_proc.cpp212 Word16 Pre_Process_init(Pre_ProcessState **state) in Pre_Process_init() argument
216 if (state == (Pre_ProcessState **) NULL) in Pre_Process_init()
221 *state = NULL; in Pre_Process_init()
232 *state = s; in Pre_Process_init()
320 Word16 Pre_Process_reset(Pre_ProcessState *state) in Pre_Process_reset() argument
322 if (state == (Pre_ProcessState *) NULL) in Pre_Process_reset()
328 state->y2_hi = 0; in Pre_Process_reset()
329 state->y2_lo = 0; in Pre_Process_reset()
330 state->y1_hi = 0; in Pre_Process_reset()
331 state->y1_lo = 0; in Pre_Process_reset()
[all …]

12345678910>>...46