/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ConfigurationBoundResourceCacheTest.java | 44 final Resources res = getActivity().getResources(); in testGetEmpty() 51 final Resources res = getActivity().getResources(); in testSetGet() 54 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet() 59 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed() 60 final Resources res = getActivity().getResources(); in testSetGetThemed() 62 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed() 63 assertNotSame(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed() 68 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testMultiThreadPutGet() 70 final Resources res = getActivity().getResources(); in testMultiThreadPutGet() 73 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testMultiThreadPutGet() [all …]
|
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/ |
D | BaseKeyEventsTestCase.java | 49 getActivity().runOnUiThread(new Runnable() { in testBackDismissesActionMode() 52 getActivity().startSupportActionMode(new ActionMode.Callback() { in testBackDismissesActionMode() 81 assertFalse("Activity was not finished", getActivity().isFinishing()); in testBackDismissesActionMode() 89 getActivity().runOnUiThread(new Runnable() { in testBackCollapsesSearchView() 92 assertTrue("SearchView expanded", getActivity().expandSearchView()); in testBackCollapsesSearchView() 101 if (getActivity().isSearchViewExpanded()) { in testBackCollapsesSearchView() 109 assertFalse("Activity was not finished", getActivity().isFinishing()); in testBackCollapsesSearchView() 110 assertFalse("SearchView was collapsed", getActivity().isSearchViewExpanded()); in testBackCollapsesSearchView() 118 assertTrue("onMenuOpened called", getActivity().wasOnMenuOpenedCalled()); in testMenuPressInvokesPanelCallbacks() 122 assertTrue("onPanelClosed called", getActivity().wasOnPanelClosedCalled()); in testMenuPressInvokesPanelCallbacks() [all …]
|
D | BaseBasicsTestCase.java | 57 assertNotNull("ActionBar is not null", getActivity().getSupportActionBar()); in testActionBarExists() 63 assertEquals(getActivity().getTitle(), getActivity().getSupportActionBar().getTitle()); in testDefaultActionBarTitle() 73 getActivity().setTitle(newTitle); in testSetActionBarTitle() 75 newTitle, getActivity().getSupportActionBar().getTitle()); in testSetActionBarTitle() 83 final A activity = getActivity(); in testMenuInvalidationAfterDestroy() 104 (FitWindowsContentLayout) getActivity().findViewById(R.id.test_content); in testFitSystemWindowsReachesContent() 117 final View content = getActivity().findViewById(R.id.test_content); in testOnApplyWindowInsetsReachesContent() 135 final A activity = getActivity(); in testSupportActionModeCallbacks() 160 final A activity = getActivity(); in testSupportActionModeCallbacksInvalidate() 185 final A activity = getActivity(); in testSupportActionModeCallbacksWithFalseOnCreate() [all …]
|
D | AlertDialogTest.java | 91 final AlertDialogTestActivity activity = mActivityTestRule.getActivity(); in setUp() 108 final Context context = mActivityTestRule.getActivity(); in testBuilderTheme() 122 final Context context = mActivityTestRule.getActivity(); in testBasicContent() 154 AlertDialog.Builder builder = new AlertDialog.Builder(mActivityTestRule.getActivity()) in testMessageString() 168 AlertDialog.Builder builder = new AlertDialog.Builder(mActivityTestRule.getActivity()) in testMessageStringPostCreation() 197 final Context context = mActivityTestRule.getActivity(); in verifyCustomTitle() 220 final Context context = mActivityTestRule.getActivity(); in testCustomTitle() 236 final Context context = mActivityTestRule.getActivity(); in testCustomTitlePostCreation() 267 final Context context = mActivityTestRule.getActivity(); in verifyCustomView() 289 final Context context = mActivityTestRule.getActivity(); in testCustomView() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/touchmode/ |
D | FocusableInTouchModeClickTest.java | 39 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()
|
D | ChangeTouchModeTest.java | 47 assertFalse("touch mode", getActivity().isInTouchMode()); in testPreconditions() 52 assertInTouchModeAfterTap(this, getActivity().getFirstButton()); in testTouchingScreenEntersTouchMode() 53 assertTrue("touch mode", getActivity().isInTouchMode()); in testTouchingScreenEntersTouchMode() 58 assertInTouchModeAfterClick(this, getActivity().getFirstButton()); in DISABLE_testDpadDirectionLeavesTouchMode() 60 … assertNotInTouchModeAfterKey(this, KeyEvent.KEYCODE_DPAD_RIGHT, getActivity().getFirstButton()); in DISABLE_testDpadDirectionLeavesTouchMode() 61 assertFalse("touch mode", getActivity().isInTouchMode()); in DISABLE_testDpadDirectionLeavesTouchMode() 88 assertInTouchModeAfterClick(this, getActivity().getFirstButton()); in testTouchModeTrueAcrossActivites() 105 assertFalse("touch mode", getActivity().isInTouchMode()); in testTouchModeChangedInOtherActivity() 124 assertTrue("touch mode", getActivity().isInTouchMode()); in testTouchModeChangedInOtherActivity()
|
/frameworks/base/core/tests/coretests/src/android/widget/scroll/ |
D | ButtonAboveTallInternalSelectionViewTest.java | 38 getActivity().getButtonAbove().isFocused()); in testPreconditions() 41 getActivity().getScrollView().getScrollY()); in testPreconditions() 43 getActivity().getIsv().getHeight() > getActivity().getScrollView().getHeight()); in testPreconditions() 46 getActivity().getIsv().getTop() > in testPreconditions() 47 getActivity().getScrollView().getScrollY()); in testPreconditions() 56 final InternalSelectionView isv = getActivity().getIsv(); in testMovingFocusDownToItemTallerThanScreenStillOnScreen() 62 getActivity().getIsv().getTop() > in testMovingFocusDownToItemTallerThanScreenStillOnScreen() 63 getActivity().getScrollView().getScrollY()); in testMovingFocusDownToItemTallerThanScreenStillOnScreen()
|
D | ScrollViewButtonsAndLabelsTest.java | 47 mScrollView = getActivity().getScrollView(); in setUp() 48 mLinearLayout = getActivity().getLinearLayout(); in setUp() 70 Button firstButtonOffScreen = getActivity().getButton(offScreenIndex); in testArrowScrollDownOffScreenVerticalFadingEdge() 81 offScreenIndex < getActivity().getNumButtons()); in testArrowScrollDownOffScreenVerticalFadingEdge() 100 int numGroups = getActivity().getNumButtons(); in testArrowScrollDownToBottomElementOnScreen() 101 Button lastButton = getActivity().getButton(numGroups - 1); in testArrowScrollDownToBottomElementOnScreen() 128 Button offScreenButton = getActivity().getButton(offScreenIndex); in testArrowScrollUpOffScreenVerticalFadingEdge() 155 Button topButton = getActivity().getButton(0); in testArrowScrollUpToTopElementOnScreen() 167 int numButtons = getActivity().getNumButtons(); in goToBottomButton() 168 Button lastButton = getActivity().getButton(numButtons - 1); in goToBottomButton() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListRetainsFocusAcrossLayoutsTest.java | 32 getActivity().runOnUiThread(new Runnable() { in requestLayoutOnList() 34 getActivity().getListView().requestLayout(); in requestLayoutOnList() 42 getActivity().getChildOfItem(0, 0).isFocused()); in testPreconditions() 51 getActivity().getChildOfItem(0, 2).isFocused()); in testBottomButtonRetainsFocusAfterLayout() 57 getActivity().getChildOfItem(0, 2).isFocused()); in testBottomButtonRetainsFocusAfterLayout() 65 getActivity().getChildOfItem(1, 0).isFocused()); in testTopButtonOfSecondPositionRetainsFocusAfterLayout() 71 getActivity().getChildOfItem(1, 0).isFocused()); in testTopButtonOfSecondPositionRetainsFocusAfterLayout() 80 getActivity().getChildOfItem(1, 2).isFocused()); in testBottomButtonOfSecondPositionRetainsFocusAfterLayout() 86 getActivity().getChildOfItem(1, 2).isFocused()); in testBottomButtonOfSecondPositionRetainsFocusAfterLayout()
|
/frameworks/base/core/tests/coretests/src/android/widget/focus/ |
D | LinearLayoutGridTest.java | 42 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()
|
D | GoneParentFocusedChildTest.java | 39 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/support/v7/recyclerview/tests/src/android/support/v7/widget/test/ |
D | RecyclerViewTest.java | 53 final Activity activity = mActivityRule.getActivity(); in setContentView() 76 view = (RecyclerView) getActivity().findViewById(R.id.clipToPaddingUndefined); in inflation() 78 view = (RecyclerView) getActivity().findViewById(R.id.clipToPaddingYes); in inflation() 80 view = (RecyclerView) getActivity().findViewById(R.id.clipToPaddingNo); in inflation() 83 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView); in inflation() 94 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView2); in inflation() 106 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView3); in inflation() 113 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView4); in inflation() 120 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView5); in inflation() 124 view = (RecyclerView) getActivity().findViewById(R.id.recyclerView6); in inflation() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/scroll/arrowscroll/ |
D | TallTextAboveButtonTest.java | 36 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()
|
D | ShortButtonsTest.java | 41 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()
|
D | ButtonsWithTallTextViewInBetweenTest.java | 46 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/ |
D | SuggestionsPopupWindowTest.java | 70 getActivity(); in setUp() 74 final TextView textView = (TextView) getActivity().findViewById(R.id.textview); in setSuggestionSpan() 91 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testOnTextContextMenuItem() 95 final TextView textView = (TextView) getActivity().findViewById(R.id.textview); in testOnTextContextMenuItem() 109 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testSelectionActionMode() 116 getActivity().getString(com.android.internal.R.string.replace)); in testSelectionActionMode() 119 getActivity().getString(com.android.internal.R.string.replace)); in testSelectionActionMode() 131 final SuggestionSpan suggestionSpan = new SuggestionSpan(getActivity(), in testInsertionActionMode() 139 getActivity().getString(com.android.internal.R.string.replace)); in testInsertionActionMode() 141 getActivity().getString(com.android.internal.R.string.replace)); in testInsertionActionMode() [all …]
|
/frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/ |
D | LeakTest.java | 35 getActivity().runOnUiThread(new Runnable() { in setUp() 40 getActivity().getLayoutInflater()); in setUp() 41 getActivity().setContentView(binding.getRoot()); in setUp() 62 getActivity().setContentView(new FrameLayout(getActivity())); in testBindingLeak() 83 getActivity().setContentView(new FrameLayout(getActivity())); in testNoChangeWhenDetached() 85 getActivity().getWindow().getDecorView().postOnAnimation(watcher); in testNoChangeWhenDetached() 95 getActivity().setContentView(binding.getRoot()); in testNoChangeWhenDetached() 96 getActivity().getWindow().getDecorView().postOnAnimation(watcher); in testNoChangeWhenDetached()
|
D | DataBindingUtilTest.java | 36 … BasicBindingBinding binding = BasicBindingBinding.inflate(getActivity().getLayoutInflater()); in testFindBinding() 40 getActivity().getLayoutInflater().inflate(R.layout.basic_binding, root, true); in testFindBinding() 50 … BasicBindingBinding binding = BasicBindingBinding.inflate(getActivity().getLayoutInflater()); in testGetBinding() 57 CenteredContentBinding binding = DataBindingUtil.setContentView(getActivity(), in testSetContentView() 67 getActivity().setContentView(R.layout.basic_binding); in testBind() 68 ViewGroup content = (ViewGroup) getActivity().findViewById(android.R.id.content); in testBind() 78 getActivity().getWindow().getDecorView(); // force a content to exist. in testInflate() 79 ViewGroup content = (ViewGroup) getActivity().findViewById(android.R.id.content); in testInflate() 80 BasicBindingBinding binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), in testInflate() 84 binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), in testInflate() [all …]
|
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/ |
D | StartVoiceInteractionActivity.java | 123 ((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()
|
D | TestInteractionActivity.java | 99 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/core/tests/coretests/src/android/animation/ |
D | EventsTest.java | 273 getActivity().runOnUiThread(new Runnable() { in testStartCancel() 296 getActivity().runOnUiThread(new Runnable() { in testStartEnd() 319 getActivity().runOnUiThread(new Runnable() { in testStartDelayedCancel() 342 getActivity().runOnUiThread(new Runnable() { in testStartDelayedEnd() 364 getActivity().runOnUiThread(new Runnable() { in testPlayingCancel() 387 getActivity().runOnUiThread(new Runnable() { in testPlayingEnd() 411 getActivity().runOnUiThread(new Runnable() { in testPlayingDelayedCancel() 435 getActivity().runOnUiThread(new Runnable() { in testPlayingDelayedEnd() 458 getActivity().runOnUiThread(new Runnable() { in testPlayingDelayedCancelMidDelay() 485 getActivity().runOnUiThread(new Runnable() { in testPlayingDelayedEndMidDelay() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | RunQueueTest.java | 34 final RunQueue activity = getActivity(); in testRunnableRan() 41 final RunQueue activity = getActivity(); in testRunnableCancelled() 48 final RunQueue activity = getActivity(); in testListenerFired() 55 final RunQueue activity = getActivity(); in testTreeObserverKilled()
|
/frameworks/base/test-runner/src/android/test/ |
D | ActivityInstrumentationTestCase.java | 66 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/support/v17/leanback/src/android/support/v17/leanback/app/ |
D | OnboardingSupportFragment.java | 273 sSlideDistance = (int) (SLIDE_DISTANCE * getActivity().getResources() in onCreateView() 317 FragmentActivity activity = getActivity(); in resolveTheme() 375 Animator inAnimator = AnimatorInflater.loadAnimator(getActivity(), in startLogoAnimation() 377 Animator outAnimator = AnimatorInflater.loadAnimator(getActivity(), in startLogoAnimation() 391 if (getActivity() != null) { in startLogoAnimation() 416 LayoutInflater inflater = getThemeInflater(LayoutInflater.from(getActivity())); in initializeViews() 458 Animator animator = AnimatorInflater.loadAnimator(getActivity(), in startEnterAnimation() 463 View view = getActivity().findViewById(R.id.title); in startEnterAnimation() 465 animator = AnimatorInflater.loadAnimator(getActivity(), in startEnterAnimation() 471 view = getActivity().findViewById(R.id.description); in startEnterAnimation() [all …]
|
D | OnboardingFragment.java | 271 sSlideDistance = (int) (SLIDE_DISTANCE * getActivity().getResources() in onCreateView() 315 Activity activity = getActivity(); in resolveTheme() 373 Animator inAnimator = AnimatorInflater.loadAnimator(getActivity(), in startLogoAnimation() 375 Animator outAnimator = AnimatorInflater.loadAnimator(getActivity(), in startLogoAnimation() 389 if (getActivity() != null) { in startLogoAnimation() 414 LayoutInflater inflater = getThemeInflater(LayoutInflater.from(getActivity())); in initializeViews() 456 Animator animator = AnimatorInflater.loadAnimator(getActivity(), in startEnterAnimation() 461 View view = getActivity().findViewById(R.id.title); in startEnterAnimation() 463 animator = AnimatorInflater.loadAnimator(getActivity(), in startEnterAnimation() 469 view = getActivity().findViewById(R.id.description); in startEnterAnimation() [all …]
|