Home
last modified time | relevance | path

Searched refs:getActivity (Results 1 – 25 of 424) sorted by relevance

12345678910>>...17

/frameworks/base/core/tests/coretests/src/android/widget/touchmode/
DFocusableInTouchModeClickTest.java39 assertTrue("should start in touch mode", getActivity().getButton1().isInTouchMode()); in testPreconditions()
40 assertTrue(getActivity().getButton1().isFocused()); in testPreconditions()
45 TouchUtils.clickView(this, getActivity().getButton2()); in testClickGivesFocusNoClickFired()
47 getActivity().getButton2().isFocused()); in testClickGivesFocusNoClickFired()
49 getActivity().isB2Fired()); in testClickGivesFocusNoClickFired()
51 TouchUtils.clickView(this, getActivity().getButton2()); in testClickGivesFocusNoClickFired()
53 getActivity().isB2Fired()); in testClickGivesFocusNoClickFired()
58 TouchUtils.touchAndCancelView(this, getActivity().getButton2()); in testTapGivesFocusNoClickFired()
59 assertFalse("button shouldn't have fired click", getActivity().isB2Fired()); in testTapGivesFocusNoClickFired()
60 assertFalse("button shouldn't have focus", getActivity().getButton2().isFocused()); in testTapGivesFocusNoClickFired()
DChangeTouchModeTest.java48 assertFalse("touch mode", getActivity().isInTouchMode()); in testPreconditions()
53 assertInTouchModeAfterTap(this, getActivity().getFirstButton()); in testTouchingScreenEntersTouchMode()
54 assertTrue("touch mode", getActivity().isInTouchMode()); in testTouchingScreenEntersTouchMode()
59 assertInTouchModeAfterClick(this, getActivity().getFirstButton()); in DISABLE_testDpadDirectionLeavesTouchMode()
61 … assertNotInTouchModeAfterKey(this, KeyEvent.KEYCODE_DPAD_RIGHT, getActivity().getFirstButton()); in DISABLE_testDpadDirectionLeavesTouchMode()
62 assertFalse("touch mode", getActivity().isInTouchMode()); in DISABLE_testDpadDirectionLeavesTouchMode()
89 assertInTouchModeAfterClick(this, getActivity().getFirstButton()); in testTouchModeTrueAcrossActivites()
106 assertFalse("touch mode", getActivity().isInTouchMode()); in testTouchModeChangedInOtherActivity()
125 assertTrue("touch mode", getActivity().isInTouchMode()); in testTouchModeChangedInOtherActivity()
DTouchModeFocusableTest.java46 mEditText = getActivity().getEditText(); in setUp()
47 mButton = getActivity().getButton(); in setUp()
67 getActivity().runOnUiThread(() -> mButton.requestFocus()); in testClickEditTextGivesItFocus()
81 getActivity().runOnUiThread(() -> mButton.requestFocus()); in testEnterTouchModeGivesFocusBackToFocusableInTouchMode()
89 assertNull("nothing should have focus", getActivity().getCurrentFocus()); in testEnterTouchModeGivesFocusBackToFocusableInTouchMode()
91 getActivity().getLayout().hasFocus()); in testEnterTouchModeGivesFocusBackToFocusableInTouchMode()
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java47 final Resources res = getActivity().getResources(); in testGetEmpty()
54 final Resources res = getActivity().getResources(); in testSetGet()
57 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet()
62 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed()
63 final Resources res = getActivity().getResources(); in testSetGetThemed()
65 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
66 assertNotSame(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
71 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testMultiThreadPutGet()
73 final Resources res = getActivity().getResources(); in testMultiThreadPutGet()
76 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testMultiThreadPutGet()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/scroll/
DButtonAboveTallInternalSelectionViewTest.java37 getActivity().getButtonAbove().isFocused()); in testPreconditions()
40 getActivity().getScrollView().getScrollY()); in testPreconditions()
42 getActivity().getIsv().getHeight() > getActivity().getScrollView().getHeight()); in testPreconditions()
45 getActivity().getIsv().getTop() > in testPreconditions()
46 getActivity().getScrollView().getScrollY()); in testPreconditions()
55 final InternalSelectionView isv = getActivity().getIsv(); in testMovingFocusDownToItemTallerThanScreenStillOnScreen()
61 getActivity().getIsv().getTop() > in testMovingFocusDownToItemTallerThanScreenStillOnScreen()
62 getActivity().getScrollView().getScrollY()); in testMovingFocusDownToItemTallerThanScreenStillOnScreen()
DScrollViewButtonsAndLabelsTest.java45 mScrollView = getActivity().getScrollView(); in setUp()
46 mLinearLayout = getActivity().getLinearLayout(); in setUp()
68 Button firstButtonOffScreen = getActivity().getButton(offScreenIndex); in testArrowScrollDownOffScreenVerticalFadingEdge()
70 getActivity().runOnUiThread(() -> getActivity().getButton(0).requestFocus()); in testArrowScrollDownOffScreenVerticalFadingEdge()
82 offScreenIndex < getActivity().getNumButtons()); in testArrowScrollDownOffScreenVerticalFadingEdge()
101 int numGroups = getActivity().getNumButtons(); in testArrowScrollDownToBottomElementOnScreen()
102 Button lastButton = getActivity().getButton(numGroups - 1); in testArrowScrollDownToBottomElementOnScreen()
129 Button offScreenButton = getActivity().getButton(offScreenIndex); in testArrowScrollUpOffScreenVerticalFadingEdge()
156 Button topButton = getActivity().getButton(0); in testArrowScrollUpToTopElementOnScreen()
168 int numButtons = getActivity().getNumButtons(); in goToBottomButton()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListRetainsFocusAcrossLayoutsTest.java31 getActivity().runOnUiThread(new Runnable() { in requestLayoutOnList()
33 getActivity().getListView().requestLayout(); in requestLayoutOnList()
41 getActivity().getChildOfItem(0, 0).isFocused()); in testPreconditions()
50 getActivity().getChildOfItem(0, 2).isFocused()); in testBottomButtonRetainsFocusAfterLayout()
56 getActivity().getChildOfItem(0, 2).isFocused()); in testBottomButtonRetainsFocusAfterLayout()
64 getActivity().getChildOfItem(1, 0).isFocused()); in testTopButtonOfSecondPositionRetainsFocusAfterLayout()
70 getActivity().getChildOfItem(1, 0).isFocused()); in testTopButtonOfSecondPositionRetainsFocusAfterLayout()
79 getActivity().getChildOfItem(1, 2).isFocused()); in testBottomButtonOfSecondPositionRetainsFocusAfterLayout()
85 getActivity().getChildOfItem(1, 2).isFocused()); in testBottomButtonOfSecondPositionRetainsFocusAfterLayout()
/frameworks/base/core/tests/coretests/src/android/widget/focus/
DLinearLayoutGridTest.java42 mRootView = getActivity().getRootView(); in setUp()
47 assertEquals(getActivity().getButtonAt(2, 1), in testGoDownFromMiddle()
50 getActivity().getButtonAt(1, 1), in testGoDownFromMiddle()
56 assertEquals(getActivity().getButtonAt(0, 1), in testGoUpFromMiddle()
59 getActivity().getButtonAt(1, 1), in testGoUpFromMiddle()
65 assertEquals(getActivity().getButtonAt(1, 2), in testGoRightFromMiddle()
68 getActivity().getButtonAt(1, 1), in testGoRightFromMiddle()
74 assertEquals(getActivity().getButtonAt(1, 0), in testGoLeftFromMiddle()
77 getActivity().getButtonAt(1, 1), in testGoLeftFromMiddle()
DGoneParentFocusedChildTest.java39 assertNotNull(getActivity().getLayout()); in testPreconditinos()
40 assertNotNull(getActivity().getGoneGroup()); in testPreconditinos()
41 assertNotNull(getActivity().getButton()); in testPreconditinos()
43 getActivity().getButton().hasFocus()); in testPreconditinos()
46 getActivity().getGoneGroup().getVisibility()); in testPreconditinos()
48 getActivity().isUnhandledKeyEvent()); in testPreconditinos()
54 assertTrue(getActivity().isUnhandledKeyEvent()); in testKeyEventGoesToActivity()
/frameworks/base/core/tests/coretests/src/android/widget/scroll/arrowscroll/
DTallTextAboveButtonTest.java36 mScrollView = getActivity().getScrollView(); in setUp()
37 mTopText = getActivity().getContentChildAt(0); in setUp()
38 mBottomButton = getActivity().getContentChildAt(1); in setUp()
50 … + "is on screen), but " + getActivity().getScrollView().findFocus() + " does instead", in testPreconditions()
51 getActivity().getScrollView().isFocused()); in testPreconditions()
64 …assertTrue("scroll view should have focus, but " + getActivity().getScrollView().findFocus() + " d… in testGainFocusAsScrolledOntoScreen()
65 getActivity().getScrollView().isFocused()); in testGainFocusAsScrolledOntoScreen()
73 …assertTrue("scroll view should have focus, but " + getActivity().getScrollView().findFocus() + " d… in testScrollingButtonOffScreenLosesFocus()
74 getActivity().getScrollView().isFocused()); in testScrollingButtonOffScreenLosesFocus()
DShortButtonsTest.java41 mScrollView = getActivity().getScrollView(); in setUp()
47 getActivity().getButtonAt(0).getHeight() in testPreconditions()
51 getActivity().getLinearLayout().getHeight() in testPreconditions()
52 > getActivity().getScrollView().getHeight()); in testPreconditions()
57 final int numButtons = getActivity().getNumButtons(); in testScrollDownToBottomThroughButtons()
61 final Button button = getActivity().getButtonAt(i); in testScrollDownToBottomThroughButtons()
68 getActivity().getLinearLayout().getHeight() - mScrollView.getHeight(), in testScrollDownToBottomThroughButtons()
74 final int numButtons = getActivity().getNumButtons(); in testScrollFromBottomToTopThroughButtons()
76 final Button lastButton = getActivity().getButtonAt(numButtons - 1); in testScrollFromBottomToTopThroughButtons()
90 final Button button = getActivity().getButtonAt(i); in testScrollFromBottomToTopThroughButtons()
DButtonsWithTallTextViewInBetweenTest.java46 mScrollView = getActivity().getScrollView(); in setUp()
47 mTopButton = getActivity().getTopButton(); in setUp()
48 mMiddleFiller = getActivity().getMiddleFiller(); in setUp()
49 mBottomButton = getActivity().getBottomButton(); in setUp()
106 getActivity().getLinearLayout().getHeight() - mScrollView.getHeight(), in testScrollDownToBottomButton()
121 final int maxScroll = getActivity().getLinearLayout().getHeight() in testPanBottomButtonOffScreenLosesFocus()
/frameworks/base/core/tests/coretests/src/android/widget/
DSuggestionsPopupWindowTest.java74 private TextViewActivity getActivity() { in getActivity() method in SuggestionsPopupWindowTest
75 return mActivityRule.getActivity(); in getActivity()
79 final TextView textView = getActivity().findViewById(R.id.textview); in setSuggestionSpan()
96 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testOnTextContextMenuItem()
100 final TextView textView = getActivity().findViewById(R.id.textview); in testOnTextContextMenuItem()
114 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testSelectionActionMode()
120 getActivity().getString(com.android.internal.R.string.replace)); in testSelectionActionMode()
133 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testInsertionActionMode()
140 getActivity().getString(com.android.internal.R.string.replace)); in testInsertionActionMode()
146 final TextView textView = getActivity().findViewById(R.id.textview); in showSuggestionsPopup()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/menu/
DContextMenuTest.java36 testMenuPosition(getActivity().getTargetLtr()); in testContextMenuPositionLtr()
40 testMenuPosition(getActivity().getTargetRtl()); in testContextMenuPositionRtl()
45 testMenuPosition(getActivity().getTargetLtr()); in testContextMenuPositionRepetitive()
46 testMenuPosition(getActivity().getTargetRtl()); in testContextMenuPositionRepetitive()
47 testMenuPosition(getActivity().getTargetLtr()); in testContextMenuPositionRepetitive()
83 final WindowManager windowManager = getActivity().getSystemService(WindowManager.class); in getMinScreenDimension()
93 return getActivity().getResources().getDimensionPixelSize( in getCascadingMenuTreshold()
/frameworks/base/core/tests/coretests/src/android/view/
DRenderNodeAnimatorTest.java49 private Activity getActivity() { in getActivity() method in RenderNodeAnimatorTest
50 return mActivityRule.getActivity(); in getActivity()
59 getActivity().setContentView(view); in testAlphaTransformationInfo()
78 getActivity().runOnUiThread(() -> { in testViewDetachCancelsRenderNodeAnimator()
80 getActivity().setContentView(container); in testViewDetachCancelsRenderNodeAnimator()
82 getActivity().runOnUiThread(() -> { in testViewDetachCancelsRenderNodeAnimator()
98 getActivity().runOnUiThread(()-> { in testViewDetachCancelsRenderNodeAnimator()
DRunQueueTest.java35 final RunQueue activity = getActivity(); in testRunnableRan()
42 final RunQueue activity = getActivity(); in testRunnableCancelled()
49 final RunQueue activity = getActivity(); in testListenerFired()
56 final RunQueue activity = getActivity(); in testTreeObserverKilled()
DVisibilityTest.java51 final Visibility a = getActivity(); in setUp()
72 getActivity().runOnUiThread(() -> mInvisible.requestFocus()); in testVisibleToInvisible()
86 getActivity().runOnUiThread(() -> mGone.requestFocus()); in testVisibleToGone()
100 getActivity().runOnUiThread(() -> mGone.requestFocus()); in testGoneToVisible()
120 getActivity().runOnUiThread(() -> mGone.requestFocus()); in testGoneToInvisible()
140 getActivity().runOnUiThread(() -> mInvisible.requestFocus()); in testInvisibleToVisible()
160 getActivity().runOnUiThread(() -> mInvisible.requestFocus()); in testInvisibleToGone()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/
DErrorDialogFragment.java34 AlertDialog.Builder b = new AlertDialog.Builder(getActivity()) in onCreateDialog()
49 if (getActivity() instanceof UninstallerActivity) { in onDismiss()
50 ((UninstallerActivity) getActivity()).dispatchAborted(); in onDismiss()
53 getActivity().setResult(Activity.RESULT_FIRST_USER); in onDismiss()
54 getActivity().finish(); in onDismiss()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/television/
DUninstallAlertFragment.java45 final PackageManager pm = getActivity().getPackageManager(); in onCreateGuidance()
47 ((UninstallerActivity) getActivity()).getDialogInfo(); in onCreateGuidance()
66 UserManager userManager = UserManager.get(getActivity()); in onCreateGuidance()
113 ((UninstallerActivity) getActivity()).startUninstallProgress(false); in onGuidedActionClicked()
114 getActivity().finish(); in onGuidedActionClicked()
116 ((UninstallerActivity) getActivity()).dispatchAborted(); in onGuidedActionClicked()
117 getActivity().setResult(Activity.RESULT_FIRST_USER); in onGuidedActionClicked()
118 getActivity().finish(); in onGuidedActionClicked()
DErrorFragment.java58 if (getActivity() instanceof UninstallerActivity) { in onGuidedActionClicked()
59 ((UninstallerActivity) getActivity()).dispatchAborted(); in onGuidedActionClicked()
62 getActivity().setResult(Activity.RESULT_FIRST_USER); in onGuidedActionClicked()
63 getActivity().finish(); in onGuidedActionClicked()
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DStartVoiceInteractionActivity.java123 ((StartVoiceInteractionActivity)getActivity()).mLog.append("Canceled abort\n"); in onCancel()
127 ((StartVoiceInteractionActivity)getActivity()).mLog.append( in onAbortResult()
129 getActivity().finish(); in onAbortResult()
139 ((StartVoiceInteractionActivity)getActivity()).mLog.append("Canceled complete\n"); in onCancel()
143 ((StartVoiceInteractionActivity)getActivity()).mLog.append("Complete: result=" in onCompleteResult()
145 getActivity().finish(); in onCompleteResult()
155 ((StartVoiceInteractionActivity)getActivity()).mLog.append("Canceled command\n"); in onCancel()
171 ((StartVoiceInteractionActivity)getActivity()).mLog.append(sb.toString()); in onCommandResult()
186 ((StartVoiceInteractionActivity)getActivity()).mLog.append("Canceled pick\n"); in onCancel()
205 ((StartVoiceInteractionActivity)getActivity()).mLog.append(sb.toString()); in onPickOptionResult()
DTestInteractionActivity.java99 getActivity().finish(); in onCreate()
105 getActivity().finish(); in onCreate()
177 ((TestInteractionActivity)getActivity()).mLog.append("Canceled abort\n"); in onCancel()
181 ((TestInteractionActivity)getActivity()).mLog.append("Abort: result=" + result + "\n"); in onAbortResult()
182 getActivity().finish(); in onAbortResult()
192 ((TestInteractionActivity)getActivity()).mLog.append("Canceled complete\n"); in onCancel()
196 ((TestInteractionActivity)getActivity()).mLog.append("Complete: result=" in onCompleteResult()
198 getActivity().finish(); in onCompleteResult()
208 ((TestInteractionActivity)getActivity()).mLog.append("Canceled command\n"); in onCancel()
224 ((TestInteractionActivity)getActivity()).mLog.append(sb.toString()); in onCommandResult()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/app/
DPendingIntentPerfTest.java64 final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent, in create()
82 final PendingIntent previousPendingIntent = PendingIntent.getActivity(mContext, 0, in createWithCancelFlag()
86 final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent, in createWithCancelFlag()
104 final PendingIntent previousPendingIntent = PendingIntent.getActivity(mContext, 0, in createWithUpdateFlag()
108 final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, mIntent, in createWithUpdateFlag()
126 final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, in cancel()
/frameworks/base/test-runner/src/android/test/
DActivityInstrumentationTestCase.java66 public T getActivity() { in getActivity() method in ActivityInstrumentationTestCase
67 return (T) super.getActivity(); in getActivity()
81 getActivity().finish(); in tearDown()
93 assertNotNull("activity should be launched successfully", getActivity()); in testActivityTestCaseSetUpProperly()
/frameworks/base/core/tests/coretests/src/android/widget/listview/focus/
DListHorizontalFocusWithinItemWinsTest.java42 mListView = getActivity().getListView(); in setUp()
43 mTopLeftButton = getActivity().getTopLeftButton(); in setUp()
44 mTopRightButton = getActivity().getTopRightButton(); in setUp()
45 mBottomMiddleButton = getActivity().getBottomMiddleButton(); in setUp()

12345678910>>...17