/development/samples/browseable/BasicManagedProfile/src/com.example.android.basicmanagedprofile/ |
D | BasicManagedProfileFragment.java | 98 public void onAttach(Activity activity) { in onAttach() argument 99 super.onAttach(activity); in onAttach() 113 Activity activity = getActivity(); in isApplicationEnabled() local 114 PackageManager packageManager = activity.getPackageManager(); in isApplicationEnabled() 124 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in isApplicationEnabled() 126 BasicDeviceAdminReceiver.getComponentName(activity), packageName); in isApplicationEnabled() 204 Activity activity = getActivity(); in setAppEnabled() local 205 if (null == activity) { in setAppEnabled() 208 PackageManager packageManager = activity.getPackageManager(); in setAppEnabled() 210 (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE); in setAppEnabled() [all …]
|
D | SetupProfileFragment.java | 71 Activity activity = getActivity(); in provisionManagedProfile() local 72 if (null == activity) { in provisionManagedProfile() 77 activity.getApplicationContext().getPackageName()); in provisionManagedProfile() 78 if (intent.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile() 80 activity.finish(); in provisionManagedProfile() 82 Toast.makeText(activity, "Device provisioning is not enabled. Stopping.", in provisionManagedProfile()
|
/development/samples/IntentPlayground/src/com/example/android/intentplayground/ |
D | Tracking.java | 62 public synchronized void onResume(Activity activity) { in onResume() argument 63 logNameEventAndTask(activity, "onResume"); in onResume() 65 int id = activity.getTaskId(); in onResume() 67 task.activityResumed(activity); in onResume() 82 public synchronized void onDestroy(Activity activity) { in onDestroy() argument 83 logNameEventAndTask(activity, "onDestroy"); in onDestroy() 87 .filter(t -> t.containsActivity(activity)) in onDestroy() 92 task.activityDestroyed(activity); in onDestroy() 115 for (Activity activity : task.mActivities) { in checkForMovedActivities() 116 if (activity.getTaskId() != task.id) { in checkForMovedActivities() [all …]
|
D | FlagUtils.java | 179 public static boolean hasActivityFlag(Context context, ComponentName activity, 181 return getActivityFlags(context, activity).contains(flag); 191 public static EnumSet<ActivityFlag> getActivityFlags(Context context, ComponentName activity) { 195 .filter(i-> i.name.equals(activity.getClassName())) 262 public static List<String> getActivityFlags(ActivityInfo activity) { 263 int flags = activity.flags; 264 List<String> flagStrings = Arrays.stream(activity.getClass().getDeclaredFields()) 268 return (flags & f.getInt(activity)) > 0; 279 if (activity.launchMode != 0) { 281 switch(activity.launchMode) { [all …]
|
D | InlineAdapter.java | 49 public InlineAdapter(List<Task> tasks, FragmentActivity activity) { in InlineAdapter() argument 50 this.mActivity = activity; in InlineAdapter() 112 for (Activity activity : task.mActivities) { in setTask() 118 activityName.setText(activity.getComponentName().getShortClassName()); in setTask() 120 Intent intent = activity.getIntent(); in setTask() 130 showDialogWithFlags(manager, activity.getComponentName().getShortClassName(), in setTask()
|
/development/samples/browseable/DeviceOwner/src/com.example.android.deviceowner/ |
D | DeviceOwnerFragment.java | 140 public void onAttach(Activity activity) { in onAttach() argument 141 super.onAttach(activity); in onAttach() 143 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in onAttach() 155 Activity activity = getActivity(); in onResume() local 156 if (activity != null) { in onResume() 157 retrieveCurrentSettings(activity); in onResume() 166 private void retrieveCurrentSettings(Activity activity) { in retrieveCurrentSettings() argument 169 getBooleanGlobalSetting(activity.getContentResolver(), Settings.Global.AUTO_TIME)); in retrieveCurrentSettings() 171 getBooleanGlobalSetting(activity.getContentResolver(), in retrieveCurrentSettings() 177 List<ResolveInfo> list = activity.getPackageManager() in retrieveCurrentSettings() [all …]
|
/development/samples/WiFiDirectDemo/src/com/example/android/wifidirect/ |
D | WiFiDirectBroadcastReceiver.java | 36 private WiFiDirectActivity activity; field in WiFiDirectBroadcastReceiver 44 WiFiDirectActivity activity) { in WiFiDirectBroadcastReceiver() argument 48 this.activity = activity; in WiFiDirectBroadcastReceiver() 65 activity.setIsWifiP2pEnabled(true); in onReceive() 67 activity.setIsWifiP2pEnabled(false); in onReceive() 68 activity.resetData(); in onReceive() 78 manager.requestPeers(channel, (PeerListListener) activity.getFragmentManager() in onReceive() 96 DeviceDetailFragment fragment = (DeviceDetailFragment) activity in onReceive() 101 activity.resetData(); in onReceive() 104 DeviceListFragment fragment = (DeviceListFragment) activity.getFragmentManager() in onReceive()
|
/development/samples/browseable/AppRestrictionEnforcer/src/com.example.android.apprestrictionenforcer/ |
D | AppRestrictionEnforcerFragment.java | 240 private void loadRestrictions(Activity activity) { in loadRestrictions() argument 242 (RestrictionsManager) activity.getSystemService(Context.RESTRICTIONS_SERVICE); in loadRestrictions() 245 SharedPreferences prefs = activity.getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE); in loadRestrictions() 258 updateRank(activity, restriction.getChoiceValues(), in loadRestrictions() 261 updateApprovals(activity, restriction.getChoiceValues(), in loadRestrictions() 273 updateItems(activity, items); in loadRestrictions() 378 private void saveCanSayHello(Activity activity, boolean allow) { in saveCanSayHello() argument 380 saveRestrictions(activity); in saveCanSayHello() 382 editPreferences(activity).putBoolean(RESTRICTION_KEY_SAY_HELLO, allow).apply(); in saveCanSayHello() 391 private void saveMessage(Activity activity, String message) { in saveMessage() argument [all …]
|
D | StatusFragment.java | 59 public void onAttach(Activity activity) { in onAttach() argument 60 super.onAttach(activity); in onAttach() 61 mListener = (StatusUpdatedListener) activity; in onAttach() 86 private void updateUi(Activity activity) { in updateUi() argument 87 PackageManager packageManager = activity.getPackageManager(); in updateUi() 100 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in updateUi() 103 EnforcerDeviceAdminReceiver.getComponentName(activity), in updateUi() 130 private void unhideApp(Activity activity) { in unhideApp() argument 132 (DevicePolicyManager) activity.getSystemService(Activity.DEVICE_POLICY_SERVICE); in unhideApp() 134 EnforcerDeviceAdminReceiver.getComponentName(activity), in unhideApp() [all …]
|
D | SetupProfileFragment.java | 74 Activity activity = getActivity(); in provisionManagedProfile() local 75 if (null == activity) { in provisionManagedProfile() 81 EnforcerDeviceAdminReceiver.getComponentName(activity)); in provisionManagedProfile() 85 activity.getApplicationContext().getPackageName()); in provisionManagedProfile() 86 … intent.putExtra(EXTRA_DEVICE_ADMIN, EnforcerDeviceAdminReceiver.getComponentName(activity)); in provisionManagedProfile() 88 if (intent.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile() 90 activity.finish(); in provisionManagedProfile() 92 Toast.makeText(activity, "Device provisioning is not enabled. Stopping.", in provisionManagedProfile()
|
/development/samples/browseable/Camera2Video/src/com.example.android.camera2video/ |
D | Camera2VideoFragment.java | 211 Activity activity = getActivity(); 212 if (null != activity) { 213 activity.finish(); 320 Activity activity = getActivity(); in onClick() local 321 if (null != activity) { in onClick() 322 new AlertDialog.Builder(activity) in onClick() 421 final Activity activity = getActivity(); in openCamera() local 422 if (null == activity || activity.isFinishing()) { in openCamera() 425 CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); in openCamera() 452 Toast.makeText(activity, "Cannot access the camera.", Toast.LENGTH_SHORT).show(); in openCamera() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/app/ |
D | LocalSampleInstrumentation.java | 33 public final Activity activity; field in LocalSampleInstrumentation.ActivityRunnable 35 activity = _activity; in ActivityRunnable() 58 SaveRestoreState activity = (SaveRestoreState)startActivitySync(intent); in onStart() local 62 "Initial text: " + activity.getSavedText()); in onStart() 65 runOnMainSync(new ActivityRunnable(activity) { in onStart() 67 ((SaveRestoreState)activity).setSavedText(""); in onStart() 85 "Final text: " + activity.getSavedText()); in onStart()
|
/development/samples/ApiDemos/tests/src/com/example/android/apis/app/ |
D | ForwardingTest.java | 87 Forwarding activity = startActivity(mStartIntent, null, null); in testSubLaunch() local 88 mButton = (Button) activity.findViewById(R.id.go); in testSubLaunch() 103 Forwarding activity = startActivity(mStartIntent, null, null); in testLifeCycleCreate() local 107 getInstrumentation().callActivityOnStart(activity); in testLifeCycleCreate() 108 getInstrumentation().callActivityOnResume(activity); in testLifeCycleCreate() 114 getInstrumentation().callActivityOnPause(activity); in testLifeCycleCreate() 119 getInstrumentation().callActivityOnStop(activity); in testLifeCycleCreate()
|
/development/samples/browseable/BluetoothChat/src/com.example.android.bluetoothchat/ |
D | BluetoothChatFragment.java | 98 FragmentActivity activity = getActivity(); in onCreate() local 99 Toast.makeText(activity, "Bluetooth is not available", Toast.LENGTH_LONG).show(); in onCreate() 100 activity.finish(); in onCreate() 247 FragmentActivity activity = getActivity(); in setStatus() local 248 if (null == activity) { in setStatus() 251 final ActionBar actionBar = activity.getActionBar(); in setStatus() 264 FragmentActivity activity = getActivity(); in setStatus() local 265 if (null == activity) { in setStatus() 268 final ActionBar actionBar = activity.getActionBar(); in setStatus() 281 FragmentActivity activity = getActivity(); [all …]
|
/development/samples/browseable/Camera2Basic/src/com.example.android.camera2basic/ |
D | Camera2BasicFragment.java | 209 Activity activity = getActivity(); 210 if (null != activity) { 211 activity.finish(); 357 final Activity activity = getActivity(); in showToast() local 358 if (activity != null) { in showToast() 359 activity.runOnUiThread(new Runnable() { in showToast() 362 Toast.makeText(activity, text, Toast.LENGTH_SHORT).show(); in showToast() 492 Activity activity = getActivity(); in setUpCameraOutputs() local 493 CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); in setUpCameraOutputs() 522 int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation(); in setUpCameraOutputs() [all …]
|
/development/samples/training/TabCompat/src/com/example/android/tabcompat/lib/ |
D | TabHelper.java | 41 protected TabHelper(FragmentActivity activity) { in TabHelper() argument 42 mActivity = activity; in TabHelper() 51 public static TabHelper createInstance(FragmentActivity activity) { in createInstance() argument 53 return new TabHelperHoneycomb(activity); in createInstance() 55 return new TabHelperEclair(activity); in createInstance()
|
/development/samples/browseable/CardReader/src/com.example.android.cardreader/ |
D | CardReaderFragment.java | 82 Activity activity = getActivity(); in enableReaderMode() local 83 NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity); in enableReaderMode() 85 nfc.enableReaderMode(activity, mLoyaltyCardReader, READER_FLAGS, null); in enableReaderMode() 91 Activity activity = getActivity(); in disableReaderMode() local 92 NfcAdapter nfc = NfcAdapter.getDefaultAdapter(activity); in disableReaderMode() 94 nfc.disableReaderMode(activity); in disableReaderMode()
|
/development/samples/WiFiDirectServiceDiscovery/src/com/example/android/wifidirect/discovery/ |
D | WiFiDirectBroadcastReceiver.java | 38 private Activity activity; field in WiFiDirectBroadcastReceiver 46 Activity activity) { in WiFiDirectBroadcastReceiver() argument 50 this.activity = activity; in WiFiDirectBroadcastReceiver() 78 (ConnectionInfoListener) activity); in onReceive()
|
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/ui/ |
D | DetailActivity.java | 41 public static void launch(Activity activity, String attraction, View heroView) { in launch() argument 42 Intent intent = getLaunchIntent(activity, attraction); in launch() 45 activity, heroView, heroView.getTransitionName()); in launch() 46 ActivityCompat.startActivity(activity, intent, options.toBundle()); in launch() 48 activity.startActivity(intent); in launch()
|
/development/samples/browseable/Camera2Raw/src/com.example.android.camera2raw/ |
D | Camera2RawFragment.java | 392 Activity activity = getActivity(); 393 if (null != activity) { 394 activity.finish(); 591 Activity activity = getActivity(); 592 if (activity != null) { 593 Toast.makeText(activity, (String) msg.obj, Toast.LENGTH_SHORT).show(); 680 Activity activity = getActivity(); in onClick() local 681 if (null != activity) { in onClick() 682 new AlertDialog.Builder(activity) in onClick() 696 Activity activity = getActivity(); in setUpCameraOutputs() local [all …]
|
/development/samples/browseable/ScreenCapture/src/com.example.android.screencapture/ |
D | ScreenCaptureFragment.java | 90 Activity activity = getActivity(); in onActivityCreated() local 92 activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); in onActivityCreated() 95 activity.getSystemService(Context.MEDIA_PROJECTION_SERVICE); in onActivityCreated() 128 Activity activity = getActivity(); in onActivityResult() local 129 if (activity == null) { in onActivityResult() 164 Activity activity = getActivity(); in startScreenCapture() local 165 if (mSurface == null || activity == null) { in startScreenCapture()
|
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/inject/ |
D | Injector.java | 52 private Injector(Activity activity) { in Injector() argument 53 mActivity = activity; in Injector() 59 public static Injector get(Activity activity) { in get() argument 60 return new Injector(activity); in get()
|
/development/samples/browseable/DirectBoot/src/com.example.android.directboot/ |
D | SchedulerFragment.java | 91 Activity activity = getActivity(); in onViewCreated() local 92 AlarmStorage alarmStorage = new AlarmStorage(activity); in onViewCreated() 93 mAlarmAdapter = new AlarmAdapter(activity, alarmStorage.getAlarms()); in onViewCreated() 98 recyclerView.setLayoutManager(new LinearLayoutManager(activity)); in onViewCreated() 100 recyclerView.addItemDecoration(new AlarmAdapter.DividerItemDecoration(activity)); in onViewCreated() 101 mAlarmUtil = new AlarmUtil(activity); in onViewCreated()
|
/development/samples/training/basic/FragmentBasics/src/com/example/fragments/ |
D | HeadlinesFragment.java | 58 public void onAttach(Activity activity) { in onAttach() argument 59 super.onAttach(activity); in onAttach() 64 mCallback = (OnHeadlineSelectedListener) activity; in onAttach() 66 throw new ClassCastException(activity.toString() in onAttach()
|
/development/samples/browseable/AppRestrictions/src/com.example.android.apprestrictions/ |
D | CustomRestrictionsFragment.java | 96 final Activity activity = getActivity(); in onActivityCreated() local 101 activity.getIntent().getBundleExtra(Intent.EXTRA_RESTRICTIONS_BUNDLE); in onActivityCreated() 105 ((UserManager) activity.getSystemService(Context.USER_SERVICE)) in onActivityCreated() 106 .getApplicationRestrictions(activity.getPackageName()); in onActivityCreated() 113 mRestrictions = activity.getIntent().getParcelableArrayListExtra( in onActivityCreated()
|