/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/constraints/trackers/ |
StorageNotLowTrackerTest.java | 32 import android.content.IntentFilter; 60 any(IntentFilter.class))).thenReturn(expectedIntent); 87 IntentFilter intentFilter = mTracker.getIntentFilter(); 88 assertThat(intentFilter.hasAction(Intent.ACTION_DEVICE_STORAGE_OK), is(true)); 89 assertThat(intentFilter.hasAction(Intent.ACTION_DEVICE_STORAGE_LOW), is(true)); 90 assertThat(intentFilter.countActions(), is(2));
|
BatteryChargingTrackerTest.java | 35 import android.content.IntentFilter; 67 any(IntentFilter.class))).thenReturn(expectedIntent); 119 IntentFilter intentFilter = mTracker.getIntentFilter(); 120 assertThat(intentFilter.hasAction(Intent.ACTION_POWER_CONNECTED), is(true)); 121 assertThat(intentFilter.hasAction(Intent.ACTION_POWER_DISCONNECTED), is(true)); 122 assertThat(intentFilter.countActions(), is(2)); 129 IntentFilter intentFilter = mTracker.getIntentFilter(); 130 assertThat(intentFilter.hasAction(BatteryManager.ACTION_CHARGING), is(true)) [all...] |
NetworkStateTrackerTest.java | 28 import android.content.IntentFilter; 91 ArgumentCaptor<IntentFilter> argCaptor = ArgumentCaptor.forClass(IntentFilter.class); 94 IntentFilter intentFilter = argCaptor.getValue(); 95 assertThat(intentFilter.hasAction(ConnectivityManager.CONNECTIVITY_ACTION), is(true)); 96 assertThat(intentFilter.countActions(), is(1));
|
BatteryNotLowTrackerTest.java | 33 import android.content.IntentFilter; 70 any(IntentFilter.class))).thenReturn(expectedIntent); 149 IntentFilter intentFilter = mTracker.getIntentFilter(); 150 assertThat(intentFilter.hasAction(Intent.ACTION_BATTERY_OKAY), is(true)); 151 assertThat(intentFilter.hasAction(Intent.ACTION_BATTERY_LOW), is(true)); 152 assertThat(intentFilter.countActions(), is(2));
|
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
IntentFilterTest.java | 3 import android.content.IntentFilter; 15 IntentFilter intentFilter = new IntentFilter(); 16 intentFilter.addDataScheme("http"); 17 intentFilter.addDataScheme("ftp"); 19 assertThat(intentFilter.getDataScheme(0), equalTo("http")); 20 assertThat(intentFilter.getDataScheme(1), equalTo("ftp")); 25 IntentFilter intentFilter = new IntentFilter() [all...] |
/cts/tests/tests/media/src/android/media/cts/ |
DeviceUtils.java | 22 import android.content.IntentFilter; 51 // configure the IntentFilter 52 IntentFilter intentFilter = new IntentFilter(); 53 intentFilter.addAction(AudioManager.ACTION_HDMI_AUDIO_PLUG); 54 Intent intent = context.registerReceiver(null, intentFilter);
|
/frameworks/base/tests/ActivityManagerPerfTests/test-app/src/com/android/frameworks/perftests/amteststestapp/ |
TestApplication.java | 23 import android.content.IntentFilter; 48 IntentFilter intentFilter = new IntentFilter(Constants.ACTION_BROADCAST_REGISTERED_RECEIVE); 49 registerReceiver(registered, intentFilter);
|
/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/constraints/trackers/ |
StorageNotLowTracker.java | 20 import android.content.IntentFilter; 67 public IntentFilter getIntentFilter() { 71 IntentFilter intentFilter = new IntentFilter(); 72 intentFilter.addAction(Intent.ACTION_DEVICE_STORAGE_OK); 73 intentFilter.addAction(Intent.ACTION_DEVICE_STORAGE_LOW); 74 return intentFilter; 80 return; // Should never happen since the IntentFilter was configured.
|
BatteryChargingTracker.java | 20 import android.content.IntentFilter; 48 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); 49 Intent intent = mAppContext.registerReceiver(null, intentFilter); 58 public IntentFilter getIntentFilter() { 59 IntentFilter intentFilter = new IntentFilter(); 61 intentFilter.addAction(BatteryManager.ACTION_CHARGING) [all...] |
BatteryNotLowTracker.java | 20 import android.content.IntentFilter; 61 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); 62 Intent intent = mAppContext.registerReceiver(null, intentFilter); 79 public IntentFilter getIntentFilter() { 80 IntentFilter intentFilter = new IntentFilter(); 81 intentFilter.addAction(Intent.ACTION_BATTERY_OKAY) [all...] |
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
SystemStateProviderTest.java | 30 import android.content.IntentFilter; 101 ArgumentCaptor<IntentFilter> intentFilter = ArgumentCaptor.forClass(IntentFilter.class); 103 verify(mContext).registerReceiver(any(BroadcastReceiver.class), intentFilter.capture()); 105 assertEquals(2, intentFilter.getValue().countActions()); 106 assertEquals(UiModeManager.ACTION_ENTER_CAR_MODE, intentFilter.getValue().getAction(0)); 107 assertEquals(UiModeManager.ACTION_EXIT_CAR_MODE, intentFilter.getValue().getAction(1)); 117 verify(mContext).registerReceiver(receiver.capture(), any(IntentFilter.class));
|
/packages/apps/Dialer/java/com/android/dialer/calllog/ |
RefreshAnnotatedCallLogReceiver.java | 22 import android.content.IntentFilter; 59 /** Returns an {@link IntentFilter} containing all actions accepted by this broadcast receiver. */ 60 public static IntentFilter getIntentFilter() { 61 IntentFilter intentFilter = new IntentFilter(); 62 intentFilter.addAction(IntentNames.ACTION_REFRESH_ANNOTATED_CALL_LOG); 63 intentFilter.addAction(IntentNames.ACTION_CANCEL_REFRESHING_ANNOTATED_CALL_LOG); 64 return intentFilter;
|
/cts/hostsidetests/devicepolicy/app/Assistant/src/com/android/cts/devicepolicy/assistapp/ |
MyInteractionService.java | 22 import android.content.IntentFilter; 41 IntentFilter intentFilter = new IntentFilter(); 42 intentFilter.addAction(ACTION_CHECK_IS_READY); 43 intentFilter.addAction(ACTION_SHOW_SESSION); 44 registerReceiver(mReceiver, intentFilter);
|
/frameworks/base/packages/FusedLocation/src/com/android/location/fused/ |
FusedLocationProvider.java | 30 import android.content.IntentFilter; 69 IntentFilter intentFilter = new IntentFilter(); 70 intentFilter.addAction(Intent.ACTION_USER_SWITCHED); 79 }, UserHandle.ALL, intentFilter, null, mHandler);
|
/packages/apps/Dialer/java/com/android/dialer/app/voicemail/ |
WiredHeadsetManager.java | 21 import android.content.IntentFilter; 52 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_HEADSET_PLUG); 53 context.registerReceiver(receiver, intentFilter);
|
/packages/apps/Dialer/java/com/android/dialer/blockreportspam/ |
ShowBlockReportSpamDialogReceiver.java | 23 import android.content.IntentFilter; 50 /** Returns an {@link IntentFilter} containing all actions accepted by this broadcast receiver. */ 51 public static IntentFilter getIntentFilter() { 52 IntentFilter intentFilter = new IntentFilter(); 53 intentFilter.addAction(ACTION_SHOW_DIALOG_TO_BLOCK_NUMBER_AND_OPTIONALLY_REPORT_SPAM); 54 intentFilter.addAction(ACTION_SHOW_DIALOG_TO_REPORT_NOT_SPAM); 55 return intentFilter;
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
BluetoothDeviceNamePreferenceController.java | 23 import android.content.IntentFilter; 80 final IntentFilter intentFilter = new IntentFilter(); 81 intentFilter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); 82 intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); 83 mContext.registerReceiver(mReceiver, intentFilter);
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
BatteryBroadcastReceiver.java | 22 import android.content.IntentFilter; 87 final IntentFilter intentFilter = new IntentFilter(); 88 intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); 89 intentFilter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED); 91 final Intent intent = mContext.registerReceiver(this, intentFilter);
|
/packages/experimental/ExampleImsFramework/src/com/android/example/imsframework/ |
ImsFrameworkApp.java | 23 import android.content.IntentFilter; 56 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED); 57 intentFilter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED); 58 intentFilter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED); 59 intentFilter.addAction(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED); 60 intentFilter.addAction(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED); 61 registerReceiver(mReceiver, intentFilter);
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/ |
CarUserServiceTest.java | 29 import android.content.IntentFilter; 82 ArgumentCaptor<IntentFilter> argument = ArgumentCaptor.forClass(IntentFilter.class); 85 IntentFilter intentFilter = argument.getValue(); 86 assertThat(intentFilter.countActions()).isEqualTo(1); 88 assertThat(intentFilter.getAction(0)).isEqualTo(Intent.ACTION_LOCKED_BOOT_COMPLETED);
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
DockManager.java | 22 import android.content.IntentFilter; 73 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_DOCK_EVENT); 74 context.registerReceiver(mReceiver, intentFilter);
|
SystemStateProvider.java | 23 import android.content.IntentFilter; 65 IntentFilter intentFilter = new IntentFilter(UiModeManager.ACTION_ENTER_CAR_MODE); 66 intentFilter.addAction(UiModeManager.ACTION_EXIT_CAR_MODE); 67 mContext.registerReceiver(mBroadcastReceiver, intentFilter); 68 Log.i(this, "Registering car mode receiver: %s", intentFilter);
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
LockTaskHostDrivenTest.java | 26 import android.content.IntentFilter; 123 IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MAIN); 124 intentFilter.addCategory(Intent.CATEGORY_HOME); 125 intentFilter.addCategory(Intent.CATEGORY_DEFAULT); 127 BasicAdminReceiver.getComponentName(mContext), intentFilter,
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
CrossProfileUtils.java | 24 import android.content.IntentFilter; 74 public IntentFilter getIntentFilter() { 75 IntentFilter intentFilter = new IntentFilter(); 76 intentFilter.addAction(ACTION_READ_FROM_URI); 77 intentFilter.addAction(ACTION_WRITE_TO_URI); 78 intentFilter.addAction(ACTION_TAKE_PERSISTABLE_URI_PERMISSION); 79 intentFilter.addAction(ACTION_COPY_TO_CLIPBOARD); 80 intentFilter.addAction(ACTION_NOTIFY_URI_CHANGE) [all...] |
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/ |
AlarmOperation.java | 24 import android.content.IntentFilter; 81 IntentFilter intentFilter = new IntentFilter(ACTION); 88 mContext.registerReceiver(receiver, intentFilter);
|