Home
last modified time | relevance | path

Searched refs:activity (Results 1 – 25 of 188) sorted by relevance

12345678

/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DActivityTest.java41 DialogLifeCycleActivity activity = new DialogLifeCycleActivity(); in shouldComplainIfActivityIsDestroyedWithRegisteredBroadcastReceivers() local
42 activity.registerReceiver(new AppWidgetProvider(), new IntentFilter()); in shouldComplainIfActivityIsDestroyedWithRegisteredBroadcastReceivers()
43 activity.onDestroy(); in shouldComplainIfActivityIsDestroyedWithRegisteredBroadcastReceivers()
48 DialogLifeCycleActivity activity = new DialogLifeCycleActivity(); in shouldNotComplainIfActivityIsDestroyedWhileAnotherActivityHasRegisteredBroadcastReceivers() local
53 activity.onDestroy(); // should not throw exception in shouldNotComplainIfActivityIsDestroyedWhileAnotherActivityHasRegisteredBroadcastReceivers()
58 DialogLifeCycleActivity activity = new DialogLifeCycleActivity(); in shouldNotRegisterNullBroadcastReceiver() local
59 activity.registerReceiver(null, new IntentFilter()); in shouldNotRegisterNullBroadcastReceiver()
61 activity.onDestroy(); in shouldNotRegisterNullBroadcastReceiver()
67 Activity activity = new Activity() { in startActivityForResultAndReceiveResult_shouldSendResponsesBackToActivity() local
73 activity.startActivityForResult(new Intent().setType("audio/*"), 123); in startActivityForResultAndReceiveResult_shouldSendResponsesBackToActivity()
[all …]
DFragmentActivityTest.java26 private TestFragmentActivity activity; field in FragmentActivityTest
31 activity = new TestFragmentActivity(); in setUp()
32 activity.onCreate(null); in setUp()
33 … fragment = (TestFragment) activity.getSupportFragmentManager().findFragmentByTag("fragment_tag"); in setUp()
38 assertNotNull(activity.getSupportFragmentManager()); in shouldHaveAFragmentManager()
48 … Fragment fragmentById = activity.getSupportFragmentManager().findFragmentById(R.id.fragment); in viewLoader_shouldSetFragmentId()
54 …assertSame(fragment.onCreateViewReturnValue, activity.findViewById(TestFragment.FRAGMENT_VIEW_ID)); in viewLoader_shouldInsertFragmentViewIntoLayout()
59 assertSame(activity, fragment.getActivity()); in viewLoader_shouldSetFragmentsActivity()
64 ViewGroup container = (ViewGroup) activity.findViewById(R.id.fragment); in viewLoader_shouldCreateContainerView()
70 ViewGroup container = (ViewGroup) activity.findViewById(R.id.fragment); in viewLoader_shouldInsertFragmentViewIntoContainer()
[all …]
DAlarmManagerTest.java25 private MyActivity activity; field in AlarmManagerTest
31 activity = new MyActivity(); in setUp()
32 alarmManager = (AlarmManager) activity.getSystemService(Context.ALARM_SERVICE); in setUp()
43 …Manager.ELAPSED_REALTIME, 0, PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in shouldSupportSet()
53 … PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in shouldSupportSetRepeating()
60 …Manager.ELAPSED_REALTIME, 0, PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in setShouldReplaceDuplicates()
61 …Manager.ELAPSED_REALTIME, 0, PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in setShouldReplaceDuplicates()
66 … AlarmManager.INTERVAL_HOUR, PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in setRepeatingShouldReplaceDuplicates()
67 … AlarmManager.INTERVAL_HOUR, PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in setRepeatingShouldReplaceDuplicates()
76 …endingIntent pendingIntent = PendingIntent.getActivity(activity, 0, new Intent(activity, activity.… in shouldSupportGetNextScheduledAlarm()
[all …]
DContextWrapperTest.java114 Activity activity = new Activity(); in shouldReturnSameApplicationEveryTime() local
115 assertThat(activity.getApplication(), sameInstance(activity.getApplication())); in shouldReturnSameApplicationEveryTime()
117 assertThat(activity.getApplication(), sameInstance(new Activity().getApplication())); in shouldReturnSameApplicationEveryTime()
122 Activity activity = new Activity(); in shouldReturnSameApplicationContextEveryTime() local
123 … assertThat(activity.getApplicationContext(), sameInstance(activity.getApplicationContext())); in shouldReturnSameApplicationContextEveryTime()
125 …assertThat(activity.getApplicationContext(), sameInstance(new Activity().getApplicationContext())); in shouldReturnSameApplicationContextEveryTime()
130 Activity activity = new Activity(); in shouldReturnSameContentResolverEveryTime() local
131 assertThat(activity.getContentResolver(), sameInstance(activity.getContentResolver())); in shouldReturnSameContentResolverEveryTime()
133 … assertThat(activity.getContentResolver(), sameInstance(new Activity().getContentResolver())); in shouldReturnSameContentResolverEveryTime()
172 Activity activity = new Activity(); in assertSameInstanceEveryTime() local
[all …]
DPreferenceActivityTest.java24 private TestPreferenceActivity activity; field in PreferenceActivityTest
29 activity = new TestPreferenceActivity(); in setUp()
30 shadow = Robolectric.shadowOf(activity); in setUp()
36 assertThat( activity.getListView(), notNullValue() ); in shouldGetListView()
46 assertThat(activity.getPreferenceScreen(), nullValue()); in shouldNotInitializePreferenceScreen()
52 activity.addPreferencesFromResource(R.xml.preferences); in shouldRecordPreferencesResourceId()
58 activity.addPreferencesFromResource(R.xml.preferences); in shouldLoadPreferenceScreen()
59 assertThat( activity.getPreferenceScreen().getPreferenceCount(), equalTo(6)); in shouldLoadPreferenceScreen()
DViewInnerTextTest.java18 private Context activity; field in ViewInnerTextTest
22 activity = new Activity(); in setUp()
27 LinearLayout top = new LinearLayout(activity); in testInnerText()
29 top.addView(new View(activity)); in testInnerText()
32 LinearLayout innerLayout = new LinearLayout(activity); in testInnerText()
48 LinearLayout top = new LinearLayout(activity); in shouldOnlyIncludeViewTextViewsText()
58 LinearLayout top = new LinearLayout(activity); in shouldNotPrefixBogusSpaces()
71 TextView textView = new TextView(activity); in textView()
DTabActivityTest.java20 TabActivity activity = new TabActivity(); in tabActivityShouldNotMakeNewTabHostEveryGet() local
21 TabHost tabHost1 = activity.getTabHost(); in tabActivityShouldNotMakeNewTabHostEveryGet()
22 TabHost tabHost2 = activity.getTabHost(); in tabActivityShouldNotMakeNewTabHostEveryGet()
29 TabActivity activity = new TabActivity(); in shouldGetTabWidget() local
30 activity.setContentView(R.layout.tab_activity); in shouldGetTabWidget()
31 assertThat(activity.getTabWidget(), instanceOf(TabWidget.class)); in shouldGetTabWidget()
DFragmentManagerTest.java35 private TestFragmentActivity activity; field in FragmentManagerTest
40 activity = new TestFragmentActivity(); in setUp()
41 activity.onCreate(null); in setUp()
42 manager = (TestFragmentManager) activity.getSupportFragmentManager(); in setUp()
44 containerView = (ViewGroup) activity.findViewById(CONTAINER_VIEW_ID); in setUp()
70 assertSame(activity, fragment.onAttachActivity); in addFragment_shouldCallLifecycleMethods()
71 assertSame(activity, fragment.getActivity()); in addFragment_shouldCallLifecycleMethods()
87 assertEquals(fragment.onCreateViewInflater, activity.getLayoutInflater()); in startFragment_shouldCallLifecycleMethods()
110 … View fragmentViewParent = (View) activity.findViewById(TestFragment.FRAGMENT_VIEW_ID).getParent(); in startFragment_shouldInsertTheFragmentViewIntoTheContainerView()
111 …assertThat(activity.findViewById(TestFragment.FRAGMENT_VIEW_ID), sameInstance(fragment.onCreateVie… in startFragment_shouldInsertTheFragmentViewIntoTheContainerView()
[all …]
DAccountManagerTest.java28 private Activity activity; field in AccountManagerTest
35 activity = new Activity(); in setUp()
36 accountManager = AccountManager.get(activity); in setUp()
46 …untManager.getAuthTokenByFeatures(accountType, authTokenType, features, activity, null, null, null… in testGetAuthTokenByFeatures_isCancelled()
56 …untManager.getAuthTokenByFeatures(accountType, authTokenType, features, activity, null, null, null… in testGetAuthTokenByFeatures_isDoneWithCancel()
66 …untManager.getAuthTokenByFeatures(accountType, authTokenType, features, activity, null, null, null… in testGetAuthTokenByFeatures_isDoneWithGetResult()
82 …untManager.getAuthTokenByFeatures(accountType, authTokenType, features, activity, null, null, null… in testGetAuthTokenByFeatures_getResult()
93 accountManager.getAuthToken(ACCOUNT, authTokenType, null, activity, null, null); in testGetAuthToken_getResult()
102 AccountManager ref = AccountManager.get(activity); in testAccountManagerIsSingleton()
/external/chromium_org/base/android/java/src/org/chromium/base/
DActivityStatus.java62 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in initialize()
63 onStateChange(activity, CREATED); in initialize()
67 public void onActivityDestroyed(Activity activity) { in initialize()
68 onStateChange(activity, DESTROYED); in initialize()
72 public void onActivityPaused(Activity activity) { in initialize()
73 onStateChange(activity, PAUSED); in initialize()
77 public void onActivityResumed(Activity activity) { in initialize()
78 onStateChange(activity, RESUMED); in initialize()
82 public void onActivitySaveInstanceState(Activity activity, Bundle outState) {} in initialize()
85 public void onActivityStarted(Activity activity) { in initialize()
[all …]
DMemoryPressureListener.java69 public static boolean handleDebugIntent(Activity activity, String action) { in handleDebugIntent() argument
71 simulateLowMemoryPressureSignal(activity); in handleDebugIntent()
73 simulateTrimMemoryPressureSignal(activity, ComponentCallbacks2.TRIM_MEMORY_COMPLETE); in handleDebugIntent()
75 simulateTrimMemoryPressureSignal(activity, ComponentCallbacks2.TRIM_MEMORY_MODERATE); in handleDebugIntent()
77 simulateTrimMemoryPressureSignal(activity, in handleDebugIntent()
97 private static void simulateLowMemoryPressureSignal(Activity activity) { in simulateLowMemoryPressureSignal() argument
101 activity.getApplication().onLowMemory(); in simulateLowMemoryPressureSignal()
102 activity.onLowMemory(); in simulateLowMemoryPressureSignal()
105 private static void simulateTrimMemoryPressureSignal(Activity activity, int level) { in simulateTrimMemoryPressureSignal() argument
109 activity.getApplication().onTrimMemory(level); in simulateTrimMemoryPressureSignal()
[all …]
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowFragment.java20 protected FragmentActivity activity; field in ShadowFragment
33 public void setActivity(FragmentActivity activity) { in setActivity() argument
34 this.activity = activity; in setActivity()
44 return activity; in getActivity()
54 activity.startActivityForResult(intent, requestCode); in startActivityForResult()
59 return activity.getSupportFragmentManager(); in getFragmentManager()
69 if (activity == null) { in getResources()
72 return activity.getResources(); in getResources()
115 if (activity == null) { in getString()
118 return activity.getString(resId); in getString()
[all …]
/external/droiddriver/src/com/google/android/droiddriver/runner/
DTestRunner.java75 Activity activity = iterator.next(); in onStart()
77 if (!activity.isFinishing()) { in onStart()
79 Logs.log(Log.INFO, "Stopping activity: " + activity); in onStart()
80 activity.finish(); in onStart()
145 public void callActivityOnDestroy(Activity activity) { in callActivityOnDestroy() argument
146 super.callActivityOnDestroy(activity); in callActivityOnDestroy()
147 activities.remove(activity); in callActivityOnDestroy()
151 public void callActivityOnCreate(Activity activity, Bundle bundle) { in callActivityOnCreate() argument
152 super.callActivityOnCreate(activity, bundle); in callActivityOnCreate()
153 activities.add(activity); in callActivityOnCreate()
[all …]
/external/chromium_org/third_party/libjingle/source/talk/examples/android/src/org/appspot/apprtc/
DGAEChannelClient.java68 Activity activity, String token, MessageHandler handler) { in GAEChannelClient() argument
69 webView = new WebView(activity); in GAEChannelClient()
87 new ProxyingMessageHandler(activity, handler, token); in GAEChannelClient()
107 private final Activity activity; field in GAEChannelClient.ProxyingMessageHandler
113 ProxyingMessageHandler(Activity activity, MessageHandler handler, in ProxyingMessageHandler() argument
115 this.activity = activity; in ProxyingMessageHandler()
133 activity.runOnUiThread(new Runnable() { in onOpen()
143 activity.runOnUiThread(new Runnable() { in onMessage()
153 activity.runOnUiThread(new Runnable() { in onClose()
164 activity.runOnUiThread(new Runnable() { in onError()
DUnhandledExceptionHandler.java52 private final Activity activity; field in UnhandledExceptionHandler
54 public UnhandledExceptionHandler(final Activity activity) { in UnhandledExceptionHandler() argument
55 this.activity = activity; in UnhandledExceptionHandler()
59 activity.runOnUiThread(new Runnable() { in uncaughtException()
63 TextView errorView = new TextView(activity); in uncaughtException()
66 ScrollView scrollingContainer = new ScrollView(activity); in uncaughtException()
78 new AlertDialog.Builder(activity); in uncaughtException()
/external/robolectric/src/test/java/com/xtremelabs/robolectric/matchers/
DStartedMatcherTest.java24 private Activity activity; field in StartedMatcherTest
32 activity = new Activity(); in setUp()
39 …givesFailureMessage((Context) activity, "to start " + createIntent(ActivityGroup.class) + ", but d… in shouldSayDidntStartAnythingIfNothingWasStarted()
42 …givesFailureMessage((Context) activity, "to start " + createIntent(ActivityGroup.class, "view") + … in shouldSayDidntStartAnythingIfNothingWasStarted()
45 …givesFailureMessage((Context) activity, "to start " + intentWithExtra + ", but didn't start anythi… in shouldSayDidntStartAnythingIfNothingWasStarted()
52 activity.startActivity(actualIntent); in shouldSayStartedSomethingIfWrongThingWasStarted()
54 …givesFailureMessage((Context) activity, "to start " + createIntent(ActivityGroup.class) + ", but s… in shouldSayStartedSomethingIfWrongThingWasStarted()
56 activity.startActivity(actualIntent); in shouldSayStartedSomethingIfWrongThingWasStarted()
58 …givesFailureMessage((Context) activity, "to start " + createIntent(ActivityGroup.class, "view") + … in shouldSayStartedSomethingIfWrongThingWasStarted()
60 activity.startActivity(actualIntent); in shouldSayStartedSomethingIfWrongThingWasStarted()
[all …]
/external/zxing/qr_scanner/src/com/google/zxing/client/android/
DCaptureActivityHandler.java40 private final CaptureActivity activity; field in CaptureActivityHandler
51 CaptureActivityHandler(CaptureActivity activity, in CaptureActivityHandler() argument
54 this.activity = activity; in CaptureActivityHandler()
55 decodeThread = new DecodeThread(activity, characterSet, in CaptureActivityHandler()
56 new ViewfinderResultPointCallback(activity.getViewfinderView())); in CaptureActivityHandler()
84 activity.handleDecode((Result) message.obj, barcode); in handleMessage()
91 activity.setResult(Activity.RESULT_OK, (Intent) message.obj); in handleMessage()
92 activity.finish(); in handleMessage()
98 activity.startActivity(intent); in handleMessage()
124 activity.drawViewfinder(); in restartPreviewAndDecode()
DInactivityTimer.java41 private final Activity activity; field in InactivityTimer
45 InactivityTimer(Activity activity) { in InactivityTimer() argument
46 this.activity = activity; in InactivityTimer()
54 inactivityFuture = inactivityTimer.schedule(new FinishListener(activity), in onActivity()
66 activity.unregisterReceiver(powerStatusReceiver); in onPause()
70 activity.registerReceiver(powerStatusReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); in onResume()
DDecodeThread.java39 private final CaptureActivity activity; field in DecodeThread
44 DecodeThread(CaptureActivity activity, in DecodeThread() argument
48 this.activity = activity; in DecodeThread()
74 handler = new DecodeHandler(activity, hints); in run()
/external/chromium_org/chrome/browser/performance_monitor/
Dkey_builder.h23 const std::string activity; member
30 activity(max_value_activity) {} in MaxValueKey()
34 const std::string activity; member
45 const std::string activity; member
65 const std::string& activity);
73 const std::string& activity);
77 const std::string& activity);
80 const std::string& activity);
Dkey_builder.cc94 : time(recent_time), type(recent_type), activity(recent_activity) { in RecentKey()
103 : time(metric_time), type(metric_type), activity(metric_activity) { in MetricKey()
182 const std::string& activity) { in CreateMetricKey() argument
186 kDelimiter, activity.c_str()); in CreateMetricKey()
198 const std::string& activity) { in CreateRecentKey() argument
202 kDelimiter, activity.c_str()); in CreateRecentKey()
206 const std::string& activity) { in CreateRecentMapKey() argument
208 activity.c_str(), in CreateRecentMapKey()
213 const std::string& activity) { in CreateMaxValueKey() argument
216 kDelimiter, activity.c_str()); in CreateMaxValueKey()
/external/chromium_org/chrome/android/javatests/src/org/chromium/chrome/browser/test/
DProviderTestBase.java28 ChromiumTestShellActivity activity = launchChromiumTestShellWithUrl(null); in setUp() local
29 assertNotNull(activity); in setUp()
32 provider.attachInfo(activity, null); in setUp()
35 resolver.addProvider(ChromeBrowserProvider.getApiAuthority(activity), provider); in setUp()
36 resolver.addProvider(ChromeBrowserProvider.getInternalAuthority(activity), provider); in setUp()
38 mContext = new IsolatedContext(resolver, activity); in setUp()
/external/chromium_org/chrome/android/testshell/javatests/src/org/chromium/chrome/testshell/
DChromiumTestShellUrlTest.java25 ChromiumTestShellActivity activity = launchChromiumTestShellWithUrl(URL); in testBaseStartup() local
29 assertNotNull(activity); in testBaseStartup()
36 final ChromiumTestShellActivity activity = launchChromiumTestShellWithUrl(welcomeUrl); in testChromeWelcomePageLoads() local
40 assertNotNull(activity); in testChromeWelcomePageLoads()
49 ContentView activeContentView = activity.getActiveContentView(); in testChromeWelcomePageLoads()
92 final ChromiumTestShellActivity activity = launchChromiumTestShellWithUrl(URL); in testCompositorInit() local
102 activity.getWindowAndroid()); in testCompositorInit()
103 contentViewRenderView.setCurrentContentView(activity.getActiveContentView()); in testCompositorInit()
/external/jmonkeyengine/engine/src/android/com/jme3/system/android/
DJmeAndroidSystem.java25 private static Activity activity; field in JmeAndroidSystem
52 return new AndroidAudioRenderer(activity); in newAudioRenderer()
109 storageFolder = activity.getApplicationContext().getExternalFilesDir(null); in getStorageFolder()
127 public static void setActivity(Activity activity) { in setActivity() argument
128 JmeAndroidSystem.activity = activity; in setActivity()
132 return activity; in getActivity()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/tester/android/util/
DTestFragmentManager.java26 private FragmentActivity activity; field in TestFragmentManager
30 public TestFragmentManager(FragmentActivity activity) { in TestFragmentManager() argument
31 this.activity = activity; in TestFragmentManager()
35 return activity; in getActivity()
148 shadowFragment.setActivity(activity); in addFragment()
150 fragment.onAttach(activity); in addFragment()
157 if (shadowOf(activity).getContentView() != null) { in startFragment()
158 container = (ViewGroup) activity.findViewById(shadowFragment.getContainerViewId()); in startFragment()
161 …View view = fragment.onCreateView(activity.getLayoutInflater(), container, shadowFragment.getSaved… in startFragment()

12345678