Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public class ActivityWithServices extends Activity {
// @SystemService
// CaptioningManager captioningManager;

// TODO API 23
// @SystemService
// CarrierConfigManager carrierConfigManager;

@SystemService
android.content.ClipboardManager contentClipboardManager;

Expand Down Expand Up @@ -129,8 +133,13 @@ public class ActivityWithServices extends Activity {
// @SystemService
// EthernetManager ethernetManager; // hidden API

// TODO API 23
// @SystemService
// FingerprintManager fingerprintManager;

// TODO API 24
// @SystemService
// FingerprintManager fingerprintManager; // hidden API
// HardwarePropertiesManager hardwarePropertiesManager;

// @SystemService
// HdmiControlManager hdmiControlManager; // hidden API
Expand Down Expand Up @@ -169,6 +178,10 @@ public class ActivityWithServices extends Activity {
// TODO API 21
// @SystemService
// MediaSessionManager mediaSessionManager;

// TODO API 23
// @SystemService
// MidiManager midiManager;

// @SystemService
// NetworkScoreManager networkScoreManager; // hidden API
Expand All @@ -179,8 +192,9 @@ public class ActivityWithServices extends Activity {
// @SystemService
// NetworkPolicyManager networkPolicyManager; // hidden API

// TODO API 23
// @SystemService
// NetworkStatsService networkStatsService; // hidden API
// NetworkStatsManager networkStatsManager;

@SystemService
NfcManager nfcManager;
Expand Down Expand Up @@ -226,6 +240,10 @@ public class ActivityWithServices extends Activity {
// TODO API 22
// @SystemService
// SubscriptionManager subscriptionManager;

// TODO API 24
// @SystemService
// SystemHealthManager systemHealthManager;

// TODO API 21
// @SystemService
Expand All @@ -240,6 +258,9 @@ public class ActivityWithServices extends Activity {
// @SystemService
// ThrottleManager throttleManager; // hidden API

// @SystemService
// TrustManager trustManager; // hidden API

// TODO API 21
// @SystemService
// TvInputManager tvInputManager;
Expand Down Expand Up @@ -276,6 +297,9 @@ public class ActivityWithServices extends Activity {
@SystemService
WifiP2pManager wifiP2pManager;

// @SystemService
// RttManager rttManager; // hidden API

@SystemService
WindowManager windowManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void servicesAreInjected() {
// assertThat(activity.bluetoothManager).isNotNull(); // TODO API 18
// assertThat(activity.cameraManager).isNotNull(); // hidden API
// assertThat(activity.captioningManager).isNotNull(); // TODO API 19
// assertThat(activity.carrierConfigManager).isNotNull(); // TODO API 23
assertThat(activity.contentClipboardManager).isNotNull();
assertThat(activity.textClipboardManager).isNotNull();
assertThat(activity.connectivityManager).isNotNull();
Expand All @@ -59,7 +60,8 @@ public void servicesAreInjected() {
assertThat(activity.downloadManager).isNotNull();
assertThat(activity.dropBoxManager).isNotNull();
// assertThat(activity.ethernetManager).isNotNull(); // hidden API
// assertThat(activity.fingerprintManager).isNotNull(); // hidden API
// assertThat(activity.fingerprintManager).isNotNull(); // TODO API 23
// assertThat(activity.hardwarePropertiesManager).isNotNull(); // TODO API 24
// assertThat(activity.hdmiControlManager).isNotNull(); // hidden API
// assertThat(activity.inputManager).isNotNull(); // TODO no support yet in Robolectric
assertThat(activity.inputMethodManager).isNotNull();
Expand All @@ -71,10 +73,11 @@ public void servicesAreInjected() {
// assertThat(activity.mediaProjectionManager).isNotNull(); // TODO API 21
assertThat(activity.mediaRouter).isNotNull();
// assertThat(activity.mediaSessionManager).isNotNull(); // TODO API 21
// assertThat(activity.midiManager).isNotNull(); // TODO API 23
// assertThat(activity.networkScoreManager).isNotNull(); // hidden API
// assertThat(activity.networkManagementService).isNotNull(); // hidden API
// assertThat(activity.networkPolicyManager).isNotNull(); // hidden API
// assertThat(activity.networkStatsService).isNotNull(); // hidden API
// assertThat(activity.networkStatsManager).isNotNull(); // TODO API 23
// assertThat(activity.nfcManager).isNotNull(); // TODO no support yet in Robolectric
assertThat(activity.notificationManager).isNotNull();
// assertThat(activity.nsdManager).isNotNull(); // TODO no support yet in Robolectric
Expand All @@ -89,10 +92,12 @@ public void servicesAreInjected() {
// assertThat(activity.statusBarManager).isNotNull(); // hidden API
assertThat(activity.storageManager).isNotNull();
// assertThat(activity.subscriptionManager).isNotNull(); // TODO API 22
// assertThat(activity.systemHealthManager).isNotNull(); // TODO API 24
// assertThat(activity.telecomManager).isNotNull(); // TODO API 21
assertThat(activity.telephonyManager).isNotNull();
assertThat(activity.textServicesManager).isNotNull();
// assertThat(activity.throttleManager).isNotNull(); // hidden API
// assertThat(activity.trustManager).isNotNull(); // hidden API
// assertThat(activity.tvInputManager).isNotNull(); // TODO API 21
assertThat(activity.uiModeManager).isNotNull();
// assertThat(activity.updateLock).isNotNull(); // hidden API
Expand All @@ -104,6 +109,7 @@ public void servicesAreInjected() {
assertThat(activity.wifiManager).isNotNull();
// assertThat(activity.wifiPasspointManager).isNotNull(); // hidden API
// assertThat(activity.wifiP2pManager).isNotNull(); // TODO no support yet in Robolectric
// assertThat(activity.rttManager).isNotNull(); // hidden API
assertThat(activity.windowManager).isNotNull();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public AndroidSystemServices(AndroidAnnotationsEnvironment environment) {
registeredServices.put("android.bluetooth.BluetoothManager", "android.content.Context.BLUETOOTH_SERVICE");
registeredServices.put("android.hardware.camera2.CameraManager", "android.content.Context.CAMERA_SERVICE");
registeredServices.put("android.view.accessibility.CaptioningManager", "android.content.Context.CAPTIONING_SERVICE");
registeredServices.put("android.telephony.CarrierConfigManager", "android.content.Context.CARRIER_CONFIG_SERVICE");
registeredServices.put("android.content.ClipboardManager", "android.content.Context.CLIPBOARD_SERVICE");
registeredServices.put("android.text.ClipboardManager", "android.content.Context.CLIPBOARD_SERVICE");
registeredServices.put("android.net.ConnectivityManager", "android.content.Context.CONNECTIVITY_SERVICE");
Expand All @@ -54,7 +55,8 @@ public AndroidSystemServices(AndroidAnnotationsEnvironment environment) {
registeredServices.put("android.app.DownloadManager", "android.content.Context.DOWNLOAD_SERVICE");
registeredServices.put("android.os.DropBoxManager", "android.content.Context.DROPBOX_SERVICE");
registeredServices.put("android.net.EthernetManager", "android.content.Context.ETHERNET_SERVICE");
registeredServices.put("android.service.fingerprint.FingerprintManager", "android.content.Context.FINGERPRINT_SERVICE");
registeredServices.put("android.hardware.fingerprint.FingerprintManager", "android.content.Context.FINGERPRINT_SERVICE");
registeredServices.put("android.os.HardwarePropertiesManager", "android.content.Context.HARDWARE_PROPERTIES_SERVICE");
registeredServices.put("android.hardware.hdmi.HdmiControlManager", "android.content.Context.HDMI_CONTROL_SERVICE");
registeredServices.put("android.hardware.input.InputManager", "android.content.Context.INPUT_SERVICE");
registeredServices.put("android.view.inputmethod.InputMethodManager", "android.content.Context.INPUT_METHOD_SERVICE");
Expand All @@ -66,10 +68,11 @@ public AndroidSystemServices(AndroidAnnotationsEnvironment environment) {
registeredServices.put("android.media.projection.MediaProjectionManager", "android.content.Context.MEDIA_PROJECTION_SERVICE");
registeredServices.put("android.media.MediaRouter", "android.content.Context.MEDIA_ROUTER_SERVICE");
registeredServices.put("android.media.session.MediaSessionManager", "android.content.Context.MEDIA_SESSION_SERVICE");
registeredServices.put("android.media.midi.MidiManager", "android.content.Context.MIDI_SERVICE");
registeredServices.put("android.net.NetworkScoreManager", "android.content.Context.NETWORK_SCORE_SERVICE");
registeredServices.put("android.net.NetworkManagementService", "android.content.Context.NETWORKMANAGEMENT_SERVICE");
registeredServices.put("android.net.NetworkPolicyManager", "android.content.Context.NETWORK_POLICY_SERVICE");
registeredServices.put("android.net.NetworkStatsService", "android.content.Context.NETWORK_STATS_SERVICE");
registeredServices.put("android.app.usage.NetworkStatsManager", "android.content.Context.NETWORK_STATS_SERVICE");
registeredServices.put("android.nfc.NfcManager", "android.content.Context.NFC_SERVICE");
registeredServices.put("android.app.NotificationManager", "android.content.Context.NOTIFICATION_SERVICE");
registeredServices.put("android.net.nsd.NsdManager", "android.content.Context.NSD_SERVICE");
Expand All @@ -84,10 +87,12 @@ public AndroidSystemServices(AndroidAnnotationsEnvironment environment) {
registeredServices.put("android.app.StatusBarManager", "android.content.Context.STATUS_BAR_SERVICE");
registeredServices.put("android.os.storage.StorageManager", "android.content.Context.STORAGE_SERVICE");
registeredServices.put("android.telephony.SubscriptionManager", "android.content.Context.TELEPHONY_SUBSCRIPTION_SERVICE");
registeredServices.put("android.os.health.SystemHealthManager", "android.content.Context.SYSTEM_HEALTH_SERVICE");
registeredServices.put("android.telecom.TelecomManager", "android.content.Context.TELECOM_SERVICE");
registeredServices.put("android.telephony.TelephonyManager", "android.content.Context.TELEPHONY_SERVICE");
registeredServices.put("android.view.textservice.TextServicesManager", "android.content.Context.TEXT_SERVICES_MANAGER_SERVICE");
registeredServices.put("android.net.ThrottleManager", "android.content.Context.THROTTLE_SERVICE");
registeredServices.put("android.app.trust.TrustManager", "android.content.Context.TRUST_SERVICE");
registeredServices.put("android.media.tv.TvInputManager", "android.content.Context.TV_INPUT_SERVICE");
registeredServices.put("android.app.UiModeManager", "android.content.Context.UI_MODE_SERVICE");
registeredServices.put("android.os.IUpdateLock", "android.content.Context.UPDATE_LOCK_SERVICE");
Expand All @@ -99,6 +104,7 @@ public AndroidSystemServices(AndroidAnnotationsEnvironment environment) {
registeredServices.put("android.net.wifi.WifiManager", "android.content.Context.WIFI_SERVICE");
registeredServices.put("android.net.wifi.passpoint.WifiPasspointManager", "android.content.Context.WIFI_PASSPOINT_SERVICE");
registeredServices.put("android.net.wifi.p2p.WifiP2pManager", "android.content.Context.WIFI_P2P_SERVICE");
registeredServices.put("android.net.wifi.RttManager", "android.content.Context.WIFI_RTT_SERVICE");
registeredServices.put("android.view.WindowManager", "android.content.Context.WINDOW_SERVICE");
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.