[automerger skipped] Merge "DO NOT MERGE - Kill apps outright for API contract violations" into pi-dev am: 4bcf846f7a -s ours
am skip reason: subject contains skip directive
Change-Id: If8d5b2092fab6b618c336228be1eb80a3a95081a
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d7aebc6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/.idea
+*.iml
+*.sw*
diff --git a/Android.bp b/Android.bp
index 22fe23d..ec71826 100644
--- a/Android.bp
+++ b/Android.bp
@@ -25,8 +25,9 @@
//
// READ ME: ########################################################
-java_library {
- name: "framework",
+java_defaults {
+ name: "framework-defaults",
+ installable: true,
srcs: [
// From build/make/core/pathmap.mk FRAMEWORK_BASE_SUBDIRS
@@ -58,6 +59,7 @@
"core/java/android/app/IActivityController.aidl",
"core/java/android/app/IActivityManager.aidl",
"core/java/android/app/IActivityPendingResult.aidl",
+ "core/java/android/app/IActivityTaskManager.aidl",
"core/java/android/app/IAlarmCompleteListener.aidl",
"core/java/android/app/IAlarmListener.aidl",
"core/java/android/app/IAlarmManager.aidl",
@@ -67,11 +69,11 @@
"core/java/android/app/ITaskStackListener.aidl",
"core/java/android/app/IBackupAgent.aidl",
"core/java/android/app/IEphemeralResolver.aidl",
- "core/java/android/app/IInputForwarder.aidl",
"core/java/android/app/IInstantAppResolver.aidl",
"core/java/android/app/IInstrumentationWatcher.aidl",
"core/java/android/app/INotificationManager.aidl",
"core/java/android/app/IProcessObserver.aidl",
+ "core/java/android/app/IRequestFinishCallback.aidl",
"core/java/android/app/ISearchManager.aidl",
"core/java/android/app/ISearchManagerCallback.aidl",
"core/java/android/app/IServiceConnection.aidl",
@@ -83,14 +85,17 @@
"core/java/android/app/IUidObserver.aidl",
"core/java/android/app/IUiAutomationConnection.aidl",
"core/java/android/app/IUiModeManager.aidl",
+ "core/java/android/app/IUriGrantsManager.aidl",
"core/java/android/app/IUserSwitchObserver.aidl",
"core/java/android/app/IWallpaperManager.aidl",
"core/java/android/app/IWallpaperManagerCallback.aidl",
"core/java/android/app/admin/IDeviceAdminService.aidl",
"core/java/android/app/admin/IDevicePolicyManager.aidl",
+ "core/java/android/app/admin/StartInstallingUpdateCallback.aidl",
"core/java/android/app/trust/IStrongAuthTracker.aidl",
"core/java/android/app/trust/ITrustManager.aidl",
"core/java/android/app/trust/ITrustListener.aidl",
+ "core/java/android/app/backup/IBackupCallback.aidl",
"core/java/android/app/backup/IBackupManager.aidl",
"core/java/android/app/backup/IBackupObserver.aidl",
"core/java/android/app/backup/IBackupManagerMonitor.aidl",
@@ -98,8 +103,17 @@
"core/java/android/app/backup/IRestoreObserver.aidl",
"core/java/android/app/backup/IRestoreSession.aidl",
"core/java/android/app/backup/ISelectBackupTransportCallback.aidl",
+ "core/java/android/app/contentsuggestions/IClassificationsCallback.aidl",
+ "core/java/android/app/contentsuggestions/IContentSuggestionsManager.aidl",
+ "core/java/android/app/contentsuggestions/ISelectionsCallback.aidl",
+ "core/java/android/app/prediction/IPredictionCallback.aidl",
+ "core/java/android/app/prediction/IPredictionManager.aidl",
+ "core/java/android/app/role/IOnRoleHoldersChangedListener.aidl",
+ "core/java/android/app/role/IRoleController.aidl",
+ "core/java/android/app/role/IRoleManager.aidl",
"core/java/android/app/slice/ISliceManager.aidl",
"core/java/android/app/slice/ISliceListener.aidl",
+ "core/java/android/app/timedetector/ITimeDetectorService.aidl",
"core/java/android/app/timezone/ICallback.aidl",
"core/java/android/app/timezone/IRulesManager.aidl",
"core/java/android/app/usage/ICacheQuotaService.aidl",
@@ -140,18 +154,28 @@
"core/java/android/content/pm/dex/IArtManager.aidl",
"core/java/android/content/pm/dex/ISnapshotRuntimeProfileCallback.aidl",
"core/java/android/content/pm/permission/IRuntimePermissionPresenter.aidl",
+ "core/java/android/content/rollback/IRollbackManager.aidl",
"core/java/android/database/IContentObserver.aidl",
+ "core/java/android/debug/IAdbManager.aidl",
+ "core/java/android/debug/IAdbTransport.aidl",
":libcamera_client_aidl",
":libcamera_client_framework_aidl",
"core/java/android/hardware/IConsumerIrService.aidl",
"core/java/android/hardware/ISerialManager.aidl",
- "core/java/android/hardware/biometrics/IBiometricPromptReceiver.aidl",
+ "core/java/android/hardware/biometrics/IBiometricConfirmDeviceCredentialCallback.aidl",
+ "core/java/android/hardware/biometrics/IBiometricEnabledOnKeyguardCallback.aidl",
+ "core/java/android/hardware/biometrics/IBiometricService.aidl",
+ "core/java/android/hardware/biometrics/IBiometricServiceReceiver.aidl",
+ "core/java/android/hardware/biometrics/IBiometricServiceReceiverInternal.aidl",
+ "core/java/android/hardware/biometrics/IBiometricServiceLockoutResetCallback.aidl",
+ "core/java/android/hardware/display/IColorDisplayManager.aidl",
"core/java/android/hardware/display/IDisplayManager.aidl",
"core/java/android/hardware/display/IDisplayManagerCallback.aidl",
"core/java/android/hardware/display/IVirtualDisplayCallback.aidl",
"core/java/android/hardware/fingerprint/IFingerprintClientActiveCallback.aidl",
+ "core/java/android/hardware/face/IFaceService.aidl",
+ "core/java/android/hardware/face/IFaceServiceReceiver.aidl",
"core/java/android/hardware/fingerprint/IFingerprintService.aidl",
- "core/java/android/hardware/fingerprint/IFingerprintServiceLockoutResetCallback.aidl",
"core/java/android/hardware/fingerprint/IFingerprintServiceReceiver.aidl",
"core/java/android/hardware/hdmi/IHdmiControlCallback.aidl",
"core/java/android/hardware/hdmi/IHdmiControlService.aidl",
@@ -165,6 +189,7 @@
"core/java/android/hardware/input/IInputManager.aidl",
"core/java/android/hardware/input/IInputDevicesChangedListener.aidl",
"core/java/android/hardware/input/ITabletModeChangedListener.aidl",
+ "core/java/android/hardware/iris/IIrisService.aidl",
"core/java/android/hardware/location/IActivityRecognitionHardware.aidl",
"core/java/android/hardware/location/IActivityRecognitionHardwareClient.aidl",
"core/java/android/hardware/location/IActivityRecognitionHardwareSink.aidl",
@@ -184,8 +209,11 @@
"core/java/android/hardware/radio/ITunerCallback.aidl",
"core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl",
"core/java/android/hardware/usb/IUsbManager.aidl",
+ "core/java/android/hardware/usb/IUsbSerialReader.aidl",
"core/java/android/net/ICaptivePortal.aidl",
"core/java/android/net/IConnectivityManager.aidl",
+ "core/java/android/hardware/ISensorPrivacyListener.aidl",
+ "core/java/android/hardware/ISensorPrivacyManager.aidl",
"core/java/android/net/IIpConnectivityMetrics.aidl",
"core/java/android/net/IEthernetManager.aidl",
"core/java/android/net/IEthernetServiceListener.aidl",
@@ -199,6 +227,9 @@
"core/java/android/net/INetworkScoreService.aidl",
"core/java/android/net/INetworkStatsService.aidl",
"core/java/android/net/INetworkStatsSession.aidl",
+ "core/java/android/net/ISocketKeepaliveCallback.aidl",
+ "core/java/android/net/ITestNetworkManager.aidl",
+ "core/java/android/net/ITetheringEventCallback.aidl",
"core/java/android/net/ITetheringStatsProvider.aidl",
"core/java/android/net/nsd/INsdManager.aidl",
"core/java/android/nfc/IAppCallback.aidl",
@@ -215,14 +246,12 @@
"core/java/android/se/omapi/ISecureElementChannel.aidl",
"core/java/android/se/omapi/ISecureElementReader.aidl",
"core/java/android/se/omapi/ISecureElementSession.aidl",
- "core/java/android/os/IBatteryPropertiesListener.aidl",
"core/java/android/os/IBatteryPropertiesRegistrar.aidl",
"core/java/android/os/ICancellationSignal.aidl",
"core/java/android/os/IDeviceIdentifiersPolicyService.aidl",
"core/java/android/os/IDeviceIdleController.aidl",
"core/java/android/os/IHardwarePropertiesManager.aidl",
- "core/java/android/os/IIncidentManager.aidl",
- "core/java/android/os/IIncidentReportStatusListener.aidl",
+ ":libincident_aidl",
"core/java/android/os/IMaintenanceActivityListener.aidl",
"core/java/android/os/IMessenger.aidl",
"core/java/android/os/INetworkActivityListener.aidl",
@@ -235,20 +264,26 @@
"core/java/android/os/IRecoverySystemProgressListener.aidl",
"core/java/android/os/IRemoteCallback.aidl",
"core/java/android/os/ISchedulingPolicyService.aidl",
- "core/java/android/os/IStatsCompanionService.aidl",
- "core/java/android/os/IStatsManager.aidl",
+ ":statsd_aidl",
"core/java/android/os/ISystemUpdateManager.aidl",
"core/java/android/os/IThermalEventListener.aidl",
+ "core/java/android/os/IThermalStatusListener.aidl",
"core/java/android/os/IThermalService.aidl",
"core/java/android/os/IUpdateLock.aidl",
"core/java/android/os/IUserManager.aidl",
+ ":libvibrator_aidl",
"core/java/android/os/IVibratorService.aidl",
+ "core/java/android/os/image/IDynamicSystemService.aidl",
"core/java/android/os/storage/IStorageManager.aidl",
"core/java/android/os/storage/IStorageEventListener.aidl",
"core/java/android/os/storage/IStorageShutdownObserver.aidl",
"core/java/android/os/storage/IObbActionListener.aidl",
+ "core/java/android/permission/IPermissionController.aidl",
":keystore_aidl",
"core/java/android/security/keymaster/IKeyAttestationApplicationIdProvider.aidl",
+ "core/java/android/service/appprediction/IPredictionService.aidl",
+ "core/java/android/service/autofill/augmented/IAugmentedAutofillService.aidl",
+ "core/java/android/service/autofill/augmented/IFillCallback.aidl",
"core/java/android/service/autofill/IAutoFillService.aidl",
"core/java/android/service/autofill/IAutofillFieldClassificationService.aidl",
"core/java/android/service/autofill/IFillCallback.aidl",
@@ -256,6 +291,8 @@
"core/java/android/service/carrier/ICarrierService.aidl",
"core/java/android/service/carrier/ICarrierMessagingCallback.aidl",
"core/java/android/service/carrier/ICarrierMessagingService.aidl",
+ "core/java/android/service/carrier/ICarrierMessagingClientService.aidl",
+ "core/java/android/service/contentsuggestions/IContentSuggestionsService.aidl",
"core/java/android/service/euicc/IDeleteSubscriptionCallback.aidl",
"core/java/android/service/euicc/IDownloadSubscriptionCallback.aidl",
"core/java/android/service/euicc/IEraseSubscriptionsCallback.aidl",
@@ -271,15 +308,19 @@
"core/java/android/service/euicc/ISwitchToSubscriptionCallback.aidl",
"core/java/android/service/euicc/IUpdateSubscriptionNicknameCallback.aidl",
"core/java/android/service/gatekeeper/IGateKeeperService.aidl",
+ "core/java/android/service/contentcapture/IContentCaptureService.aidl",
+ "core/java/android/service/contentcapture/IContentCaptureServiceCallback.aidl",
"core/java/android/service/notification/INotificationListener.aidl",
"core/java/android/service/notification/IStatusBarNotificationHolder.aidl",
"core/java/android/service/notification/IConditionListener.aidl",
"core/java/android/service/notification/IConditionProvider.aidl",
"core/java/android/service/settings/suggestions/ISuggestionService.aidl",
+ "core/java/android/service/sms/IFinancialSmsService.aidl",
"core/java/android/service/vr/IPersistentVrStateCallbacks.aidl",
"core/java/android/service/vr/IVrListener.aidl",
"core/java/android/service/vr/IVrManager.aidl",
"core/java/android/service/vr/IVrStateCallbacks.aidl",
+ "core/java/android/service/watchdog/IExplicitHealthCheckService.aidl",
"core/java/android/print/ILayoutResultCallback.aidl",
"core/java/android/print/IPrinterDiscoveryObserver.aidl",
"core/java/android/print/IPrintDocumentAdapter.aidl",
@@ -316,22 +357,27 @@
"core/java/android/service/chooser/IChooserTargetResult.aidl",
"core/java/android/service/resolver/IResolverRankerService.aidl",
"core/java/android/service/resolver/IResolverRankerResult.aidl",
- "core/java/android/service/textclassifier/ITextClassificationCallback.aidl",
+ "core/java/android/service/textclassifier/ITextClassifierCallback.aidl",
"core/java/android/service/textclassifier/ITextClassifierService.aidl",
- "core/java/android/service/textclassifier/ITextLinksCallback.aidl",
- "core/java/android/service/textclassifier/ITextSelectionCallback.aidl",
+ "core/java/android/service/attention/IAttentionService.aidl",
+ "core/java/android/service/attention/IAttentionCallback.aidl",
"core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl",
"core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl",
"core/java/android/view/accessibility/IAccessibilityManager.aidl",
"core/java/android/view/accessibility/IAccessibilityManagerClient.aidl",
"core/java/android/view/autofill/IAutoFillManager.aidl",
"core/java/android/view/autofill/IAutoFillManagerClient.aidl",
+ "core/java/android/view/autofill/IAugmentedAutofillManagerClient.aidl",
"core/java/android/view/autofill/IAutofillWindowPresenter.aidl",
+ "core/java/android/view/contentcapture/IContentCaptureDirectManager.aidl",
+ "core/java/android/view/contentcapture/IContentCaptureManager.aidl",
"core/java/android/view/IApplicationToken.aidl",
"core/java/android/view/IAppTransitionAnimationSpecsFuture.aidl",
"core/java/android/view/IDockedStackListener.aidl",
+ "core/java/android/view/IDisplayFoldListener.aidl",
"core/java/android/view/IGraphicsStats.aidl",
"core/java/android/view/IGraphicsStatsCallback.aidl",
+ "core/java/android/view/IInputMonitorHost.aidl",
"core/java/android/view/IInputFilter.aidl",
"core/java/android/view/IInputFilterHost.aidl",
"core/java/android/view/IOnKeyguardExitResult.aidl",
@@ -342,6 +388,7 @@
"core/java/android/view/IRecentsAnimationRunner.aidl",
"core/java/android/view/IRemoteAnimationFinishedCallback.aidl",
"core/java/android/view/IRotationWatcher.aidl",
+ "core/java/android/view/ISystemGestureExclusionListener.aidl",
"core/java/android/view/IWallpaperVisibilityListener.aidl",
"core/java/android/view/IWindow.aidl",
"core/java/android/view/IWindowFocusObserver.aidl",
@@ -356,9 +403,11 @@
"core/java/android/speech/tts/ITextToSpeechService.aidl",
"core/java/com/android/internal/app/IAppOpsActiveCallback.aidl",
"core/java/com/android/internal/app/IAppOpsCallback.aidl",
+ "core/java/com/android/internal/app/IAppOpsNotedCallback.aidl",
"core/java/com/android/internal/app/IAppOpsService.aidl",
"core/java/com/android/internal/app/IBatteryStats.aidl",
"core/java/com/android/internal/app/ISoundTriggerService.aidl",
+ "core/java/com/android/internal/app/IVoiceActionCheckCallback.aidl",
"core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl",
"core/java/com/android/internal/app/IVoiceInteractionSessionListener.aidl",
"core/java/com/android/internal/app/IVoiceInteractionSessionShowCallback.aidl",
@@ -372,6 +421,10 @@
"core/java/com/android/internal/backup/IBackupTransport.aidl",
"core/java/com/android/internal/backup/IObbBackupService.aidl",
"core/java/com/android/internal/inputmethod/IInputContentUriToken.aidl",
+ "core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl",
+ "core/java/com/android/internal/inputmethod/IMultiClientInputMethod.aidl",
+ "core/java/com/android/internal/inputmethod/IMultiClientInputMethodPrivilegedOperations.aidl",
+ "core/java/com/android/internal/inputmethod/IMultiClientInputMethodSession.aidl",
"core/java/com/android/internal/net/INetworkWatchlistManager.aidl",
"core/java/com/android/internal/policy/IKeyguardDrawnCallback.aidl",
"core/java/com/android/internal/policy/IKeyguardDismissCallback.aidl",
@@ -410,7 +463,6 @@
"location/java/android/location/IGeocodeProvider.aidl",
"location/java/android/location/IGeofenceProvider.aidl",
"location/java/android/location/IGnssStatusListener.aidl",
- "location/java/android/location/IGnssStatusProvider.aidl",
"location/java/android/location/IGnssMeasurementsListener.aidl",
"location/java/android/location/IGnssNavigationMessageListener.aidl",
"location/java/android/location/ILocationListener.aidl",
@@ -419,6 +471,7 @@
"location/java/android/location/IGpsGeofenceHardware.aidl",
"location/java/android/location/INetInitiatedListener.aidl",
"location/java/com/android/internal/location/ILocationProvider.aidl",
+ "location/java/com/android/internal/location/ILocationProviderManager.aidl",
"media/java/android/media/IAudioFocusDispatcher.aidl",
"media/java/android/media/IAudioRoutesObserver.aidl",
"media/java/android/media/IAudioService.aidl",
@@ -431,7 +484,6 @@
"media/java/android/media/IMediaScannerListener.aidl",
"media/java/android/media/IMediaScannerService.aidl",
"media/java/android/media/IPlaybackConfigDispatcher.aidl",
- "media/java/android/media/ISessionTokensListener.aidl",
":libaudioclient_aidl",
"media/java/android/media/IRecordingConfigDispatcher.aidl",
"media/java/android/media/IRemoteDisplayCallback.aidl",
@@ -455,6 +507,7 @@
"media/java/android/media/session/IOnMediaKeyListener.aidl",
"media/java/android/media/session/IOnVolumeKeyLongPressListener.aidl",
"media/java/android/media/session/ISession.aidl",
+ "media/java/android/media/session/ISession2TokensListener.aidl",
"media/java/android/media/session/ISessionCallback.aidl",
"media/java/android/media/session/ISessionController.aidl",
"media/java/android/media/session/ISessionControllerCallback.aidl",
@@ -474,6 +527,8 @@
"media/java/android/media/tv/ITvRemoteServiceInput.aidl",
"media/java/android/service/media/IMediaBrowserService.aidl",
"media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl",
+ "telecomm/java/com/android/internal/telecom/ICallRedirectionAdapter.aidl",
+ "telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl",
"telecomm/java/com/android/internal/telecom/ICallScreeningAdapter.aidl",
"telecomm/java/com/android/internal/telecom/ICallScreeningService.aidl",
"telecomm/java/com/android/internal/telecom/IVideoCallback.aidl",
@@ -482,10 +537,14 @@
"telecomm/java/com/android/internal/telecom/IConnectionServiceAdapter.aidl",
"telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl",
"telecomm/java/com/android/internal/telecom/IInCallService.aidl",
+ "telecomm/java/com/android/internal/telecom/IPhoneAccountSuggestionCallback.aidl",
+ "telecomm/java/com/android/internal/telecom/IPhoneAccountSuggestionService.aidl",
"telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
"telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
"telephony/java/android/telephony/data/IDataService.aidl",
"telephony/java/android/telephony/data/IDataServiceCallback.aidl",
+ "telephony/java/android/telephony/data/IQualifiedNetworksService.aidl",
+ "telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl",
"telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl",
"telephony/java/android/telephony/ims/aidl/IImsCapabilityCallback.aidl",
"telephony/java/android/telephony/ims/aidl/IImsConfig.aidl",
@@ -498,13 +557,19 @@
"telephony/java/android/telephony/ims/aidl/IImsServiceController.aidl",
"telephony/java/android/telephony/ims/aidl/IImsServiceControllerListener.aidl",
"telephony/java/android/telephony/ims/aidl/IImsSmsListener.aidl",
+ "telephony/java/android/telephony/ims/aidl/IRcs.aidl",
"telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
+ "telephony/java/android/telephony/mbms/IMbmsGroupCallSessionCallback.aidl",
"telephony/java/android/telephony/mbms/IDownloadStatusListener.aidl",
"telephony/java/android/telephony/mbms/IDownloadProgressListener.aidl",
"telephony/java/android/telephony/mbms/IStreamingServiceCallback.aidl",
+ "telephony/java/android/telephony/mbms/IGroupCallCallback.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl",
"telephony/java/android/telephony/mbms/vendor/IMbmsStreamingService.aidl",
+ "telephony/java/android/telephony/mbms/vendor/IMbmsGroupCallService.aidl",
+ "telephony/java/android/telephony/ICellInfoCallback.aidl",
+ "telephony/java/android/telephony/IFinancialSmsCallback.aidl",
"telephony/java/android/telephony/INetworkService.aidl",
"telephony/java/android/telephony/INetworkServiceCallback.aidl",
"telephony/java/com/android/ims/internal/IImsCallSession.aidl",
@@ -535,14 +600,19 @@
"telephony/java/com/android/ims/ImsConfigListener.aidl",
"telephony/java/com/android/internal/telephony/IApnSourceService.aidl",
"telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl",
+ "telephony/java/com/android/internal/telephony/IIntegerConsumer.aidl",
"telephony/java/com/android/internal/telephony/IMms.aidl",
+ "telephony/java/com/android/internal/telephony/INumberVerificationCallback.aidl",
"telephony/java/com/android/internal/telephony/IOnSubscriptionsChangedListener.aidl",
"telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl",
"telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl",
+ "telephony/java/com/android/internal/telephony/ISetOpportunisticDataCallback.aidl",
"telephony/java/com/android/internal/telephony/ISms.aidl",
"telephony/java/com/android/internal/telephony/ISub.aidl",
+ "telephony/java/com/android/internal/telephony/IOns.aidl",
"telephony/java/com/android/internal/telephony/ITelephony.aidl",
"telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl",
+ "telephony/java/com/android/internal/telephony/IUpdateAvailableNetworksCallback.aidl",
"telephony/java/com/android/internal/telephony/IWapPushManager.aidl",
"telephony/java/com/android/internal/telephony/euicc/IAuthenticateServerCallback.aidl",
"telephony/java/com/android/internal/telephony/euicc/ICancelSessionCallback.aidl",
@@ -568,8 +638,12 @@
"telephony/java/com/android/internal/telephony/euicc/ISetDefaultSmdpAddressCallback.aidl",
"telephony/java/com/android/internal/telephony/euicc/ISetNicknameCallback.aidl",
"telephony/java/com/android/internal/telephony/euicc/ISwitchToProfileCallback.aidl",
+ "wifi/java/android/net/wifi/INetworkRequestMatchCallback.aidl",
+ "wifi/java/android/net/wifi/INetworkRequestUserSelectionCallback.aidl",
"wifi/java/android/net/wifi/ISoftApCallback.aidl",
+ "wifi/java/android/net/wifi/ITrafficStateCallback.aidl",
"wifi/java/android/net/wifi/IWifiManager.aidl",
+ "wifi/java/android/net/wifi/IOnWifiUsabilityStatsListener.aidl",
"wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl",
"wifi/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl",
"wifi/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl",
@@ -578,6 +652,7 @@
"wifi/java/android/net/wifi/rtt/IRttCallback.aidl",
"wifi/java/android/net/wifi/rtt/IWifiRttManager.aidl",
"wifi/java/android/net/wifi/hotspot2/IProvisioningCallback.aidl",
+ "wifi/java/android/net/wifi/IDppCallback.aidl",
"wifi/java/android/net/wifi/IWifiScanner.aidl",
"packages/services/PacProcessor/com/android/net/IProxyService.aidl",
"packages/services/Proxy/com/android/net/IProxyCallback.aidl",
@@ -588,9 +663,11 @@
":libupdate_engine_aidl",
":storaged_aidl",
- ":netd_aidl",
":vold_aidl",
+ ":gsiservice_aidl",
":installd_aidl",
+ ":dumpstate_aidl",
+ ":incidentcompanion_aidl",
"lowpan/java/android/net/lowpan/ILowpanEnergyScanCallback.aidl",
"lowpan/java/android/net/lowpan/ILowpanNetScanCallback.aidl",
@@ -610,6 +687,9 @@
"core/java/com/android/server/DropboxLogTags.logtags",
"core/java/org/chromium/arc/EventLogTags.logtags",
+ ":apex-properties",
+ ":platform-properties",
+
":framework-statslog-gen",
],
@@ -621,6 +701,7 @@
"location/java",
"lowpan/java",
"media/java",
+ "media/apex/java",
"media/mca/effect/java",
"media/mca/filterfw/java",
"media/mca/filterpacks/java",
@@ -637,73 +718,129 @@
include_dirs: [
"system/update_engine/binder_bindings",
"frameworks/native/aidl/binder",
+ "frameworks/native/cmds/dumpstate/binder",
+ "frameworks/native/libs/incidentcompanion/binder",
"frameworks/av/camera/aidl",
"frameworks/av/media/libaudioclient/aidl",
"frameworks/native/aidl/gui",
+ "frameworks/native/libs/incidentcompanion/binder",
"system/core/storaged/binder",
- "system/netd/server/binder",
"system/vold/binder",
+ "system/gsid/aidl",
"system/bt/binder",
"system/security/keystore/binder",
],
+
+ generate_get_transaction_name: true
},
exclude_srcs: [
// See comment on framework-atb-backward-compatibility module below
"core/java/android/content/pm/AndroidTestBaseUpdater.java",
- // See comment on framework-oahl-backward-compatibility module below
- "core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java",
],
no_framework_libs: true,
libs: [
- "conscrypt",
- "okhttp",
- "bouncycastle",
"ext",
+ "updatable_media_stubs",
],
+ jarjar_rules: ":framework-jarjar-rules",
+
static_libs: [
+ "apex_aidl_interface-java",
"framework-protos",
+ "game-driver-protos",
"android.hidl.base-V1.0-java",
+ "android.hardware.cas-V1.1-java",
"android.hardware.cas-V1.0-java",
"android.hardware.contexthub-V1.0-java",
"android.hardware.health-V1.0-java-constants",
+ "android.hardware.radio-V1.0-java",
+ "android.hardware.radio-V1.1-java",
+ "android.hardware.radio-V1.2-java",
+ "android.hardware.radio-V1.3-java",
+ "android.hardware.radio-V1.4-java",
"android.hardware.thermal-V1.0-java-constants",
+ "android.hardware.thermal-V1.0-java",
+ "android.hardware.thermal-V1.1-java",
+ "android.hardware.thermal-V2.0-java",
"android.hardware.tv.input-V1.0-java-constants",
"android.hardware.usb-V1.0-java-constants",
"android.hardware.usb-V1.1-java-constants",
+ "android.hardware.usb-V1.2-java-constants",
+ "android.hardware.usb.gadget-V1.0-java",
"android.hardware.vibrator-V1.0-java",
"android.hardware.vibrator-V1.1-java",
"android.hardware.vibrator-V1.2-java",
+ "android.hardware.vibrator-V1.3-java",
"android.hardware.wifi-V1.0-java-constants",
- "android.hardware.radio-V1.0-java",
- "android.hardware.usb.gadget-V1.0-java",
+ "devicepolicyprotosnano",
],
- // Loaded with System.loadLibrary by android.view.textclassifier
required: [
- "libtextclassifier",
- "libmedia2_jni",
+ // TODO: remove gps_debug when the build system propagates "required" properly.
+ "gps_debug.conf",
],
- javac_shard_size: 150,
-
dxflags: [
"--core-library",
"--multi-dex",
],
+
+ plugins: ["view-inspector-annotation-processor"],
}
-// A temporary build target that is conditionally included on the bootclasspath if
-// org.apache.http.legacy library has been removed and which provides support for
-// maintaining backwards compatibility for APKs that target pre-P and depend on
-// org.apache.http.legacy classes. This is used iff REMOVE_OAHL_FROM_BCP=true is
-// specified on the build command line.
-java_library {
- name: "framework-oahl-backward-compatibility",
+filegroup {
+ name: "framework-jarjar-rules",
+ srcs: ["jarjar_rules_hidl.txt"],
+}
+
+filegroup {
+ name: "libincident_aidl",
srcs: [
- "core/java/android/content/pm/OrgApacheHttpLegacyUpdater.java",
+ "core/java/android/os/IIncidentManager.aidl",
+ "core/java/android/os/IIncidentReportStatusListener.aidl",
+ ],
+}
+
+filegroup {
+ name: "statsd_aidl",
+ srcs: [
+ "core/java/android/os/IStatsCompanionService.aidl",
+ "core/java/android/os/IStatsManager.aidl",
+ "core/java/android/os/IStatsPullerCallback.aidl",
+ ],
+}
+
+filegroup {
+ name: "libvibrator_aidl",
+ srcs: [
+ "core/java/android/os/IExternalVibrationController.aidl",
+ "core/java/android/os/IExternalVibratorService.aidl",
+ ],
+}
+
+java_library {
+ name: "framework",
+ defaults: ["framework-defaults"],
+ javac_shard_size: 150,
+}
+
+java_library {
+ name: "framework-annotation-proc",
+ defaults: ["framework-defaults"],
+ // Use UsedByApps annotation processor
+ plugins: ["unsupportedappusage-annotation-processor"],
+}
+
+// A host library including just UnsupportedAppUsage.java so that the annotation
+// processor can also use this annotation.
+java_library_host {
+ name: "unsupportedappusage-annotation",
+ srcs: [
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
],
}
@@ -714,6 +851,7 @@
// specified on the build command line.
java_library {
name: "framework-atb-backward-compatibility",
+ installable: true,
srcs: [
"core/java/android/content/pm/AndroidTestBaseUpdater.java",
],
@@ -730,22 +868,24 @@
name: "framework-javastream-protos",
depfile: true,
+ tool_files: [ "tools/genprotos.sh", ],
tools: [
"aprotoc",
"protoc-gen-javastream",
"soong_zip",
],
- cmd: "mkdir -p $(genDir)/$(in) " +
- "&& $(location aprotoc) " +
- " --plugin=$(location protoc-gen-javastream) " +
- " --dependency_out=$(depfile) " +
- " --javastream_out=$(genDir)/$(in) " +
- " -Iexternal/protobuf/src " +
- " -I . " +
- " $(in) " +
- "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
-
+ // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
+ // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
+ // the way sbox rewrites the command. See b/70221552.
+ cmd: "$(location tools/genprotos.sh) " +
+ " $(location aprotoc) " +
+ " $(location protoc-gen-javastream) " +
+ " $(location soong_zip) " +
+ " $(genDir) " +
+ " $(depfile) " +
+ " $(in) " +
+ " $(out)",
srcs: [
"core/proto/**/*.proto",
"libs/incident/**/*.proto",
@@ -753,24 +893,122 @@
output_extension: "srcjar",
}
+filegroup {
+ name: "framework-annotations",
+ srcs: [
+ "core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/Nullable.java",
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/IntRange.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
+ "core/java/com/android/internal/annotations/GuardedBy.java",
+ "core/java/com/android/internal/annotations/VisibleForTesting.java",
+ ]
+}
+
+filegroup {
+ name: "framework-networkstack-shared-srcs",
+ srcs: [
+ // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
+ ":framework-annotations",
+ "core/java/android/net/DhcpResults.java",
+ "core/java/android/util/LocalLog.java",
+ "core/java/com/android/internal/util/HexDump.java",
+ "core/java/com/android/internal/util/IndentingPrintWriter.java",
+ "core/java/com/android/internal/util/IState.java",
+ "core/java/com/android/internal/util/MessageUtils.java",
+ "core/java/com/android/internal/util/Preconditions.java",
+ "core/java/com/android/internal/util/RingBufferIndices.java",
+ "core/java/com/android/internal/util/State.java",
+ "core/java/com/android/internal/util/StateMachine.java",
+ "core/java/com/android/internal/util/TrafficStatsConstants.java",
+ "core/java/com/android/internal/util/WakeupMessage.java",
+ "core/java/android/net/shared/*.java",
+ ]
+}
+
// Build ext.jar
// ============================================================
java_library {
name: "ext",
+ installable: true,
no_framework_libs: true,
static_libs: [
"libphonenumber-platform",
"nist-sip",
"tagsoup",
"rappor",
+ "libtextclassifier-java",
+ ],
+ required: [
+ "libtextclassifier",
],
dxflags: ["--core-library"],
}
+// ==== java proto host library ==============================
+java_library_host {
+ name: "platformprotos",
+ srcs: [
+ "cmds/am/proto/instrumentation_data.proto",
+ "cmds/statsd/src/**/*.proto",
+ "core/proto/**/*.proto",
+ "libs/incident/proto/**/*.proto",
+ ],
+ proto: {
+ include_dirs: ["external/protobuf/src"],
+ type: "full",
+ },
+ errorprone: {
+ javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
+ },
+}
+
+// ==== java proto device library (for test only) ==============================
+java_library {
+ name: "platformprotosnano",
+ proto: {
+ type: "nano",
+ output_params: ["store_unknown_fields=true"],
+ include_dirs: ["external/protobuf/src"],
+ },
+ exclude_srcs: [
+ "core/proto/android/privacy.proto",
+ "core/proto/android/section.proto",
+ ],
+ sdk_version: "current",
+ srcs: [
+ "core/proto/**/*.proto",
+ "libs/incident/proto/android/os/**/*.proto",
+ ],
+}
+
+// ==== java proto device library (for test only) ==============================
+java_library {
+ name: "platformprotoslite",
+ proto: {
+ type: "lite",
+ include_dirs: ["external/protobuf/src"],
+ },
+
+ srcs: [
+ "core/proto/**/*.proto",
+ "libs/incident/proto/android/os/**/*.proto",
+ ],
+ exclude_srcs: [
+ "core/proto/android/privacy.proto",
+ "core/proto/android/section.proto",
+ ],
+ // Protos have lots of MissingOverride and similar.
+ errorprone: {
+ javacflags: ["-XepDisableAllChecks"],
+ },
+}
+
// ==== c++ proto device library ==============================
-cc_library {
- name: "libplatformprotos",
- host_supported: true,
+cc_defaults {
+ name: "libplatformprotos-defaults",
+
proto: {
export_proto_headers: true,
include_dirs: ["external/protobuf/src"],
@@ -784,8 +1022,13 @@
srcs: [
"core/proto/**/*.proto",
- "libs/incident/**/*.proto",
],
+}
+
+cc_library {
+ name: "libplatformprotos",
+ defaults: ["libplatformprotos-defaults"],
+ host_supported: true,
target: {
host: {
@@ -797,6 +1040,9 @@
proto: {
type: "lite",
},
+ shared_libs: [
+ "libprotobuf-cpp-lite",
+ ],
shared: {
enabled: false,
},
@@ -804,6 +1050,55 @@
},
}
+// This library is meant for vendor code that needs to output protobuf. It links
+// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
+// binary compatibility.
+cc_library {
+ name: "libplatformprotos-static",
+ defaults: ["libplatformprotos-defaults"],
+ host_supported: false,
+
+ // This is okay because this library is only built as a static library. The C++
+ // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
+ // but is not authorized to be used outside of debugging.
+ vendor_available: true,
+
+ target: {
+ android: {
+ proto: {
+ type: "lite",
+ },
+ static_libs: [
+ "libprotobuf-cpp-lite",
+ ],
+ shared: {
+ enabled: false,
+ },
+ },
+ },
+}
+
+
+// This is the full proto version of libplatformprotos. It may only
+// be used by test code that is not shipped on the device.
+cc_library {
+ name: "libplatformprotos-test",
+ defaults: ["libplatformprotos-defaults"],
+ host_supported: false,
+
+ target: {
+ android: {
+ proto: {
+ type: "full",
+ },
+ shared: {
+ enabled: false,
+ },
+ },
+ },
+}
+
+
gensrcs {
name: "gen-platform-proto-constants",
depfile: true,
@@ -818,12 +1113,14 @@
"core/proto/android/os/batterytype.proto",
"core/proto/android/os/cpufreq.proto",
"core/proto/android/os/cpuinfo.proto",
+ "core/proto/android/os/data.proto",
"core/proto/android/os/kernelwake.proto",
"core/proto/android/os/pagetypeinfo.proto",
"core/proto/android/os/procrank.proto",
"core/proto/android/os/ps.proto",
"core/proto/android/os/system_properties.proto",
"core/proto/android/util/event_log_tags.proto",
+ "core/proto/android/util/log.proto",
],
// Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
@@ -839,6 +1136,7 @@
output_extension: "proto.h",
}
+
subdirs = [
"cmds/*",
"core/*",
@@ -854,6 +1152,8 @@
"core/tests/utiltests/jni",
]
+// TODO(b/77285514): remove this once the last few hidl interfaces have been
+// updated to use hwbinder.stubs.
java_library {
name: "hwbinder",
no_framework_libs: true,
@@ -862,7 +1162,10 @@
"core/java/android/os/HidlSupport.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/Nullable.java",
"core/java/android/annotation/SystemApi.java",
+ "core/java/android/annotation/TestApi.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/android/os/HwBinder.java",
"core/java/android/os/HwBlob.java",
"core/java/android/os/HwParcel.java",
@@ -870,6 +1173,7 @@
"core/java/android/os/IHwInterface.java",
"core/java/android/os/DeadObjectException.java",
"core/java/android/os/DeadSystemException.java",
+ "core/java/android/os/NativeHandle.java",
"core/java/android/os/RemoteException.java",
"core/java/android/util/AndroidException.java",
],
@@ -903,3 +1207,633 @@
"fontTools",
],
}
+
+// TODO: Don't rely on this list once droiddoc can take a list of packages to document
+frameworks_base_subdirs = [
+ "core/java",
+ "graphics/java",
+ "location/java",
+ "media/java",
+ "media/mca/effect/java",
+ "media/mca/filterfw/java",
+ "media/mca/filterpacks/java",
+ "drm/java",
+ "opengl/java",
+ "sax/java",
+ "telecomm/java",
+ "telephony/java",
+ "wifi/java",
+ "lowpan/java",
+ "keystore/java",
+ "rs/java",
+]
+
+packages_to_document = [
+ "android",
+ "javax/microedition/khronos",
+ "org/apache/http/conn",
+ "org/apache/http/params",
+]
+
+// Make the api/current.txt file available for use by modules in other
+// directories.
+filegroup {
+ name: "frameworks-base-api-current.txt",
+ srcs: [
+ "api/current.txt",
+ ],
+}
+
+framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
+ "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
+ "-overview $(location core/java/overview.html) " +
+ // Federate Support Library references against local API file.
+ "-federate SupportLib https://developer.android.com " +
+ "-federationapi SupportLib $(location :current-support-api) "
+
+framework_docs_only_libs = [
+ "voip-common",
+ "android.test.mock",
+ "android-support-annotations",
+ "android-support-compat",
+ "android-support-core-ui",
+ "android-support-core-utils",
+ "android-support-customtabs",
+ "android-support-design",
+ "android-support-dynamic-animation",
+ "android-support-exifinterface",
+ "android-support-fragment",
+ "android-support-media-compat",
+ "android-support-percent",
+ "android-support-recommendation",
+ "android-support-transition",
+ "android-support-tv-provider",
+ "android-support-v7-cardview",
+ "android-support-v7-gridlayout",
+ "android-support-v7-mediarouter",
+ "android-support-v7-palette",
+ "android-support-v7-preference",
+ "android-support-v13",
+ "android-support-v14-preference",
+ "android-support-v17-leanback",
+ "android-support-v17-preference-leanback",
+ "android-support-wear",
+ "android-support-vectordrawable",
+ "android-support-animatedvectordrawable",
+ "android-support-v7-appcompat",
+ "android-support-v7-recyclerview",
+ "android-support-emoji",
+ "android-support-emoji-appcompat",
+ "android-support-emoji-bundled",
+ "android-support-v8-renderscript",
+ "android-support-multidex",
+ "android-support-multidex-instrumentation",
+]
+
+metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
+ "--hide-package com.android.okhttp " +
+ "--hide-package com.android.org.conscrypt --hide-package com.android.server " +
+ "--error UnhiddenSystemApi " +
+ "--hide RequiresPermission " +
+ "--hide MissingPermission --hide BroadcastBehavior " +
+ "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
+ "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo"
+
+stubs_defaults {
+ name: "framework-doc-stubs-default",
+ srcs: [
+ "test-base/src/**/*.java",
+ ":opt-telephony-srcs",
+ ":opt-net-voip-srcs",
+ ":core_public_api_files",
+ ":updatable-media-srcs-without-aidls",
+ "test-mock/src/**/*.java",
+ "test-runner/src/**/*.java",
+ ],
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: frameworks_base_subdirs,
+ srcs_lib_whitelist_pkgs: packages_to_document,
+ libs: framework_docs_only_libs,
+ local_sourcepaths: frameworks_base_subdirs,
+ create_doc_stubs: true,
+ annotations_enabled: true,
+ api_levels_annotations_enabled: true,
+ api_levels_annotations_dirs: [
+ "sdk-dir",
+ "api-versions-jars-dir",
+ ],
+ previous_api: ":last-released-public-api",
+ merge_annotations_dirs: [
+ "metalava-manual",
+ "ojluni-annotated-sdk-stubs",
+ ],
+}
+
+doc_defaults {
+ name: "framework-docs-default",
+ libs: framework_docs_only_libs +
+ ["stub-annotations"],
+ html_dirs: [
+ "docs/html",
+ ],
+ knowntags: [
+ "docs/knowntags.txt",
+ ":known-oj-tags",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ resourcesdir: "docs/html/reference/images/",
+ resourcesoutdir: "reference/android/images/",
+ hdf: [
+ "dac true",
+ "sdk.codename O",
+ "sdk.preview.version 1",
+ "sdk.version 7.0",
+ "sdk.rel.id 1",
+ "sdk.preview 0",
+ ],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ ],
+ create_stubs: false,
+}
+
+stubs_defaults {
+ name: "metalava-api-stubs-default",
+ srcs: [
+ ":opt-telephony-srcs",
+ ":opt-net-voip-srcs",
+ ":core_public_api_files",
+ ":updatable-media-srcs-without-aidls",
+ ],
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: frameworks_base_subdirs,
+ srcs_lib_whitelist_pkgs: packages_to_document,
+ libs: [
+ "ext",
+ "framework",
+ "voip-common",
+ ],
+ local_sourcepaths: frameworks_base_subdirs,
+ installable: false,
+ annotations_enabled: true,
+ previous_api: ":last-released-public-api",
+ merge_annotations_dirs: [
+ "metalava-manual",
+ "ojluni-annotated-sdk-stubs",
+ ],
+ api_levels_annotations_enabled: true,
+ api_levels_annotations_dirs: [
+ "sdk-dir",
+ "api-versions-jars-dir",
+ ],
+}
+
+droidstubs {
+ name: "framework-doc-stubs",
+ defaults: ["framework-doc-stubs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args,
+ write_sdk_values: true,
+}
+
+droidstubs {
+ name: "framework-doc-system-stubs",
+ defaults: ["framework-doc-stubs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
+ write_sdk_values: true,
+}
+
+droiddoc {
+ name: "doc-comment-check-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ args: framework_docs_only_args + " -referenceonly -parsecomments",
+ installable: false,
+}
+
+droiddoc {
+ name: "offline-sdk-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-sdk-docs-proofrerad.txt",
+ args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
+ static_doc_index_redirect: "docs/docs-preview-index.html",
+}
+
+droiddoc {
+ // Please sync with android-api-council@ before making any changes for the name property below.
+ // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
+ // See b/116221385 for reference.
+ name: "offline-sdk-referenceonly-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
+ args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
+ static_doc_index_redirect: "docs/docs-documentation-redirect.html",
+ static_doc_properties: "docs/source.properties",
+}
+
+droiddoc {
+ // Please sync with android-api-council@ before making any changes for the name property below.
+ // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
+ // See b/116221385 for reference.
+ name: "offline-system-sdk-referenceonly-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-system-stubs",
+ ],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
+ args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
+ " -offlinemode -title \"Android System SDK\" -referenceonly",
+ static_doc_index_redirect: "docs/docs-documentation-redirect.html",
+ static_doc_properties: "docs/source.properties",
+}
+
+droiddoc {
+ name: "online-sdk-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-sdk-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "online-system-api-sdk-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-system-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -referenceonly " +
+ " -title \"Android SDK - Including system APIs.\" " +
+ " -hide 101 " +
+ " -hide 104 " +
+ " -hide 108 " +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+ installable: false,
+}
+
+droiddoc {
+ name: "ds-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "ds-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "ds-static-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ ],
+ proofread_file: "ds-static-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -staticonly " +
+ " -toroot / " +
+ " -devsite " +
+ " -ignoreJdLinks ",
+}
+
+droiddoc {
+ name: "ds-ref-navtree-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ ],
+ proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -toroot / " +
+ " -atLinksNavtree " +
+ " -navtreeonly ",
+}
+
+droiddoc {
+ name: "online-sdk-dev-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-sdk-dev-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "hidden-docs",
+ defaults: ["framework-docs-default"],
+ srcs: [
+ ":framework-doc-stubs",
+ ],
+ proofread_file: "hidden-docs-proofrerad.txt",
+ args: framework_docs_only_args +
+ " -referenceonly " +
+ " -title \"Android SDK - Including hidden APIs.\"",
+}
+
+droidstubs {
+ name: "hwbinder-stubs-docs",
+ srcs: [
+ "core/java/android/os/HidlSupport.java",
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/SystemApi.java",
+ "core/java/android/os/HwBinder.java",
+ "core/java/android/os/HwBlob.java",
+ "core/java/android/os/HwParcel.java",
+ "core/java/android/os/IHwBinder.java",
+ "core/java/android/os/IHwInterface.java",
+ "core/java/android/os/DeadObjectException.java",
+ "core/java/android/os/DeadSystemException.java",
+ "core/java/android/os/NativeHandle.java",
+ "core/java/android/os/RemoteException.java",
+ "core/java/android/util/AndroidException.java",
+ ],
+ installable: false,
+ no_framework_libs: true,
+ annotations_enabled: true,
+ previous_api: ":last-released-public-api",
+ merge_annotations_dirs: [
+ "metalava-manual",
+ "ojluni-annotated-sdk-stubs",
+ ],
+ args: " --show-annotation android.annotation.SystemApi",
+}
+
+java_library_static {
+ name: "hwbinder.stubs",
+ sdk_version: "core_current",
+ srcs: [
+ ":hwbinder-stubs-docs",
+ ],
+}
+
+droidstubs {
+ name: "hiddenapi-lists-docs",
+ defaults: ["metalava-api-stubs-default"],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ dex_api_filename: "public-dex.txt",
+ private_dex_api_filename: "private-dex.txt",
+ removed_dex_api_filename: "removed-dex.txt",
+ args: metalava_framework_docs_args +
+ " --show-unannotated " +
+ " --show-annotation android.annotation.SystemApi " +
+ " --show-annotation android.annotation.TestApi "
+}
+
+
+droidstubs {
+ name: "hiddenapi-mappings",
+ defaults: ["metalava-api-stubs-default"],
+ srcs: [
+ ":openjdk_java_files",
+ ":non_openjdk_java_files",
+ ":opt-telephony-common-srcs",
+ "core/java/**/*.java",
+ ],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ dex_mapping_filename: "dex-mapping.txt",
+ args: metalava_framework_docs_args +
+ " --hide ReferencesHidden " +
+ " --hide UnhiddenSystemApi " +
+ " --show-unannotated " +
+ " --show-annotation android.annotation.SystemApi " +
+ " --show-annotation android.annotation.TestApi "
+}
+
+filegroup {
+ name: "apache-http-stubs-sources",
+ srcs: [
+ "core/java/org/apache/http/conn/ConnectTimeoutException.java",
+ "core/java/org/apache/http/conn/scheme/HostNameResolver.java",
+ "core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java",
+ "core/java/org/apache/http/conn/scheme/SocketFactory.java",
+ "core/java/org/apache/http/conn/ssl/AbstractVerifier.java",
+ "core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/AndroidDistinguishedNameParser.java",
+ "core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/SSLSocketFactory.java",
+ "core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java",
+ "core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java",
+ "core/java/org/apache/http/params/CoreConnectionPNames.java",
+ "core/java/org/apache/http/params/HttpConnectionParams.java",
+ "core/java/org/apache/http/params/HttpParams.java",
+ "core/java/android/net/http/SslCertificate.java",
+ "core/java/android/net/http/SslError.java",
+ "core/java/com/android/internal/util/HexDump.java",
+ ],
+}
+
+droidstubs {
+ name: "api-stubs-docs",
+ defaults: ["metalava-api-stubs-default"],
+ api_filename: "public_api.txt",
+ private_api_filename: "private.txt",
+ removed_api_filename: "removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args,
+ check_api: {
+ current: {
+ api_file: "api/current.txt",
+ removed_api_file: "api/removed.txt",
+ },
+ last_released: {
+ api_file: ":last-released-public-api",
+ removed_api_file: "api/removed.txt",
+ baseline_file: ":public-api-incompatibilities-with-last-released",
+ },
+ },
+ jdiff_enabled: true,
+}
+
+droidstubs {
+ name: "system-api-stubs-docs",
+ defaults: ["metalava-api-stubs-default"],
+ api_tag_name: "SYSTEM",
+ api_filename: "system-api.txt",
+ private_api_filename: "system-private.txt",
+ private_dex_api_filename: "system-private-dex.txt",
+ removed_api_filename: "system-removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
+ check_api: {
+ current: {
+ api_file: "api/system-current.txt",
+ removed_api_file: "api/system-removed.txt",
+ },
+ last_released: {
+ api_file: ":last-released-system-api",
+ removed_api_file: "api/system-removed.txt",
+ baseline_file: ":system-api-incompatibilities-with-last-released"
+ },
+ },
+ jdiff_enabled: true,
+}
+
+droidstubs {
+ name: "test-api-stubs-docs",
+ defaults: ["metalava-api-stubs-default"],
+ api_tag_name: "TEST",
+ api_filename: "test-api.txt",
+ removed_api_filename: "test-removed.txt",
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ],
+ args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
+ check_api: {
+ current: {
+ api_file: "api/test-current.txt",
+ removed_api_file: "api/test-removed.txt",
+ },
+ },
+}
+
+filegroup {
+ name: "framework-annotation-nonnull-srcs",
+ srcs: [
+ "core/java/android/annotation/NonNull.java",
+ ],
+}
+
+filegroup {
+ name: "framework-media-annotation-srcs",
+ srcs: [
+ "core/java/android/annotation/CallbackExecutor.java",
+ "core/java/android/annotation/CallSuper.java",
+ "core/java/android/annotation/DrawableRes.java",
+ "core/java/android/annotation/IntDef.java",
+ "core/java/android/annotation/LongDef.java",
+ "core/java/android/annotation/NonNull.java",
+ "core/java/android/annotation/Nullable.java",
+ "core/java/android/annotation/RequiresPermission.java",
+ "core/java/android/annotation/SdkConstant.java",
+ "core/java/android/annotation/StringDef.java",
+ "core/java/android/annotation/SystemApi.java",
+ "core/java/android/annotation/TestApi.java",
+ "core/java/android/annotation/UnsupportedAppUsage.java",
+ "core/java/com/android/internal/annotations/GuardedBy.java",
+ ],
+}
+
+// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
+// annotations to private apis
+aidl_mapping {
+ name: "framework-aidl-mappings",
+ srcs: [":framework-defaults"],
+ output: "framework-aidl-mappings.txt"
+}
diff --git a/Android.mk b/Android.mk
index bdad6c3..815a169 100644
--- a/Android.mk
+++ b/Android.mk
@@ -32,1079 +32,54 @@
# ============================================================
include $(CLEAR_VARS)
-aidl_parcelables :=
-define stubs-to-aidl-parcelables
- gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
- aidl_parcelables += $$(gen)
- $$(gen): $(call java-lib-header-files,$1) $(HOST_OUT_EXECUTABLES)/sdkparcelables
- @echo Extract SDK parcelables: $$@
- rm -f $$@
- $(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
-endef
-
-$(foreach stubs,android_stubs_current android_test_stubs_current android_system_stubs_current,\
- $(eval $(call stubs-to-aidl-parcelables,$(stubs))))
-
-gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
-.KATI_RESTAT: $(gen)
-$(gen): $(aidl_parcelables)
- @echo Combining SDK parcelables: $@
- rm -f $@.tmp
- cat $^ | sort -u > $@.tmp
- $(call commit-change-for-toc,$@)
-
-# the documentation
-# ============================================================
-
-# TODO: deal with com/google/android/googleapps
-packages_to_document := \
- android \
- javax/microedition/khronos \
- org/apache/http/conn \
- org/apache/http/params \
-
-# include definition of libcore_to_document
-include libcore/Docs.mk
-
-non_base_dirs := \
- ../opt/telephony/src/java/android/telephony \
- ../opt/telephony/src/java/android/telephony/gsm \
- ../opt/net/voip/src/java/android/net/rtp \
- ../opt/net/voip/src/java/android/net/sip \
-
-# Find all files in specific directories (relative to frameworks/base)
-# to document and check apis
-files_to_check_apis := \
- $(call find-other-java-files, \
- $(non_base_dirs) \
- )
-
-# Find all files in specific packages that were used to compile
-# framework.jar to document and check apis
-files_to_check_apis += \
- $(addprefix ../../,\
- $(filter \
- $(foreach dir,$(FRAMEWORKS_BASE_JAVA_SRC_DIRS),\
- $(foreach package,$(packages_to_document),\
- $(dir)/$(package)/%.java)),\
- $(SOONG_FRAMEWORK_SRCS)))
-
-# Find all generated files that were used to compile framework.jar
-files_to_check_apis_generated := \
- $(filter $(OUT_DIR)/%,\
- $(SOONG_FRAMEWORK_SRCS))
-
-# These are relative to frameworks/base
-# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
-files_to_document := \
- $(files_to_check_apis) \
- $(call find-other-java-files,\
- test-base/src \
- test-mock/src \
- test-runner/src)
-
-# These are relative to frameworks/base
-html_dirs := \
- $(FRAMEWORKS_BASE_SUBDIRS) \
- $(non_base_dirs) \
-
-# Common sources for doc check and api check
-common_src_files := \
- $(call find-other-html-files, $(html_dirs)) \
- $(addprefix ../../, $(libcore_to_document)) \
-
-# These are relative to frameworks/base
-framework_docs_LOCAL_SRC_FILES := \
- $(files_to_document) \
- $(common_src_files) \
-
-# These are relative to frameworks/base
-framework_docs_LOCAL_API_CHECK_SRC_FILES := \
- $(files_to_check_apis) \
- $(common_src_files) \
-
# This is used by ide.mk as the list of source files that are
# always included.
INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
-framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
- $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
-
-framework_docs_LOCAL_SRCJARS := $(SOONG_FRAMEWORK_SRCJARS)
-
-framework_docs_LOCAL_GENERATED_SOURCES := \
- $(libcore_to_document_generated) \
- $(files_to_check_apis_generated) \
-
-framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \
- core-oj \
- core-libart \
- conscrypt \
- bouncycastle \
- okhttp \
- ext \
- framework \
- voip-common \
-
-# Platform docs can refer to Support Library APIs, but we don't actually build
-# them as part of the docs target, so we need to include them on the classpath.
-framework_docs_LOCAL_JAVA_LIBRARIES := \
- $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \
- $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES)
-
-framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
-# The since flag (-since N.xml API_LEVEL) is used to add API Level information
-# to the reference documentation. Must be in order of oldest to newest.
-#
-# Conscrypt (com.android.org.conscrypt) is an implementation detail and should
-# not be referenced in the documentation.
-framework_docs_LOCAL_DROIDDOC_OPTIONS := \
- -android \
- -knowntags ./frameworks/base/docs/knowntags.txt \
- -knowntags ./libcore/known_oj_tags.txt \
- -manifest ./frameworks/base/core/res/AndroidManifest.xml \
- -hidePackage com.android.internal \
- -hidePackage com.android.internal.util \
- -hidePackage com.android.okhttp \
- -hidePackage com.android.org.conscrypt \
- -hidePackage com.android.server \
- -since $(SRC_API_DIR)/1.xml 1 \
- -since $(SRC_API_DIR)/2.xml 2 \
- -since $(SRC_API_DIR)/3.xml 3 \
- -since $(SRC_API_DIR)/4.xml 4 \
- -since $(SRC_API_DIR)/5.xml 5 \
- -since $(SRC_API_DIR)/6.xml 6 \
- -since $(SRC_API_DIR)/7.xml 7 \
- -since $(SRC_API_DIR)/8.xml 8 \
- -since $(SRC_API_DIR)/9.xml 9 \
- -since $(SRC_API_DIR)/10.xml 10 \
- -since $(SRC_API_DIR)/11.xml 11 \
- -since $(SRC_API_DIR)/12.xml 12 \
- -since $(SRC_API_DIR)/13.xml 13 \
- -since $(SRC_API_DIR)/14.txt 14 \
- -since $(SRC_API_DIR)/15.txt 15 \
- -since $(SRC_API_DIR)/16.txt 16 \
- -since $(SRC_API_DIR)/17.txt 17 \
- -since $(SRC_API_DIR)/18.txt 18 \
- -since $(SRC_API_DIR)/19.txt 19 \
- -since $(SRC_API_DIR)/20.txt 20 \
- -since $(SRC_API_DIR)/21.txt 21 \
- -since $(SRC_API_DIR)/22.txt 22 \
- -since $(SRC_API_DIR)/23.txt 23 \
- -since $(SRC_API_DIR)/24.txt 24 \
- -since $(SRC_API_DIR)/25.txt 25 \
- -since $(SRC_API_DIR)/26.txt 26 \
- -since $(SRC_API_DIR)/27.txt 27 \
- -since $(SRC_API_DIR)/28.txt 28 \
- -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \
- -overview $(LOCAL_PATH)/core/java/overview.html \
-
-framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \
- $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
-
-framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \
- $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-
-framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
- frameworks/base/docs/knowntags.txt \
- $(libcore_to_document_generated)
-
-samples_dir := development/samples/browseable
-
-# Whitelist of valid groups, used for default TOC grouping. Each sample must
-# belong to one (and only one) group. Assign samples to groups by setting
-# a sample.group var to one of these groups in the sample's _index.jd.
-sample_groups := -samplegroup Admin \
- -samplegroup Background \
- -samplegroup Connectivity \
- -samplegroup Content \
- -samplegroup Input \
- -samplegroup Media \
- -samplegroup Notification \
- -samplegroup RenderScript \
- -samplegroup Security \
- -samplegroup Sensors \
- -samplegroup System \
- -samplegroup Testing \
- -samplegroup UI \
- -samplegroup Views \
- -samplegroup Wearable
-
-## SDK version identifiers used in the published docs
- # major[.minor] version for current SDK. (full releases only)
-framework_docs_SDK_VERSION:=7.0
- # release version (ie "Release x") (full releases only)
-framework_docs_SDK_REL_ID:=1
-
-framework_docs_LOCAL_DROIDDOC_OPTIONS += \
- -hdf dac true \
- -hdf sdk.codename O \
- -hdf sdk.preview.version 1 \
- -hdf sdk.version $(framework_docs_SDK_VERSION) \
- -hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
- -hdf sdk.preview 0 \
- -resourcesdir $(LOCAL_PATH)/docs/html/reference/images/ \
- -resourcesoutdir reference/android/images/
-
-# Federate Support Library references against local API file.
-framework_docs_LOCAL_DROIDDOC_OPTIONS += \
- -federate SupportLib https://developer.android.com \
- -federationapi SupportLib prebuilts/sdk/current/support-api.txt
-
-# Federate AndroidX references against local API file.
-framework_docs_LOCAL_DROIDDOC_OPTIONS += \
- -federate AndroidX https://developer.android.com \
- -federationapi AndroidX prebuilts/sdk/current/androidx-api.txt
-
-framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS := \
- --manifest ./frameworks/base/core/res/AndroidManifest.xml \
- --hide-package com.android.okhttp \
- --hide-package com.android.org.conscrypt --hide-package com.android.server \
- --hide RequiresPermission \
- --hide MissingPermission --hide BroadcastBehavior \
- --hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol \
- --hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo \
- --include-annotation-classes tools/metalava/stub-annotations \
-
-# ==== Public API diff ===========================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES := \
- $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
- $(INTERNAL_PLATFORM_API_FILE)
-
-LOCAL_MODULE := offline-sdk-referenceonly
-
-last_released_sdk_version := $(lastword $(call numerically_sort, \
- $(filter-out current, \
- $(patsubst $(SRC_API_DIR)/%.txt,%, $(wildcard $(SRC_API_DIR)/*.txt)) \
- )\
- ))
-
-LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_API_DIR)/$(last_released_sdk_version)
-LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_API_FILE))
-
-include $(BUILD_APIDIFF)
-
-# Hack to get diffs included in docs output
-out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
-$(out_zip): $(full_target)
-
-# ==== System API diff ===========================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES := $(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES := $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS := $(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_ADDITIONAL_JAVA_DIR := $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES := \
- $(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) \
- $(INTERNAL_PLATFORM_SYSTEM_API_FILE)
-
-LOCAL_MODULE := offline-system-sdk-referenceonly
-
-last_released_sdk_version := $(lastword $(call numerically_sort, \
- $(filter-out current, \
- $(patsubst $(SRC_SYSTEM_API_DIR)/%.txt,%, $(wildcard $(SRC_SYSTEM_API_DIR)/*.txt)) \
- )\
- ))
-
-LOCAL_APIDIFF_OLDAPI := $(LOCAL_PATH)/../../$(SRC_SYSTEM_API_DIR)/$(last_released_sdk_version)
-LOCAL_APIDIFF_NEWAPI := $(LOCAL_PATH)/../../$(basename $(INTERNAL_PLATFORM_SYSTEM_API_FILE))
-
-include $(BUILD_APIDIFF)
-
-# Hack to get diffs included in docs output
-out_zip := $(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip
-$(out_zip): $(full_target)
-
-# ==== the api stubs and current.xml ===========================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -api $(INTERNAL_PLATFORM_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_REMOVED_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_API_FILE) \
- $(INTERNAL_PLATFORM_REMOVED_API_FILE)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
-
-# ==== the metalava api stubs and current.xml ===========================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := metalava-api-stubs
-LOCAL_DROIDDOC_USE_METALAVA := true
-LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
-LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
-LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_stubs_current_intermediates/src
-
-INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava_public_api.txt
-INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava_removed.txt
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
- --api $(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE) \
- --removed-api $(INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE) \
- -nodocs
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE) \
- $(INTERNAL_PLATFORM_METALAVA_PUBLIC_REMOVED_API_FILE)
-$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_PUBLIC_API_FILE))
-
-# ==== the system api stubs ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := system-api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -showAnnotation android.annotation.SystemApi \
- -api $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
- -exactApi $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_SYSTEM_API_FILE) \
- $(INTERNAL_PLATFORM_SYSTEM_REMOVED_API_FILE) \
- $(INTERNAL_PLATFORM_SYSTEM_EXACT_API_FILE)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
-
-# ==== the metalava system api stubs ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := metalava-system-api-stubs
-LOCAL_DROIDDOC_USE_METALAVA := true
-LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
-LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
-LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_system_stubs_current_intermediates/src
-
-INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-system-api.txt
-INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-system-removed.txt
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
- --show-annotation android.annotation.SystemApi \
- --api $(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE) \
- --removed-api $(INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE) \
- -nodocs
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE) \
- $(INTERNAL_PLATFORM_METALAVA_SYSTEM_REMOVED_API_FILE) \
-$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_SYSTEM_API_FILE))
-
-# ==== the test api stubs ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := test-api-stubs
-
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_test_stubs_current_intermediates/src \
- -showAnnotation android.annotation.TestApi \
- -api $(INTERNAL_PLATFORM_TEST_API_FILE) \
- -removedApi $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
- -exactApi $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_TEST_API_FILE) \
- $(INTERNAL_PLATFORM_TEST_REMOVED_API_FILE) \
- $(INTERNAL_PLATFORM_TEST_EXACT_API_FILE)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
+$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE):apistubs/android/public/api/android.txt)
+$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE):apistubs/android/system/api/android.txt)
+$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE):apistubs/android/test/api/android.txt)
-# ==== the metalava test api stubs ===================================
-include $(CLEAR_VARS)
+# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip.
+# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to
+# $(OUT_DOCS)/offline-sdk.
+$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip
+ $(hide) rm -rf $(OUT_DOCS)/offline-sdk
+ $(hide) mkdir -p $(OUT_DOCS)/offline-sdk
+ ( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+.PHONY: docs offline-sdk-docs
+docs offline-sdk-docs: $(OUT_DOCS)/offline-sdk-timestamp
-LOCAL_MODULE := metalava-test-api-stubs
-LOCAL_DROIDDOC_USE_METALAVA := true
-LOCAL_DROIDDOC_METALAVA_PREVIOUS_API := prebuilts/sdk/api/27.txt
-LOCAL_DROIDDOC_METALAVA_ANNOTATIONS_ENABLED := true
-LOCAL_DROIDDOC_METALAVA_MERGE_ANNOTATIONS_DIR := tools/metalava/manual
+SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)
+SDK_METADATA_FILES :=$= $(addprefix $(SDK_METADATA_DIR)/,\
+ activity_actions.txt \
+ broadcast_actions.txt \
+ categories.txt \
+ features.txt \
+ service_actions.txt \
+ widgets.txt)
+SDK_METADATA :=$= $(firstword $(SDK_METADATA_FILES))
+$(SDK_METADATA): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(SDK_METADATA),$(SDK_METADATA_FILES))
+$(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip
+ rm -rf $(SDK_METADATA_DIR)
+ mkdir -p $(SDK_METADATA_DIR)
+ unzip -qo $< -d $(SDK_METADATA_DIR)
-LOCAL_DROIDDOC_STUB_OUT_DIR := $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/metalava_android_test_stubs_current_intermediates/src
-
-INTERNAL_PLATFORM_METALAVA_TEST_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-test-api.txt
-INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/metalava-test-removed.txt
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_metalava_docs_LOCAL_DROIDDOC_OPTIONS) \
- --show-annotation android.annotation.TestApi \
- --api $(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE) \
- --removed-api $(INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE) \
- -nodocs
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE) \
- $(INTERNAL_PLATFORM_METALAVA_TEST_REMOVED_API_FILE) \
-$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_METALAVA_TEST_API_FILE))
-
-# ==== the complete hidden api list ===================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := hidden-api-list
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -showUnannotated \
- -showAnnotation android.annotation.SystemApi \
- -showAnnotation android.annotation.TestApi \
- -dexApi $(INTERNAL_PLATFORM_DEX_API_FILE) \
- -privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
- -removedDexApi $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE) \
- -nodocs
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_DEX_API_FILE) \
- $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
- $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
-
-# ==== check javadoc comments but don't generate docs ========
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := doc-comment-check
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -parsecomments
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
+.PHONY: framework-doc-stubs
+framework-doc-stubs: $(SDK_METADATA)
# Run this for checkbuild
checkbuild: doc-comment-check-docs
-# Check comment when you are updating the API
-update-api: doc-comment-check-docs
-
-# ==== static html in the sdk ==================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := offline-sdk
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -offlinemode \
- -title "Android SDK" \
- -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
- -sdkvalues $(OUT_DOCS) \
- -hdf android.whichdoc offline
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-static_doc_index_redirect := $(out_dir)/index.html
-$(static_doc_index_redirect): \
- $(LOCAL_PATH)/docs/docs-preview-index.html | $(ACP)
- $(hide) mkdir -p $(dir $@)
- $(hide) $(ACP) $< $@
-
-$(full_target): $(static_doc_index_redirect)
-
-
-# ==== Public API static reference docs ==================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := offline-sdk-referenceonly
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -offlinemode \
- -title "Android SDK" \
- -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
- -sdkvalues $(OUT_DOCS) \
- -hdf android.whichdoc offline \
- -referenceonly
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-static_doc_index_redirect := $(out_dir)/index.html
-$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
- $(copy-file-to-target)
-
-static_doc_properties := $(out_dir)/source.properties
-$(static_doc_properties): \
- $(LOCAL_PATH)/docs/source.properties | $(ACP)
- $(hide) mkdir -p $(dir $@)
- $(hide) $(ACP) $< $@
-
-$(full_target): $(static_doc_index_redirect)
-$(full_target): $(static_doc_properties)
-
-
-# ==== System API static reference docs ==================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := offline-system-sdk-referenceonly
-
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -hide 101 -hide 104 -hide 108 \
- -showAnnotation android.annotation.SystemApi \
- -offlinemode \
- -title "Android System SDK" \
- -proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
- -sdkvalues $(OUT_DOCS) \
- -hdf android.whichdoc offline \
- -referenceonly
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-static_doc_index_redirect := $(out_dir)/index.html
-$(static_doc_index_redirect): $(LOCAL_PATH)/docs/docs-documentation-redirect.html
- $(copy-file-to-target)
-
-static_doc_properties := $(out_dir)/source.properties
-$(static_doc_properties): \
- $(LOCAL_PATH)/docs/source.properties | $(ACP)
- $(hide) mkdir -p $(dir $@)
- $(hide) $(ACP) $< $@
-
-$(full_target): $(static_doc_index_redirect)
-$(full_target): $(static_doc_properties)
-$(full_target): $(framework_built)
-
-
-# ==== docs for the web (on the androiddevdocs app engine server) =======================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
-
-LOCAL_MODULE := online-sdk
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -toroot / \
- -hdf android.whichdoc online \
- $(sample_groups) \
- -hdf android.hasSamples true \
- -samplesdir $(samples_dir)
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== docs for the web (on the androiddevdocs app engine server) =======================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
-
-LOCAL_MODULE := online-system-api-sdk
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -showAnnotation android.annotation.SystemApi \
- -title "Android SDK - Including system APIs." \
- -toroot / \
- -hide 101 \
- -hide 104 \
- -hide 108 \
- -hdf android.whichdoc online \
- $(sample_groups) \
- -hdf android.hasSamples true \
- -samplesdir $(samples_dir)
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_DROIDDOC)
-
-# ==== docs for the web (on the devsite app engine server) =======================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-# specify a second html input dir and an output path relative to OUT_DIR)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
-
-LOCAL_MODULE := ds
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -toroot / \
- -hdf android.whichdoc online \
- -devsite \
- -yamlV2 \
- $(sample_groups) \
- -hdf android.hasSamples true \
- -samplesdir $(samples_dir)
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== docs for the web (on the devsite app engine server) =======================
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-# specify a second html input dir and an output path relative to OUT_DIR)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
-
-LOCAL_MODULE := ds-static
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -hdf android.whichdoc online \
- -staticonly \
- -toroot / \
- -devsite \
- -ignoreJdLinks
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== generates full navtree for resolving @links in ds postprocessing ====
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := ds-ref-navtree
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -hdf android.whichdoc online \
- -toroot / \
- -atLinksNavtree \
- -navtreeonly
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== site updates for docs (on the androiddevdocs app engine server) =======================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
-
-LOCAL_MODULE := online-sdk-dev
-
-LOCAL_DROIDDOC_OPTIONS:= \
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -toroot / \
- -hdf android.whichdoc online \
- $(sample_groups) \
- -hdf android.hasSamples true \
- -samplesdir $(samples_dir)
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== docs that have all of the stuff that's @hidden =======================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
-LOCAL_GENERATED_SOURCES:=$(framework_docs_LOCAL_GENERATED_SOURCES)
-LOCAL_SRCJARS:=$(framework_docs_LOCAL_SRCJARS)
-LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
-LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
-LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
-LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
-LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
-LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-
-LOCAL_MODULE := hidden
-LOCAL_DROIDDOC_OPTIONS:=\
- $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
- -referenceonly \
- -title "Android SDK - Including hidden APIs."
-# -hidden
-
-LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
-
-include $(BUILD_DROIDDOC)
-
-# ==== java proto host library ==============================
-include $(CLEAR_VARS)
-LOCAL_MODULE := platformprotos
-LOCAL_PROTOC_OPTIMIZE_TYPE := full
-LOCAL_PROTOC_FLAGS := \
- -Iexternal/protobuf/src
-LOCAL_SOURCE_FILES_ALL_GENERATED := true
-LOCAL_SRC_FILES := \
- cmds/am/proto/instrumentation_data.proto \
- cmds/statsd/src/perfetto/perfetto_config.proto \
- $(call all-proto-files-under, core/proto) \
- $(call all-proto-files-under, libs/incident/proto) \
- $(call all-proto-files-under, cmds/statsd/src)
-# b/72714520
-LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-# ==== java proto device library (for test only) ==============================
-include $(CLEAR_VARS)
-LOCAL_MODULE := platformprotosnano
-LOCAL_MODULE_TAGS := tests
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-LOCAL_PROTOC_FLAGS := \
- -Iexternal/protobuf/src
-LOCAL_PROTO_JAVA_OUTPUT_PARAMS := \
- store_unknown_fields = true
-LOCAL_SDK_VERSION := current
-LOCAL_SRC_FILES := \
- $(call all-proto-files-under, core/proto) \
- $(call all-proto-files-under, libs/incident/proto/android/os)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-# ==== java proto device library (for test only) ==============================
-include $(CLEAR_VARS)
-LOCAL_MODULE := platformprotoslite
-LOCAL_MODULE_TAGS := tests
-LOCAL_PROTOC_OPTIMIZE_TYPE := lite
-LOCAL_PROTOC_FLAGS := \
- -Iexternal/protobuf/src
-LOCAL_SRC_FILES := \
- $(call all-proto-files-under, core/proto) \
- $(call all-proto-files-under, libs/incident/proto/android/os)
-# Protos have lots of MissingOverride and similar.
-LOCAL_ERROR_PRONE_FLAGS := -XepDisableAllChecks
-include $(BUILD_STATIC_JAVA_LIBRARY)
# ==== hiddenapi lists =======================================
-include $(CLEAR_VARS)
-
-# File names of final API lists
-LOCAL_LIGHT_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)
-LOCAL_DARK_GREYLIST := $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST)
-LOCAL_BLACKLIST := $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)
-
-# File names of source files we will use to generate the final API lists.
-LOCAL_SRC_GREYLIST := frameworks/base/config/hiddenapi-light-greylist.txt
-LOCAL_SRC_VENDOR_LIST := frameworks/base/config/hiddenapi-vendor-list.txt
-LOCAL_SRC_FORCE_BLACKLIST := frameworks/base/config/hiddenapi-force-blacklist.txt
-LOCAL_SRC_PUBLIC_API := frameworks/base/config/hiddenapi-public-dex.txt
-LOCAL_SRC_PRIVATE_API := frameworks/base/config/hiddenapi-private-dex.txt
-LOCAL_SRC_REMOVED_API := frameworks/base/config/hiddenapi-removed-dex.txt
-
-LOCAL_SRC_ALL := \
- $(LOCAL_SRC_GREYLIST) \
- $(LOCAL_SRC_VENDOR_LIST) \
- $(LOCAL_SRC_FORCE_BLACKLIST) \
- $(LOCAL_SRC_PUBLIC_API) \
- $(LOCAL_SRC_PRIVATE_API) \
- $(LOCAL_SRC_REMOVED_API)
-
-define assert-has-no-overlap
-if [ ! -z "`comm -12 <(sort $(1)) <(sort $(2))`" ]; then \
- echo "$(1) and $(2) should not overlap" 1>&2; \
- comm -12 <(sort $(1)) <(sort $(2)) 1>&2; \
- exit 1; \
-fi
-endef
-
-define assert-is-subset
-if [ ! -z "`comm -23 <(sort $(1)) <(sort $(2))`" ]; then \
- echo "$(1) must be a subset of $(2)" 1>&2; \
- comm -23 <(sort $(1)) <(sort $(2)) 1>&2; \
- exit 1; \
-fi
-endef
-
-define assert-has-no-duplicates
-if [ ! -z "`sort $(1) | uniq -D`" ]; then \
- echo "$(1) has duplicate entries" 1>&2; \
- sort $(1) | uniq -D 1>&2; \
- exit 1; \
-fi
-endef
-
-# The following rules build API lists in the build folder.
-# By not using files from the source tree, ART buildbots can mock these lists
-# or have alternative rules for building them. Other rules in the build system
-# should depend on the files in the build folder.
-
-# Merge light greylist from multiple files:
-# (1) manual greylist LOCAL_SRC_GREYLIST
-# (2) list of usages from vendor apps LOCAL_SRC_VENDOR_LIST
-# (3) list of removed APIs in LOCAL_SRC_REMOVED_API
-# @removed does not imply private in Doclava. We must take the subset also
-# in LOCAL_SRC_PRIVATE_API.
-# (4) list of serialization APIs
-# Automatically adds all methods which match the signatures in
-# REGEX_SERIALIZATION. These are greylisted in order to allow applications
-# to write their own serializers.
-$(LOCAL_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
- "readObject\(Ljava/io/ObjectInputStream;\)V" \
- "readObjectNoData\(\)V" \
- "readResolve\(\)Ljava/lang/Object;" \
- "serialVersionUID:J" \
- "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
- "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
- "writeReplace\(\)Ljava/lang/Object;"
-$(LOCAL_LIGHT_GREYLIST): $(LOCAL_SRC_ALL)
- sort $(LOCAL_SRC_GREYLIST) $(LOCAL_SRC_VENDOR_LIST) \
- <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" \
- $(LOCAL_SRC_PRIVATE_API)) \
- <(comm -12 <(sort $(LOCAL_SRC_REMOVED_API)) <(sort $(LOCAL_SRC_PRIVATE_API))) \
- > $@
- $(call assert-has-no-duplicates,$@)
- $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
- $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
-
-# Generate dark greylist as remaining classes and class members in the same
-# package as classes listed in the light greylist.
-# The algorithm is as follows:
-# (1) extract the class descriptor from each entry in LOCAL_LIGHT_GREYLIST
-# (2) strip everything after the last forward-slash,
-# e.g. 'Lpackage/subpackage/class$inner;' turns into 'Lpackage/subpackage/'
-# (3) insert all entries from LOCAL_SRC_PRIVATE_API which begin with the package
-# name but do not contain another forward-slash in the class name, e.g.
-# matching '^Lpackage/subpackage/[^/;]*;'
-# (4) subtract entries shared with LOCAL_LIGHT_GREYLIST
-$(LOCAL_DARK_GREYLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST)
- comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_SRC_FORCE_BLACKLIST)) \
- <(cat $(LOCAL_SRC_PUBLIC_API) $(LOCAL_LIGHT_GREYLIST) | \
- sed 's/\->.*//' | sed 's/\(.*\/\).*/\1/' | sort | uniq | \
- while read PKG_NAME; do \
- grep -E "^$${PKG_NAME}[^/;]*;" $(LOCAL_SRC_PRIVATE_API); \
- done | sort | uniq) \
- > $@
- $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
- $(call assert-has-no-duplicates,$@)
- $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
- $(call assert-has-no-overlap,$@,$(LOCAL_SRC_FORCE_BLACKLIST))
-
-# Generate blacklist as private API minus (light greylist plus dark greylist).
-$(LOCAL_BLACKLIST): $(LOCAL_SRC_ALL) $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)
- comm -13 <(sort $(LOCAL_LIGHT_GREYLIST) $(LOCAL_DARK_GREYLIST)) \
- <(sort $(LOCAL_SRC_PRIVATE_API)) \
- > $@
- $(call assert-is-subset,$@,$(LOCAL_SRC_PRIVATE_API))
- $(call assert-has-no-duplicates,$@)
- $(call assert-has-no-overlap,$@,$(LOCAL_LIGHT_GREYLIST))
- $(call assert-has-no-overlap,$@,$(LOCAL_DARK_GREYLIST))
- $(call assert-is-subset,$(LOCAL_SRC_FORCE_BLACKLIST),$@)
+ifneq ($(UNSAFE_DISABLE_HIDDENAPI_FLAGS),true)
+$(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
+$(call dist-for-goals,droidcore,$(INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA))
+endif # UNSAFE_DISABLE_HIDDENAPI_FLAGS
# Include subdirectory makefiles
# ============================================================
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 2e949c5..f311fc8 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -244,6 +244,15 @@
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/core/java/android/os/storage/*)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/JAVA_LIBRARIES/platformprotos_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/statsdprotolite_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.mediadrm.signer.jar)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.location.provider.jar)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.future.usb.accessory.jar)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.media.remotedisplay.jar)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/SystemUI)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/DynamicAndroidInstallationService)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/DefaultContainerService)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/CaptivePortalLogin)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index de4e7bd..e731138 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,15 +1,16 @@
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
- -fw core/java/android/
- graphics/java/android
- core/tests/coretests/src/android/
- packages/PrintRecommendationService/
- packages/PrintSpooler/
- services/print/
- services/usb/
api_lint_hook = ${REPO_ROOT}/frameworks/base/tools/apilint/apilint_sha.sh ${PREUPLOAD_COMMIT}
strings_lint_hook = ${REPO_ROOT}/frameworks/base/tools/stringslint/stringslint_sha.sh ${PREUPLOAD_COMMIT}
-hidden_api_txt_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
+hidden_api_txt_checksorted_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
+
+hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
+
+ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES}
+
+owners_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "OWNERS$"
+
+shell_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "^packages/Shell/"
diff --git a/apct-tests/perftests/autofill/Android.bp b/apct-tests/perftests/autofill/Android.bp
new file mode 100644
index 0000000..65c28fb
--- /dev/null
+++ b/apct-tests/perftests/autofill/Android.bp
@@ -0,0 +1,26 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "AutofillPerfTests",
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ static_libs: [
+ "androidx.test.rules",
+ "androidx.annotation_annotation",
+ "apct-perftests-utils",
+ ],
+ platform_apis: true,
+ test_suites: ["device-tests"],
+}
diff --git a/apct-tests/perftests/autofill/AndroidManifest.xml b/apct-tests/perftests/autofill/AndroidManifest.xml
new file mode 100644
index 0000000..9c8abc3
--- /dev/null
+++ b/apct-tests/perftests/autofill/AndroidManifest.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.perftests.autofill">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ <activity android:name="android.perftests.utils.StubActivity">
+ <intent-filter>
+ <action android:name="com.android.perftests.core.PERFTEST" />
+ </intent-filter>
+ </activity>
+
+ <service
+ android:name="android.view.autofill.MyAutofillService"
+ android:label="PERF AutofillService"
+ android:permission="android.permission.BIND_AUTOFILL_SERVICE" >
+ <intent-filter>
+ <action android:name="android.service.autofill.AutofillService" />
+ </intent-filter>
+ </service>
+
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.perftests.autofill"/>
+</manifest>
diff --git a/apct-tests/perftests/autofill/AndroidTest.xml b/apct-tests/perftests/autofill/AndroidTest.xml
new file mode 100644
index 0000000..29f9f94
--- /dev/null
+++ b/apct-tests/perftests/autofill/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs AutofillPerfTests metric instrumentation.">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-metric-instrumentation" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="AutofillPerfTests.apk" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="com.android.perftests.autofill" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
diff --git a/apct-tests/perftests/autofill/res/layout/autofill_dataset_picker_text_only.xml b/apct-tests/perftests/autofill/res/layout/autofill_dataset_picker_text_only.xml
new file mode 100644
index 0000000..5e6b277
--- /dev/null
+++ b/apct-tests/perftests/autofill/res/layout/autofill_dataset_picker_text_only.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/apct-tests/perftests/autofill/res/layout/test_autofill_login.xml b/apct-tests/perftests/autofill/res/layout/test_autofill_login.xml
new file mode 100644
index 0000000..b35bdf1
--- /dev/null
+++ b/apct-tests/perftests/autofill/res/layout/test_autofill_login.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:id="@+id/username_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/username_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Username" />
+
+ <EditText
+ android:id="@+id/username"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:imeOptions="flagNoFullscreen" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/password_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Password" />
+
+ <EditText
+ android:id="@+id/password"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textPassword"
+ android:imeOptions="flagNoFullscreen" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/login"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Login" />
+
+ <Button
+ android:id="@+id/cancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Cancel" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/output"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/apct-tests/perftests/autofill/src/android/view/autofill/AbstractAutofillPerfTestCase.java b/apct-tests/perftests/autofill/src/android/view/autofill/AbstractAutofillPerfTestCase.java
new file mode 100644
index 0000000..6979f0f
--- /dev/null
+++ b/apct-tests/perftests/autofill/src/android/view/autofill/AbstractAutofillPerfTestCase.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.view.autofill;
+
+import static org.junit.Assert.assertTrue;
+
+import android.os.Looper;
+import android.perftests.utils.PerfStatusReporter;
+import android.perftests.utils.SettingsHelper;
+import android.perftests.utils.SettingsStateKeeperRule;
+import android.perftests.utils.StubActivity;
+import android.provider.Settings;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+
+/**
+ * Base class for all autofill tests.
+ */
+@LargeTest
+public abstract class AbstractAutofillPerfTestCase {
+
+ @ClassRule
+ public static final SettingsStateKeeperRule mServiceSettingsKeeper =
+ new SettingsStateKeeperRule(InstrumentationRegistry.getTargetContext(),
+ Settings.Secure.AUTOFILL_SERVICE);
+
+ @Rule
+ public ActivityTestRule<StubActivity> mActivityRule =
+ new ActivityTestRule<StubActivity>(StubActivity.class);
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private final int mLayoutId;
+
+ protected AbstractAutofillPerfTestCase(int layoutId) {
+ mLayoutId = layoutId;
+ }
+
+ /**
+ * Prepares the activity so that by the time the test is run it has reference to its fields.
+ */
+ @Before
+ public void prepareActivity() throws Throwable {
+ mActivityRule.runOnUiThread(() -> {
+ assertTrue("We should be running on the main thread",
+ Looper.getMainLooper().getThread() == Thread.currentThread());
+ assertTrue("We should be running on the main thread",
+ Looper.myLooper() == Looper.getMainLooper());
+ StubActivity activity = mActivityRule.getActivity();
+ activity.setContentView(mLayoutId);
+ onCreate(activity);
+ });
+ }
+
+ @Before
+ public void enableService() {
+ MyAutofillService.resetStaticState();
+ MyAutofillService.setEnabled(true);
+ }
+
+ @After
+ public void disableService() {
+ // Must disable service so calls are ignored in case of errors during the test case;
+ // otherwise, other tests will fail because these calls are made in the UI thread (as both
+ // the service, the tests, and the app run in the same process).
+ MyAutofillService.setEnabled(false);
+ }
+
+ /**
+ * Initializes the {@link StubActivity} after it was launched.
+ */
+ protected abstract void onCreate(StubActivity activity);
+
+ /**
+ * Uses the {@code settings} binary to set the autofill service.
+ */
+ protected void setService() {
+ SettingsHelper.syncSet(InstrumentationRegistry.getTargetContext(),
+ SettingsHelper.NAMESPACE_SECURE,
+ Settings.Secure.AUTOFILL_SERVICE,
+ MyAutofillService.COMPONENT_NAME);
+ }
+
+ /**
+ * Uses the {@code settings} binary to reset the autofill service.
+ */
+ protected void resetService() {
+ SettingsHelper.syncDelete(InstrumentationRegistry.getTargetContext(),
+ SettingsHelper.NAMESPACE_SECURE,
+ Settings.Secure.AUTOFILL_SERVICE);
+ }
+}
diff --git a/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java b/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java
new file mode 100644
index 0000000..8090826
--- /dev/null
+++ b/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java
@@ -0,0 +1,302 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.view.autofill;
+
+import static android.view.autofill.AutofillManager.AutofillCallback.EVENT_INPUT_HIDDEN;
+import static android.view.autofill.AutofillManager.AutofillCallback.EVENT_INPUT_SHOWN;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.StubActivity;
+import android.view.View;
+import android.widget.EditText;
+
+import com.android.perftests.autofill.R;
+
+import org.junit.Test;
+
+public class LoginTest extends AbstractAutofillPerfTestCase {
+
+ private EditText mUsername;
+ private EditText mPassword;
+ private AutofillManager mAfm;
+
+ public LoginTest() {
+ super(R.layout.test_autofill_login);
+ }
+
+ @Override
+ protected void onCreate(StubActivity activity) {
+ View root = activity.getWindow().getDecorView();
+ mUsername = root.findViewById(R.id.username);
+ mPassword = root.findViewById(R.id.password);
+ mAfm = activity.getSystemService(AutofillManager.class);
+ }
+
+ /**
+ * This is the baseline test for focusing the 2 views when autofill is disabled.
+ */
+ @Test
+ public void testFocus_noService() throws Throwable {
+ resetService();
+
+ mActivityRule.runOnUiThread(() -> {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mUsername.requestFocus();
+ mPassword.requestFocus();
+ }
+ });
+ }
+
+ /**
+ * This time the service is called, but it returns a {@code null} response so the UI behaves
+ * as if autofill was disabled.
+ */
+ @Test
+ public void testFocus_serviceDoesNotAutofill() throws Throwable {
+ MyAutofillService.newCannedResponse().reply();
+ setService();
+
+ // Must first focus in a field to trigger autofill and wait for service response
+ // outside the loop
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ MyAutofillService.getLastFillRequest();
+ // Then focus on password so loop start with focus away from username
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+
+ mActivityRule.runOnUiThread(() -> {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mUsername.requestFocus();
+ mPassword.requestFocus();
+ }
+ });
+ }
+
+ /**
+ * Now the service returns autofill data, for both username and password.
+ */
+ @Test
+ public void testFocus_autofillBothFields() throws Throwable {
+ MyAutofillService.newCannedResponse()
+ .setUsername(mUsername.getAutofillId(), "user")
+ .setPassword(mPassword.getAutofillId(), "pass")
+ .reply();
+ setService();
+
+ // Callback is used to slow down the calls made to the autofill server so the
+ // app is not crashed due to binder exhaustion. But the time spent waiting for the callbacks
+ // is not measured here...
+ MyAutofillCallback callback = new MyAutofillCallback();
+ mAfm.registerCallback(callback);
+
+ // Must first trigger autofill and wait for service response outside the loop
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ MyAutofillService.getLastFillRequest();
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+
+ // Then focus on password so loop start with focus away from username
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mPassword, EVENT_INPUT_SHOWN);
+
+
+ // NOTE: we cannot run the whole loop inside the UI thread, because the autofill callback
+ // is called on it, which would cause a deadlock on expectEvent().
+ try {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ state.pauseTiming(); // Ignore time spent waiting for callbacks
+ callback.expectEvent(mPassword, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+ state.resumeTiming();
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ state.pauseTiming(); // Ignore time spent waiting for callbacks
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mPassword, EVENT_INPUT_SHOWN);
+ state.resumeTiming();
+ }
+
+ // Sanity check
+ callback.assertNoAsyncErrors();
+ } finally {
+ mAfm.unregisterCallback(callback);
+ }
+ }
+
+ /**
+ * Now the service returns autofill data, but just for username.
+ */
+ @Test
+ public void testFocus_autofillUsernameOnly() throws Throwable {
+ // Must set ignored ids so focus on password does not trigger new requests
+ MyAutofillService.newCannedResponse()
+ .setUsername(mUsername.getAutofillId(), "user")
+ .setIgnored(mPassword.getAutofillId())
+ .reply();
+ setService();
+
+ // Callback is used to slow down the calls made to the autofill server so the
+ // app is not crashed due to binder exhaustion. But the time spent waiting for the callbacks
+ // is not measured here...
+ MyAutofillCallback callback = new MyAutofillCallback();
+ mAfm.registerCallback(callback);
+
+ // Must first trigger autofill and wait for service response outside the loop
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ MyAutofillService.getLastFillRequest();
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+
+ // Then focus on password so loop start with focus away from username
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+
+ // NOTE: we cannot run the whole loop inside the UI thread, because the autofill callback
+ // is called on it, which would cause a deadlock on expectEvent().
+ try {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ state.pauseTiming(); // Ignore time spent waiting for callbacks
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+ state.resumeTiming();
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ state.pauseTiming(); // Ignore time spent waiting for callbacks
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+ state.resumeTiming();
+ }
+
+ // Sanity check
+ callback.assertNoAsyncErrors();
+ } finally {
+ mAfm.unregisterCallback(callback);
+ }
+ }
+
+ /**
+ * This is the baseline test for changing the 2 views when autofill is disabled.
+ */
+ @Test
+ public void testChange_noService() throws Throwable {
+ resetService();
+
+ changeTest(false);
+ }
+
+ /**
+ * This time the service is called, but it returns a {@code null} response so the UI behaves
+ * as if autofill was disabled.
+ */
+ @Test
+ public void testChange_serviceDoesNotAutofill() throws Throwable {
+ MyAutofillService.newCannedResponse().reply();
+ setService();
+
+ changeTest(true);
+ }
+
+ /**
+ * Now the service returns autofill data, for both username and password.
+ */
+ @Test
+ public void testChange_autofillBothFields() throws Throwable {
+ MyAutofillService.newCannedResponse()
+ .setUsername(mUsername.getAutofillId(), "user")
+ .setPassword(mPassword.getAutofillId(), "pass")
+ .reply();
+ setService();
+
+ changeTest(true);
+ }
+
+ /**
+ * Now the service returns autofill data, but just for username.
+ */
+ @Test
+ public void testChange_autofillUsernameOnly() throws Throwable {
+ // Must set ignored ids so focus on password does not trigger new requests
+ MyAutofillService.newCannedResponse()
+ .setUsername(mUsername.getAutofillId(), "user")
+ .setIgnored(mPassword.getAutofillId())
+ .reply();
+ setService();
+
+ changeTest(true);
+ }
+
+ private void changeTest(boolean waitForService) throws Throwable {
+ // Must first focus in a field to trigger autofill and wait for service response
+ // outside the loop
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ if (waitForService) {
+ MyAutofillService.getLastFillRequest();
+ }
+ mActivityRule.runOnUiThread(() -> {
+
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mUsername.setText("");
+ mUsername.setText("a");
+ mPassword.setText("");
+ mPassword.setText("x");
+ }
+ });
+ }
+
+ @Test
+ public void testCallbacks() throws Throwable {
+ MyAutofillService.newCannedResponse()
+ .setUsername(mUsername.getAutofillId(), "user")
+ .setPassword(mPassword.getAutofillId(), "pass")
+ .reply();
+ setService();
+
+ MyAutofillCallback callback = new MyAutofillCallback();
+ mAfm.registerCallback(callback);
+
+ // Must first focus in a field to trigger autofill and wait for service response
+ // outside the loop
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ MyAutofillService.getLastFillRequest();
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+
+ // Now focus on password to prepare loop state
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mPassword, EVENT_INPUT_SHOWN);
+
+ // NOTE: we cannot run the whole loop inside the UI thread, because the autofill callback
+ // is called on it, which would cause a deadlock on expectEvent().
+ try {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mActivityRule.runOnUiThread(() -> mUsername.requestFocus());
+ callback.expectEvent(mPassword, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mUsername, EVENT_INPUT_SHOWN);
+ mActivityRule.runOnUiThread(() -> mPassword.requestFocus());
+ callback.expectEvent(mUsername, EVENT_INPUT_HIDDEN);
+ callback.expectEvent(mPassword, EVENT_INPUT_SHOWN);
+ }
+
+ // Sanity check
+ callback.assertNoAsyncErrors();
+ } finally {
+ mAfm.unregisterCallback(callback);
+ }
+ }
+}
diff --git a/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillCallback.java b/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillCallback.java
new file mode 100644
index 0000000..208d632
--- /dev/null
+++ b/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillCallback.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+package android.view.autofill;
+
+import android.view.View;
+import android.view.autofill.AutofillManager.AutofillCallback;
+
+import androidx.annotation.NonNull;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+import static android.view.autofill.AutofillManager.AutofillCallback.EVENT_INPUT_HIDDEN;
+import static android.view.autofill.AutofillManager.AutofillCallback.EVENT_INPUT_SHOWN;
+import static android.view.autofill.AutofillManager.AutofillCallback.EVENT_INPUT_UNAVAILABLE;
+
+import android.os.CancellationSignal;
+import android.service.autofill.FillCallback;
+import android.service.autofill.FillRequest;
+import android.util.Log;
+
+/**
+ * Custom {@link AutofillCallback} used to recover events during tests.
+ */
+public final class MyAutofillCallback extends AutofillCallback {
+
+ private static final String TAG = "MyAutofillCallback";
+ private static final int TIMEOUT_MS = 5000;
+
+ private final BlockingQueue<MyEvent> mEvents = new LinkedBlockingQueue<>(2);
+ private final List<String> mAsyncErrors = new ArrayList<>();
+
+ @Override
+ public void onAutofillEvent(View view, int event) {
+ boolean offered = false;
+ try {
+ offered = mEvents.offer(new MyEvent(view, event), TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ if (!offered) {
+ String error = "could not offer " + toString(view, event) + " in " + TIMEOUT_MS + "ms";
+ Log.e(TAG, error);
+ mAsyncErrors.add(error);
+ }
+ }
+
+ /**
+ * Asserts the callback is called for the given view and event, or fail if it times out.
+ */
+ public void expectEvent(@NonNull View view, int event) {
+ MyEvent myEvent;
+ try {
+ myEvent = mEvents.poll(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ if (myEvent == null) {
+ throw new IllegalStateException("no event received in " + TIMEOUT_MS
+ + "ms while waiting for " + toString(view, event));
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new IllegalStateException("interrupted waiting for " + toString(view, event));
+ }
+ if (!myEvent.view.equals(view) || myEvent.event != event) {
+ throw new AssertionError("Invalid event: expected " + myEvent + ", got "
+ + toString(view, event));
+ }
+ }
+
+ /**
+ * Throws an exception if an error happened asynchronously while handing
+ * {@link #onAutofillEvent(View, int)}.
+ */
+ public void assertNoAsyncErrors() {
+ if (!mAsyncErrors.isEmpty()) {
+ throw new IllegalStateException(mAsyncErrors.size() + " errors: " + mAsyncErrors);
+ }
+ }
+
+ private static String eventToString(int event) {
+ switch (event) {
+ case EVENT_INPUT_HIDDEN:
+ return "HIDDEN";
+ case EVENT_INPUT_SHOWN:
+ return "SHOWN";
+ case EVENT_INPUT_UNAVAILABLE:
+ return "UNAVAILABLE";
+ default:
+ throw new IllegalArgumentException("invalid event: " + event);
+ }
+ }
+
+ private static String toString(View view, int event) {
+ return eventToString(event) + ": " + view + ")";
+ }
+
+ private static final class MyEvent {
+ public final View view;
+ public final int event;
+
+ MyEvent(View view, int event) {
+ this.view = view;
+ this.event = event;
+ }
+
+ @Override
+ public String toString() {
+ return MyAutofillCallback.toString(view, event);
+ }
+ }
+}
diff --git a/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillService.java b/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillService.java
new file mode 100644
index 0000000..7060233
--- /dev/null
+++ b/apct-tests/perftests/autofill/src/android/view/autofill/MyAutofillService.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+package android.view.autofill;
+
+import android.os.CancellationSignal;
+import android.service.autofill.AutofillService;
+import android.service.autofill.Dataset;
+import android.service.autofill.FillCallback;
+import android.service.autofill.FillRequest;
+import android.service.autofill.FillResponse;
+import android.service.autofill.SaveCallback;
+import android.service.autofill.SaveRequest;
+import android.util.Log;
+import android.util.Pair;
+import android.widget.RemoteViews;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.android.perftests.autofill.R;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * An {@link AutofillService} implementation whose replies can be programmed by the test case.
+ */
+public class MyAutofillService extends AutofillService {
+
+ private static final String TAG = "MyAutofillService";
+ private static final int TIMEOUT_MS = 5000;
+
+ private static final String PACKAGE_NAME = "com.android.perftests.autofill";
+ static final String COMPONENT_NAME = PACKAGE_NAME + "/android.view.autofill.MyAutofillService";
+
+ private static final BlockingQueue<FillRequest> sFillRequests = new LinkedBlockingQueue<>();
+ private static final BlockingQueue<CannedResponse> sCannedResponses =
+ new LinkedBlockingQueue<>();
+
+ private static boolean sEnabled;
+
+ /**
+ * Resets the static state associated with the service.
+ */
+ static void resetStaticState() {
+ sFillRequests.clear();
+ sCannedResponses.clear();
+ sEnabled = false;
+ }
+
+ /**
+ * Sets whether the service is enabled or not - when disabled, calls to
+ * {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback)} will be ignored.
+ */
+ static void setEnabled(boolean enabled) {
+ sEnabled = enabled;
+ }
+
+ /**
+ * Gets the the last {@link FillRequest} passed to
+ * {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback)} or throws an
+ * exception if that method was not called.
+ */
+ @NonNull
+ static FillRequest getLastFillRequest() {
+ FillRequest request = null;
+ try {
+ request = sFillRequests.poll(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new IllegalStateException("onFillRequest() interrupted");
+ }
+ if (request == null) {
+ throw new IllegalStateException("onFillRequest() not called in " + TIMEOUT_MS + "ms");
+ }
+ return request;
+ }
+
+ @Override
+ public void onFillRequest(FillRequest request, CancellationSignal cancellationSignal,
+ FillCallback callback) {
+ try {
+ handleRequest(request, callback);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ onError("onFillRequest() interrupted", e, callback);
+ } catch (Exception e) {
+ onError("exception on onFillRequest()", e, callback);
+ }
+ }
+
+
+ private void handleRequest(FillRequest request, FillCallback callback) throws Exception {
+ if (!sEnabled) {
+ onError("ignoring onFillRequest(): service is disabled", callback);
+ return;
+ }
+ CannedResponse response = sCannedResponses.poll(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ if (response == null) {
+ onError("ignoring onFillRequest(): response not set", callback);
+ return;
+ }
+ Dataset.Builder dataset = new Dataset.Builder(newDatasetPresentation("dataset"));
+ boolean hasData = false;
+ if (response.mUsername != null) {
+ hasData = true;
+ dataset.setValue(response.mUsername.first,
+ AutofillValue.forText(response.mUsername.second));
+ }
+ if (response.mPassword != null) {
+ hasData = true;
+ dataset.setValue(response.mPassword.first,
+ AutofillValue.forText(response.mPassword.second));
+ }
+ if (hasData) {
+ FillResponse.Builder fillResponse = new FillResponse.Builder();
+ if (response.mIgnoredIds != null) {
+ fillResponse.setIgnoredIds(response.mIgnoredIds);
+ }
+
+ callback.onSuccess(fillResponse.addDataset(dataset.build()).build());
+ } else {
+ callback.onSuccess(null);
+ }
+ if (!sFillRequests.offer(request, TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+ Log.w(TAG, "could not offer request in " + TIMEOUT_MS + "ms");
+ }
+ }
+
+ @Override
+ public void onSaveRequest(SaveRequest request, SaveCallback callback) {
+ // No current test should have triggered it...
+ Log.e(TAG, "onSaveRequest() should not have been called");
+ callback.onFailure("onSaveRequest() should not have been called");
+ }
+
+ static final class CannedResponse {
+ private final Pair<AutofillId, String> mUsername;
+ private final Pair<AutofillId, String> mPassword;
+ private final AutofillId[] mIgnoredIds;
+
+ private CannedResponse(@NonNull Builder builder) {
+ mUsername = builder.mUsername;
+ mPassword = builder.mPassword;
+ mIgnoredIds = builder.mIgnoredIds;
+ }
+
+ static class Builder {
+ private Pair<AutofillId, String> mUsername;
+ private Pair<AutofillId, String> mPassword;
+ private AutofillId[] mIgnoredIds;
+
+ @NonNull
+ Builder setUsername(@NonNull AutofillId id, @NonNull String value) {
+ mUsername = new Pair<>(id, value);
+ return this;
+ }
+
+ @NonNull
+ Builder setPassword(@NonNull AutofillId id, @NonNull String value) {
+ mPassword = new Pair<>(id, value);
+ return this;
+ }
+
+ @NonNull
+ Builder setIgnored(AutofillId... ids) {
+ mIgnoredIds = ids;
+ return this;
+ }
+
+ void reply() {
+ sCannedResponses.add(new CannedResponse(this));
+ }
+ }
+ }
+
+ /**
+ * Sets the expected canned {@link FillResponse} for the next
+ * {@link AutofillService#onFillRequest(FillRequest, CancellationSignal, FillCallback)}.
+ */
+ static CannedResponse.Builder newCannedResponse() {
+ return new CannedResponse.Builder();
+ }
+
+ private void onError(@NonNull String msg, @NonNull FillCallback callback) {
+ Log.e(TAG, msg);
+ callback.onFailure(msg);
+ }
+
+ private void onError(@NonNull String msg, @NonNull Exception e,
+ @NonNull FillCallback callback) {
+ Log.e(TAG, msg, e);
+ callback.onFailure(msg);
+ }
+
+ @NonNull
+ private static RemoteViews newDatasetPresentation(@NonNull CharSequence text) {
+ RemoteViews presentation =
+ new RemoteViews(PACKAGE_NAME, R.layout.autofill_dataset_picker_text_only);
+ presentation.setTextViewText(R.id.text, text);
+ return presentation;
+ }
+}
diff --git a/apct-tests/perftests/core/Android.mk b/apct-tests/perftests/core/Android.mk
index 6156a0c1..3f87a1c 100644
--- a/apct-tests/perftests/core/Android.mk
+++ b/apct-tests/perftests/core/Android.mk
@@ -9,7 +9,8 @@
src/android/os/ISomeService.aidl
LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
+ androidx.test.rules \
+ androidx.annotation_annotation \
apct-perftests-utils \
guava
@@ -26,5 +27,3 @@
LOCAL_COMPATIBILITY_SUITE += device-tests
include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/apct-tests/perftests/core/AndroidManifest.xml b/apct-tests/perftests/core/AndroidManifest.xml
index 132a2f9..a564a4d 100644
--- a/apct-tests/perftests/core/AndroidManifest.xml
+++ b/apct-tests/perftests/core/AndroidManifest.xml
@@ -16,9 +16,19 @@
</intent-filter>
</activity>
<service android:name="android.os.SomeService" android:exported="false" android:process=":some_service" />
+
+ <service
+ android:name="android.view.autofill.MyAutofillService"
+ android:label="PERF AutofillService"
+ android:permission="android.permission.BIND_AUTOFILL_SERVICE" >
+ <intent-filter>
+ <action android:name="android.service.autofill.AutofillService" />
+ </intent-filter>
+ </service>
+
</application>
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.perftests.core"/>
</manifest>
diff --git a/apct-tests/perftests/core/jni/Android.bp b/apct-tests/perftests/core/jni/Android.bp
new file mode 100644
index 0000000..4c0f2aa
--- /dev/null
+++ b/apct-tests/perftests/core/jni/Android.bp
@@ -0,0 +1,13 @@
+cc_library_shared {
+ name: "libperftestscore_jni",
+ sdk_version: "21",
+
+ srcs: ["SystemPerfTest.cpp"],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wunused",
+ "-Wunreachable-code",
+ ],
+}
diff --git a/apct-tests/perftests/core/jni/Android.mk b/apct-tests/perftests/core/jni/Android.mk
deleted file mode 100644
index d4c3f1e..0000000
--- a/apct-tests/perftests/core/jni/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SDK_VERSION := 21
-
-LOCAL_SRC_FILES:= \
- SystemPerfTest.cpp \
-
-LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE)
-
-LOCAL_MODULE := libperftestscore_jni
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/apct-tests/perftests/core/src/android/accounts/AccountManagerPerfTest.java b/apct-tests/perftests/core/src/android/accounts/AccountManagerPerfTest.java
index b9411fa..e455e6a 100644
--- a/apct-tests/perftests/core/src/android/accounts/AccountManagerPerfTest.java
+++ b/apct-tests/perftests/core/src/android/accounts/AccountManagerPerfTest.java
@@ -23,10 +23,10 @@
import android.content.pm.PackageManager;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java b/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
index f8fd51d..b3f8359 100644
--- a/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
+++ b/apct-tests/perftests/core/src/android/app/PendingIntentPerfTest.java
@@ -21,9 +21,10 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
@@ -33,7 +34,6 @@
// Due to b/71353150, you might get "java.lang.AssertionError: Binder ProxyMap has too many
// entries", but it's flaky. Adding "Runtime.getRuntime().gc()" between each iteration solves
// the problem, but it doesn't seem like it's currently needed.
-
@RunWith(AndroidJUnit4.class)
@LargeTest
public class PendingIntentPerfTest {
diff --git a/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
new file mode 100644
index 0000000..c3e43ee
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+import static org.junit.Assert.fail;
+
+import android.content.res.AssetManager;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+
+/**
+ * Benchmarks for {@link android.content.res.Resources}.
+ */
+@LargeTest
+public class ResourcesPerfTest {
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private AssetManager mAsset;
+ private Resources mRes;
+
+ private int mTextId;
+ private int mColorId;
+ private int mIntegerId;
+ private int mLayoutId;
+
+ @Before
+ public void setUp() {
+ mAsset = new AssetManager();
+ mAsset.addAssetPath("/system/framework/framework-res.apk");
+ mRes = new Resources(mAsset, null, null);
+
+ mTextId = mRes.getIdentifier("cancel", "string", "android");
+ mColorId = mRes.getIdentifier("transparent", "color", "android");
+ mIntegerId = mRes.getIdentifier("config_shortAnimTime", "integer", "android");
+ mLayoutId = mRes.getIdentifier("two_line_list_item", "layout", "android");
+ }
+
+ @After
+ public void tearDown() {
+ mAsset.close();
+ }
+
+ @Test
+ public void getText() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getText(mTextId);
+ }
+ }
+
+ @Test
+ public void getColor() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getColor(mColorId, null);
+ }
+ }
+
+ @Test
+ public void getInteger() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mRes.getInteger(mIntegerId);
+ }
+ }
+
+ @Test
+ public void getLayoutAndTravese() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ try (XmlResourceParser parser = mRes.getLayout(mLayoutId)) {
+ while (parser.next() != XmlPullParser.END_DOCUMENT) {
+ // Walk the entire tree
+ }
+ } catch (IOException | XmlPullParserException exception) {
+ fail("Parsing of the layout failed. Something is really broken");
+ }
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/app/ResourcesThemePerfTest.java b/apct-tests/perftests/core/src/android/app/ResourcesThemePerfTest.java
new file mode 100644
index 0000000..1b07572
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/app/ResourcesThemePerfTest.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.app;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Benchmarks for {@link android.content.res.Resources.Theme}.
+ */
+@LargeTest
+public class ResourcesThemePerfTest {
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private Resources.Theme mTheme;
+
+ @Before
+ public void setUp() {
+ Context context = InstrumentationRegistry.getTargetContext();
+ mTheme = context.getTheme();
+
+ }
+
+ @Test
+ public void obtainStyledAttributesForViewFromMaterial() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mTheme.obtainStyledAttributes(android.R.style.Theme_Material, android.R.styleable.View);
+ }
+ }
+
+}
diff --git a/apct-tests/perftests/core/src/android/database/CursorWindowPerfTest.java b/apct-tests/perftests/core/src/android/database/CursorWindowPerfTest.java
index 897d0ae..c5ef80d 100644
--- a/apct-tests/perftests/core/src/android/database/CursorWindowPerfTest.java
+++ b/apct-tests/perftests/core/src/android/database/CursorWindowPerfTest.java
@@ -23,9 +23,10 @@
import android.database.sqlite.SQLiteDatabase;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.AfterClass;
import org.junit.BeforeClass;
diff --git a/apct-tests/perftests/core/src/android/database/SQLiteDatabaseIoPerfTest.java b/apct-tests/perftests/core/src/android/database/SQLiteDatabaseIoPerfTest.java
index 7c5316d..830302e 100644
--- a/apct-tests/perftests/core/src/android/database/SQLiteDatabaseIoPerfTest.java
+++ b/apct-tests/perftests/core/src/android/database/SQLiteDatabaseIoPerfTest.java
@@ -16,17 +16,20 @@
package android.database;
+import static org.junit.Assert.assertEquals;
+
import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.ArrayMap;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.internal.util.Preconditions;
import org.junit.After;
@@ -40,8 +43,6 @@
import java.util.List;
import java.util.Map;
-import static org.junit.Assert.assertEquals;
-
/**
* Performance tests for measuring amount of data written during typical DB operations
*
diff --git a/apct-tests/perftests/core/src/android/database/SQLiteDatabasePerfTest.java b/apct-tests/perftests/core/src/android/database/SQLiteDatabasePerfTest.java
index e2b75c3..973e996 100644
--- a/apct-tests/perftests/core/src/android/database/SQLiteDatabasePerfTest.java
+++ b/apct-tests/perftests/core/src/android/database/SQLiteDatabasePerfTest.java
@@ -16,14 +16,18 @@
package android.database;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
@@ -33,9 +37,6 @@
import java.util.Random;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
/**
* Performance tests for typical CRUD operations and loading rows into the Cursor
*
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java
index eed1db0..9f09305 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java
@@ -17,14 +17,15 @@
package android.graphics.perftests;
import android.graphics.Bitmap;
-import android.graphics.Color;
import android.graphics.Bitmap.Config;
+import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
@@ -43,7 +44,7 @@
RenderNode child = RenderNode.create("child", null);
child.setLeftTopRightBottom(50, 50, 100, 100);
- DisplayListCanvas canvas = node.start(100, 100);
+ RecordingCanvas canvas = node.start(100, 100);
node.end(canvas);
canvas = child.start(50, 50);
canvas.drawColor(Color.WHITE);
@@ -70,7 +71,7 @@
BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
RenderNode node = RenderNode.create("benchmark", null);
- DisplayListCanvas canvas = node.start(100, 100);
+ RecordingCanvas canvas = node.start(100, 100);
node.end(canvas);
Bitmap bitmap = Bitmap.createBitmap(80, 80, Config.ARGB_8888);
Paint paint = new Paint();
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/OutlinePerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/OutlinePerfTest.java
index 3a4fc72..10a5128 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/OutlinePerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/OutlinePerfTest.java
@@ -19,8 +19,8 @@
import android.graphics.Outline;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/PaintHasGlyphPerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/PaintHasGlyphPerfTest.java
index 26b8309..3a80020 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/PaintHasGlyphPerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/PaintHasGlyphPerfTest.java
@@ -20,17 +20,18 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
-import java.util.Arrays;
-import java.util.Collection;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import java.util.Arrays;
+import java.util.Collection;
@LargeTest
@RunWith(Parameterized.class)
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/PaintMeasureTextTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/PaintMeasureTextTest.java
index b9ee613..fc8c673 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/PaintMeasureTextTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/PaintMeasureTextTest.java
@@ -19,9 +19,10 @@
import android.graphics.Canvas;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
import android.text.TextPaint;
+import androidx.test.filters.LargeTest;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/PathPerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/PathPerfTest.java
index 7a49b4f..c6de9ec 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/PathPerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/PathPerfTest.java
@@ -20,7 +20,8 @@
import android.graphics.RectF;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java
index dfbabeb..e805ab9 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java
@@ -17,17 +17,15 @@
package android.graphics.perftests;
import android.graphics.Outline;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
-import java.util.ArrayList;
-
@LargeTest
public class RenderNodePerfTest {
@Rule
@@ -47,8 +45,7 @@
public void testCreateRenderNodeNoName() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
- RenderNode node = RenderNode.create(null, null);
- node.destroy();
+ RenderNode.create(null, null);
}
}
@@ -56,8 +53,7 @@
public void testCreateRenderNode() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
- RenderNode node = RenderNode.create("LinearLayout", null);
- node.destroy();
+ RenderNode.create("LinearLayout", null);
}
}
@@ -66,7 +62,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
RenderNode node = RenderNode.create("LinearLayout", null);
while (state.keepRunning()) {
- node.isValid();
+ node.hasDisplayList();
}
}
@@ -75,8 +71,8 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
RenderNode node = RenderNode.create("LinearLayout", null);
while (state.keepRunning()) {
- DisplayListCanvas canvas = node.start(100, 100);
- node.end(canvas);
+ node.beginRecording(100, 100);
+ node.endRecording();
}
}
@@ -84,17 +80,16 @@
public void testStartEndDeepHierarchy() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
RenderNode[] nodes = new RenderNode[30];
- DisplayListCanvas[] canvases = new DisplayListCanvas[nodes.length];
for (int i = 0; i < nodes.length; i++) {
nodes[i] = RenderNode.create("LinearLayout", null);
}
while (state.keepRunning()) {
for (int i = 0; i < nodes.length; i++) {
- canvases[i] = nodes[i].start(100, 100);
+ nodes[i].beginRecording(100, 100);
}
for (int i = nodes.length - 1; i >= 0; i--) {
- nodes[i].end(canvases[i]);
+ nodes[i].endRecording();
}
}
}
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/TypefaceCreatePerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/TypefaceCreatePerfTest.java
index 11ee599..8847456 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/TypefaceCreatePerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/TypefaceCreatePerfTest.java
@@ -18,12 +18,20 @@
import android.content.Context;
import android.content.res.AssetManager;
+import android.content.res.Resources;
import android.graphics.Typeface;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.perftests.core.R;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import java.io.File;
import java.io.FileOutputStream;
@@ -31,10 +39,6 @@
import java.io.InputStream;
import java.io.OutputStream;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
@LargeTest
@RunWith(AndroidJUnit4.class)
public class TypefaceCreatePerfTest {
@@ -103,4 +107,15 @@
outFile.delete();
}
+
+ @Test
+ public void testCreate_fromResources() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ final Resources r = InstrumentationRegistry.getContext().getResources();
+
+ while (state.keepRunning()) {
+ Typeface face = r.getFont(R.font.samplefont);
+ }
+ }
+
}
diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/VectorDrawablePerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/VectorDrawablePerfTest.java
index 5533782..3b2b8a9 100644
--- a/apct-tests/perftests/core/src/android/graphics/perftests/VectorDrawablePerfTest.java
+++ b/apct-tests/perftests/core/src/android/graphics/perftests/VectorDrawablePerfTest.java
@@ -16,6 +16,8 @@
package android.graphics.perftests;
+import static junit.framework.Assert.assertTrue;
+
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -25,21 +27,17 @@
import android.perftests.utils.BitmapUtils;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.perftests.core.R;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.io.IOException;
-
-import static junit.framework.Assert.assertTrue;
-
@RunWith(AndroidJUnit4.class)
@LargeTest
public class VectorDrawablePerfTest {
diff --git a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
index ba072da..12e49e3 100644
--- a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
@@ -18,10 +18,13 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import com.android.internal.os.BinderCallsStats;
+import com.android.internal.os.BinderInternal.CallSession;
+import com.android.internal.os.CachedDeviceState;
import org.junit.After;
import org.junit.Before;
@@ -29,15 +32,30 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertNull;
-
-
/**
* Performance tests for {@link BinderCallsStats}
*/
@RunWith(AndroidJUnit4.class)
@LargeTest
public class BinderCallsStatsPerfTest {
+ private static final int DEFAULT_BUCKET_SIZE = 1000;
+ private static final int WORKSOURCE_UID = 1;
+ static class FakeCpuTimeBinderCallsStats extends BinderCallsStats {
+ private int mTimeMs;
+
+ FakeCpuTimeBinderCallsStats() {
+ super(new BinderCallsStats.Injector());
+ setDeviceState(new CachedDeviceState(false, false).getReadonlyClient());
+ }
+
+ protected long getThreadTimeMicro() {
+ return mTimeMs++;
+ }
+
+ protected long getElapsedRealtimeMicro() {
+ return mTimeMs++;
+ }
+ }
@Rule
public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
@@ -45,7 +63,9 @@
@Before
public void setUp() {
- mBinderCallsStats = new BinderCallsStats(true);
+ mBinderCallsStats = new BinderCallsStats(new BinderCallsStats.Injector());
+ CachedDeviceState deviceState = new CachedDeviceState(false, false);
+ mBinderCallsStats.setDeviceState(deviceState.getReadonlyClient());
}
@After
@@ -54,25 +74,53 @@
@Test
public void timeCallSession() {
- final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
- Binder b = new Binder();
- int i = 0;
- while (state.keepRunning()) {
- BinderCallsStats.CallSession s = mBinderCallsStats.callStarted(b, i % 100);
- mBinderCallsStats.callEnded(s);
- i++;
- }
+ mBinderCallsStats.setDetailedTracking(true);
+ runScenario(DEFAULT_BUCKET_SIZE);
+ }
+
+ @Test
+ public void timeCallSessionOnePercentSampling() {
+ mBinderCallsStats.setDetailedTracking(false);
+ mBinderCallsStats.setSamplingInterval(100);
+ runScenario(DEFAULT_BUCKET_SIZE);
}
@Test
public void timeCallSessionTrackingDisabled() {
- final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
- Binder b = new Binder();
- mBinderCallsStats = new BinderCallsStats(false);
- while (state.keepRunning()) {
- BinderCallsStats.CallSession s = mBinderCallsStats.callStarted(b, 0);
- mBinderCallsStats.callEnded(s);
- }
+ mBinderCallsStats.setDetailedTracking(false);
+ runScenario(DEFAULT_BUCKET_SIZE);
}
+ @Test
+ public void timeCallSession_1000_buckets_cpuNotRecorded() {
+ mBinderCallsStats = new FakeCpuTimeBinderCallsStats();
+ mBinderCallsStats.setSamplingInterval(1);
+ runScenario(/* max bucket size */ 1000);
+ }
+
+ @Test
+ public void timeCallSession_500_buckets_cpuNotRecorded() {
+ mBinderCallsStats = new FakeCpuTimeBinderCallsStats();
+ mBinderCallsStats.setSamplingInterval(1);
+ runScenario(/* max bucket size */ 500);
+ }
+
+ @Test
+ public void timeCallSession_100_buckets_cpuNotRecorded() {
+ mBinderCallsStats = new FakeCpuTimeBinderCallsStats();
+ mBinderCallsStats.setSamplingInterval(1);
+ runScenario(/* max bucket size */ 100);
+ }
+
+ // There will be a warmup time of maxBucketSize to initialize the map of CallStat.
+ private void runScenario(int maxBucketSize) {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Binder b = new Binder();
+ while (state.keepRunning()) {
+ for (int i = 0; i < 10000; i++) {
+ CallSession s = mBinderCallsStats.callStarted(b, i % maxBucketSize, WORKSOURCE_UID);
+ mBinderCallsStats.callEnded(s, 0, 0, WORKSOURCE_UID);
+ }
+ }
+ }
}
diff --git a/apct-tests/perftests/core/src/android/os/CpuUsageTrackingPerfTest.java b/apct-tests/perftests/core/src/android/os/CpuUsageTrackingPerfTest.java
new file mode 100644
index 0000000..0d7b7ca
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/os/CpuUsageTrackingPerfTest.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+/**
+ * Performance tests collecting CPU data different mechanisms.
+ */
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class CpuUsageTrackingPerfTest {
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ @Test
+ public void timeSystemThread() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Binder b = new Binder();
+ while (state.keepRunning()) {
+ SystemClock.currentThreadTimeMicro();
+ }
+ }
+
+ @Test
+ public void timeReadStatFileDirectly() throws Exception {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ // CPU usage by frequency for this pid. Data is in text format.
+ final String procFile = "/proc/self/stat";
+ while (state.keepRunning()) {
+ byte[] data = Files.readAllBytes(Paths.get(procFile));
+ }
+ }
+
+ @Test
+ public void timeReadPidProcDirectly() throws Exception {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ // CPU usage by frequency for this pid. Data is in text format.
+ final String procFile = "/proc/self/time_in_state";
+ while (state.keepRunning()) {
+ byte[] data = Files.readAllBytes(Paths.get(procFile));
+ }
+ }
+
+ @Test
+ public void timeReadThreadProcDirectly() throws Exception {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ // CPU usage by frequency for this UID. Data is in text format.
+ final String procFile = "/proc/self/task/" + android.os.Process.myTid()
+ + "/time_in_state";
+ while (state.keepRunning()) {
+ byte[] data = Files.readAllBytes(Paths.get(procFile));
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/os/KernelCpuThreadReaderPerfTest.java b/apct-tests/perftests/core/src/android/os/KernelCpuThreadReaderPerfTest.java
new file mode 100644
index 0000000..da9ed6e
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/os/KernelCpuThreadReaderPerfTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+import static org.junit.Assert.assertNotNull;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.internal.os.KernelCpuThreadReader;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Performance tests collecting per-thread CPU data.
+ */
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class KernelCpuThreadReaderPerfTest {
+ @Rule
+ public final PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private final KernelCpuThreadReader mKernelCpuThreadReader =
+ KernelCpuThreadReader.create(8, uid -> 1000 <= uid && uid < 2000);
+
+ @Test
+ public void timeReadCurrentProcessCpuUsage() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ assertNotNull(mKernelCpuThreadReader);
+ while (state.keepRunning()) {
+ this.mKernelCpuThreadReader.getProcessCpuUsage();
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/os/LooperStatsPerfTest.java b/apct-tests/perftests/core/src/android/os/LooperStatsPerfTest.java
new file mode 100644
index 0000000..162167d
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/os/LooperStatsPerfTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.internal.os.CachedDeviceState;
+import com.android.internal.os.LooperStats;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Performance tests for {@link LooperStats}.
+ */
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class LooperStatsPerfTest {
+ private static final int DISTINCT_MESSAGE_COUNT = 1000;
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+ private LooperStats mStats;
+ private CachedDeviceState mDeviceState;
+ private HandlerThread mThread;
+ private Message[] mMessages = new Message[DISTINCT_MESSAGE_COUNT];
+
+ @Before
+ public void setUp() {
+ mStats = new LooperStats(1, DISTINCT_MESSAGE_COUNT - 1);
+ mDeviceState = new CachedDeviceState(false, false);
+ mStats.setDeviceState(mDeviceState.getReadonlyClient());
+ // The tests are all single-threaded. HandlerThread is created to allow creating Handlers.
+ mThread = new HandlerThread("UnusedThread");
+ mThread.start();
+ for (int i = 0; i < DISTINCT_MESSAGE_COUNT; i++) {
+ mMessages[i] = mThread.getThreadHandler().obtainMessage(i);
+ }
+ }
+
+ @After
+ public void tearDown() {
+ mThread.quit();
+ }
+
+ @Test
+ public void timeHundredPercentSampling() {
+ mStats.setSamplingInterval(1);
+ runScenario();
+ }
+
+ @Test
+ public void timeOnePercentSampling() {
+ mStats.setSamplingInterval(100);
+ runScenario();
+ }
+
+ @Test
+ public void timeCollectionDisabled() {
+ // We do not collect data on charger.
+ mDeviceState.setCharging(true);
+ runScenario();
+ }
+
+ private void runScenario() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ for (int i = 0; i < DISTINCT_MESSAGE_COUNT; i++) {
+ Object token = mStats.messageDispatchStarting();
+ mStats.messageDispatched(token, mMessages[i]);
+ }
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/os/PackageManagerPerfTest.java b/apct-tests/perftests/core/src/android/os/PackageManagerPerfTest.java
index 145fbcd..3aa6749 100644
--- a/apct-tests/perftests/core/src/android/os/PackageManagerPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/PackageManagerPerfTest.java
@@ -16,20 +16,16 @@
package android.os;
-import static android.content.pm.PackageManager.PERMISSION_DENIED;
-import static android.content.pm.PackageManager.PERMISSION_GRANTED;
-
import android.content.ComponentName;
-import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-import org.junit.Assert;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/apct-tests/perftests/core/src/android/os/ParcelArrayPerfTest.java b/apct-tests/perftests/core/src/android/os/ParcelArrayPerfTest.java
index a67aeca..af6d6b0 100644
--- a/apct-tests/perftests/core/src/android/os/ParcelArrayPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/ParcelArrayPerfTest.java
@@ -18,7 +18,8 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
+
+import androidx.test.filters.LargeTest;
import org.junit.After;
import org.junit.Before;
diff --git a/apct-tests/perftests/core/src/android/os/ParcelPerfTest.java b/apct-tests/perftests/core/src/android/os/ParcelPerfTest.java
index 6e4c9c5..4db9262 100644
--- a/apct-tests/perftests/core/src/android/os/ParcelPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/ParcelPerfTest.java
@@ -16,10 +16,15 @@
package android.os;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
@@ -27,10 +32,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
@RunWith(AndroidJUnit4.class)
@LargeTest
public class ParcelPerfTest {
diff --git a/apct-tests/perftests/core/src/android/os/PssPerfTest.java b/apct-tests/perftests/core/src/android/os/PssPerfTest.java
index 400115d..2cc294f 100644
--- a/apct-tests/perftests/core/src/android/os/PssPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/PssPerfTest.java
@@ -18,8 +18,9 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/os/SharedPreferencesTest.java b/apct-tests/perftests/core/src/android/os/SharedPreferencesTest.java
index 099134f..dd479ac 100644
--- a/apct-tests/perftests/core/src/android/os/SharedPreferencesTest.java
+++ b/apct-tests/perftests/core/src/android/os/SharedPreferencesTest.java
@@ -20,9 +20,10 @@
import android.content.SharedPreferences;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/os/StrictModeTest.java b/apct-tests/perftests/core/src/android/os/StrictModeTest.java
index d973c20..60678e9 100644
--- a/apct-tests/perftests/core/src/android/os/StrictModeTest.java
+++ b/apct-tests/perftests/core/src/android/os/StrictModeTest.java
@@ -23,17 +23,21 @@
import android.net.Uri;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.google.common.util.concurrent.SettableFuture;
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.ExecutionException;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.ExecutionException;
+
@RunWith(AndroidJUnit4.class)
@LargeTest
public class StrictModeTest {
diff --git a/apct-tests/perftests/core/src/android/os/TracePerfTest.java b/apct-tests/perftests/core/src/android/os/TracePerfTest.java
new file mode 100644
index 0000000..0d64c39
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/os/TracePerfTest.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+
+package android.os;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+import android.perftests.utils.ShellHelper;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class TracePerfTest {
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ @BeforeClass
+ public static void startTracing() {
+ ShellHelper.runShellCommandRaw("atrace -c --async_start -a *");
+ }
+
+ @AfterClass
+ public static void endTracing() {
+ ShellHelper.runShellCommandRaw("atrace --async_stop");
+ }
+
+ @Before
+ public void verifyTracingEnabled() {
+ Assert.assertTrue(Trace.isEnabled());
+ }
+
+ @Test
+ public void testEnabled() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ Trace.isEnabled();
+ }
+ }
+
+ @Test
+ public void testBeginEndSection() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ Trace.beginSection("testBeginEndSection");
+ Trace.endSection();
+ }
+ }
+
+ @Test
+ public void testAsyncBeginEnd() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ Trace.beginAsyncSection("testAsyncBeginEnd", 42);
+ Trace.endAsyncSection("testAsyncBeginEnd", 42);
+ }
+ }
+
+ @Test
+ public void testCounter() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ Trace.setCounter("testCounter", 123);
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/perftests/SystemPerfTest.java b/apct-tests/perftests/core/src/android/perftests/SystemPerfTest.java
index 95a7144..4f0d108 100644
--- a/apct-tests/perftests/core/src/android/perftests/SystemPerfTest.java
+++ b/apct-tests/perftests/core/src/android/perftests/SystemPerfTest.java
@@ -18,8 +18,9 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import dalvik.annotation.optimization.FastNative;
diff --git a/apct-tests/perftests/core/src/android/text/BoringLayoutCreateDrawPerfTest.java b/apct-tests/perftests/core/src/android/text/BoringLayoutCreateDrawPerfTest.java
index 586c385..c8121c5 100644
--- a/apct-tests/perftests/core/src/android/text/BoringLayoutCreateDrawPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/BoringLayoutCreateDrawPerfTest.java
@@ -18,12 +18,13 @@
import static android.text.Layout.Alignment.ALIGN_NORMAL;
import android.graphics.Canvas;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
import android.text.NonEditableTextGenerator.TextType;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
@@ -46,7 +47,7 @@
private static final float SPACING_ADD = 10f;
private static final float SPACING_MULT = 1.5f;
- @Parameterized.Parameters(name = "cached={3},{1}chars,{0}")
+ @Parameterized.Parameters(name = "cached {3} {1}chars {0}")
public static Collection cases() {
final List<Object[]> params = new ArrayList<>();
for (int length : new int[]{128}) {
@@ -120,7 +121,7 @@
while (state.keepRunning()) {
state.pauseTiming();
- final DisplayListCanvas canvas = node.start(1200, 200);
+ final RecordingCanvas canvas = node.start(1200, 200);
final int save = canvas.save();
if (!mCached) Canvas.freeTextLayoutCaches();
state.resumeTiming();
diff --git a/apct-tests/perftests/core/src/android/text/BoringLayoutIsBoringPerfTest.java b/apct-tests/perftests/core/src/android/text/BoringLayoutIsBoringPerfTest.java
index 9d11f29..ad1327c 100644
--- a/apct-tests/perftests/core/src/android/text/BoringLayoutIsBoringPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/BoringLayoutIsBoringPerfTest.java
@@ -18,9 +18,10 @@
import android.graphics.Canvas;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
import android.text.NonEditableTextGenerator.TextType;
+import androidx.test.filters.LargeTest;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -40,7 +41,7 @@
private static final boolean[] BOOLEANS = new boolean[]{false, true};
- @Parameterized.Parameters(name = "cached={4},{1}chars,{0}")
+ @Parameterized.Parameters(name = "cached {4} {1}chars {0}")
public static Collection cases() {
final List<Object[]> params = new ArrayList<>();
for (int length : new int[]{128}) {
diff --git a/apct-tests/perftests/core/src/android/text/CanvasDrawTextTest.java b/apct-tests/perftests/core/src/android/text/CanvasDrawTextTest.java
new file mode 100644
index 0000000..bb6b691
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/text/CanvasDrawTextTest.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.text;
+
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Random;
+
+@LargeTest
+@RunWith(AndroidJUnit4.class)
+public class CanvasDrawTextTest {
+ private static final int WORD_LENGTH = 9; // Random word has 9 characters.
+
+ private static final TextPaint PAINT = new TextPaint();
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private TextPerfUtils mTextUtil = new TextPerfUtils();
+
+ @Before
+ public void setUp() {
+ mTextUtil.resetRandom(0 /* seed */);
+ }
+
+ @Test
+ public void drawText_LongText_SmallWindow() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ final String text = mTextUtil.nextRandomParagraph(
+ WORD_LENGTH, 4 * 1024 * 1024 /* 4mb text */).toString();
+ final RenderNode node = RenderNode.create("benchmark", null);
+ final RenderNode child = RenderNode.create("child", null);
+ child.setLeftTopRightBottom(50, 50, 100, 100);
+
+ RecordingCanvas canvas = node.start(100, 100);
+ node.end(canvas);
+ canvas = child.start(50, 50);
+ child.end(canvas);
+
+ final Random r = new Random(0);
+
+ while (state.keepRunning()) {
+ int start = r.nextInt(text.length() - 100);
+ canvas.drawText(text, start, start + 100, 0, 0, PAINT);
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/text/DynamicLayoutPerfTest.java b/apct-tests/perftests/core/src/android/text/DynamicLayoutPerfTest.java
index b4c7f54..5be99d9 100644
--- a/apct-tests/perftests/core/src/android/text/DynamicLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/DynamicLayoutPerfTest.java
@@ -24,11 +24,12 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
import android.text.style.ReplacementSpan;
import android.util.ArraySet;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/apct-tests/perftests/core/src/android/text/PaintMeasureDrawPerfTest.java b/apct-tests/perftests/core/src/android/text/PaintMeasureDrawPerfTest.java
index 6768798..bbe75b7 100644
--- a/apct-tests/perftests/core/src/android/text/PaintMeasureDrawPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/PaintMeasureDrawPerfTest.java
@@ -17,11 +17,12 @@
import android.graphics.Canvas;
import android.graphics.Paint;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
@@ -42,7 +43,7 @@
private static final boolean[] BOOLEANS = new boolean[]{false, true};
- @Parameterized.Parameters(name = "cached={1},{0}chars")
+ @Parameterized.Parameters(name = "cached {1} {0}chars")
public static Collection cases() {
final List<Object[]> params = new ArrayList<>();
for (int length : new int[]{128}) {
@@ -107,7 +108,7 @@
while (state.keepRunning()) {
state.pauseTiming();
- final DisplayListCanvas canvas = node.start(1200, 200);
+ final RecordingCanvas canvas = node.start(1200, 200);
final int save = canvas.save();
if (!mCached) Canvas.freeTextLayoutCaches();
state.resumeTiming();
diff --git a/apct-tests/perftests/core/src/android/text/PrecomputedTextMemoryUsageTest.java b/apct-tests/perftests/core/src/android/text/PrecomputedTextMemoryUsageTest.java
index ccbccca..4ae2b93 100644
--- a/apct-tests/perftests/core/src/android/text/PrecomputedTextMemoryUsageTest.java
+++ b/apct-tests/perftests/core/src/android/text/PrecomputedTextMemoryUsageTest.java
@@ -16,32 +16,18 @@
package android.text;
-import static android.text.TextDirectionHeuristics.LTR;
-
-import android.perftests.utils.BenchmarkState;
-import android.perftests.utils.PerfStatusReporter;
-
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-
import android.app.Activity;
import android.os.Bundle;
-import android.support.test.InstrumentationRegistry;
-import android.content.res.ColorStateList;
-import android.graphics.Canvas;
-import android.graphics.Typeface;
-import android.text.Layout;
-import android.text.style.TextAppearanceSpan;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.nio.CharBuffer;
-import java.util.Random;
+import java.util.Locale;
@LargeTest
@RunWith(AndroidJUnit4.class)
@@ -49,9 +35,7 @@
private static final int WORD_LENGTH = 9; // Random word has 9 characters.
private static final boolean NO_STYLE_TEXT = false;
- private static TextPaint PAINT = new TextPaint();
-
- private static int TRIAL_COUNT = 100;
+ private static int TRIAL_COUNT = 10;
public PrecomputedTextMemoryUsageTest() {}
@@ -75,9 +59,10 @@
}
@Test
- public void testMemoryUsage_NoHyphenation() {
+ public void testMemoryUsage_Latin_NoHyphenation() {
+ TextPaint paint = new TextPaint();
int[] memories = new int[TRIAL_COUNT];
- final PrecomputedText.Params param = new PrecomputedText.Params.Builder(PAINT)
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
.build();
@@ -88,13 +73,14 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), param)
.getMemoryUsage();
}
- reportMemoryUsage(median(memories), "MemoryUsage_NoHyphenation");
+ reportMemoryUsage(median(memories), "MemoryUsage_Latin_NoHyphenation");
}
@Test
- public void testMemoryUsage_Hyphenation() {
+ public void testMemoryUsage_Latin_Hyphenation() {
+ TextPaint paint = new TextPaint();
int[] memories = new int[TRIAL_COUNT];
- final PrecomputedText.Params param = new PrecomputedText.Params.Builder(PAINT)
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
.build();
@@ -105,48 +91,97 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), param)
.getMemoryUsage();
}
- reportMemoryUsage(median(memories), "MemoryUsage_Hyphenation");
+ reportMemoryUsage(median(memories), "MemoryUsage_Latin_Hyphenation");
}
@Test
- public void testMemoryUsage_NoHyphenation_WidthOnly() {
+ public void testMemoryUsage_CJK_NoHyphenation() {
+ TextPaint paint = new TextPaint();
int[] memories = new int[TRIAL_COUNT];
- final PrecomputedText.Params param = new PrecomputedText.Params.Builder(PAINT)
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
.build();
// Report median of randomly generated PrecomputedText.
for (int i = 0; i < TRIAL_COUNT; ++i) {
- CharSequence cs = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
- PrecomputedText.ParagraphInfo[] paragraphInfo =
- PrecomputedText.createMeasuredParagraphs(cs, param, 0, cs.length(), false);
- memories[i] = 0;
- for (PrecomputedText.ParagraphInfo info : paragraphInfo) {
- memories[i] += info.measured.getMemoryUsage();
- }
+ memories[i] = PrecomputedText.create(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT, "[\\u4E00-\\u9FA0]"),
+ param).getMemoryUsage();
}
- reportMemoryUsage(median(memories), "MemoryUsage_NoHyphenation_WidthOnly");
+ reportMemoryUsage(median(memories), "MemoryUsage_CJK_NoHyphenation");
}
@Test
- public void testMemoryUsage_Hyphenatation_WidthOnly() {
+ public void testMemoryUsage_CJK_Hyphenation() {
+ TextPaint paint = new TextPaint();
int[] memories = new int[TRIAL_COUNT];
- final PrecomputedText.Params param = new PrecomputedText.Params.Builder(PAINT)
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
.build();
// Report median of randomly generated PrecomputedText.
for (int i = 0; i < TRIAL_COUNT; ++i) {
- CharSequence cs = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
- PrecomputedText.ParagraphInfo[] paragraphInfo =
- PrecomputedText.createMeasuredParagraphs(cs, param, 0, cs.length(), false);
- memories[i] = 0;
- for (PrecomputedText.ParagraphInfo info : paragraphInfo) {
- memories[i] += info.measured.getMemoryUsage();
- }
+ memories[i] = PrecomputedText.create(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT, "[\\u4E00-\\u9FA0]"),
+ param).getMemoryUsage();
}
- reportMemoryUsage(median(memories), "MemoryUsage_Hyphenation_WidthOnly");
+ reportMemoryUsage(median(memories), "MemoryUsage_CJK_Hyphenation");
+ }
+
+ @Test
+ public void testMemoryUsage_Arabic_NoHyphenation() {
+ TextPaint paint = new TextPaint();
+ paint.setTextLocale(Locale.forLanguageTag("ar"));
+ int[] memories = new int[TRIAL_COUNT];
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build();
+
+ // Report median of randomly generated PrecomputedText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = PrecomputedText.create(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT, "[\\u0600-\\u06FF]"),
+ param).getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_Arabic_NoHyphenation");
+ }
+
+ @Test
+ public void testMemoryUsage_Arabic_Hyphenation() {
+ TextPaint paint = new TextPaint();
+ paint.setTextLocale(Locale.forLanguageTag("ar"));
+ int[] memories = new int[TRIAL_COUNT];
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build();
+
+ // Report median of randomly generated PrecomputedText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = PrecomputedText.create(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT, "[\\u0600-\\u06FF]"),
+ param).getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_Arabic_Hyphenation");
+ }
+ @Test
+ public void testMemoryUsage_Emoji() {
+ TextPaint paint = new TextPaint();
+ int[] memories = new int[TRIAL_COUNT];
+ final PrecomputedText.Params param = new PrecomputedText.Params.Builder(paint)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .build();
+
+ // Report median of randomly generated PrecomputedText.
+ for (int i = 0; i < TRIAL_COUNT; ++i) {
+ memories[i] = PrecomputedText.create(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT, "[:emoji:]"),
+ param).getMemoryUsage();
+ }
+ reportMemoryUsage(median(memories), "MemoryUsage_Emoji_NoHyphenation");
}
}
diff --git a/apct-tests/perftests/core/src/android/text/PrecomputedTextPerfTest.java b/apct-tests/perftests/core/src/android/text/PrecomputedTextPerfTest.java
index 1cd0ae1..3be9114 100644
--- a/apct-tests/perftests/core/src/android/text/PrecomputedTextPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/PrecomputedTextPerfTest.java
@@ -16,30 +16,17 @@
package android.text;
-import static android.text.TextDirectionHeuristics.LTR;
-
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import android.content.res.ColorStateList;
-import android.graphics.Canvas;
-import android.graphics.Typeface;
-import android.text.Layout;
-import android.text.style.TextAppearanceSpan;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.nio.CharBuffer;
-import java.util.Random;
-
@LargeTest
@RunWith(AndroidJUnit4.class)
public class PrecomputedTextPerfTest {
diff --git a/apct-tests/perftests/core/src/android/text/StaticLayoutCreateDrawPerfTest.java b/apct-tests/perftests/core/src/android/text/StaticLayoutCreateDrawPerfTest.java
index bfdb758..6c92229 100644
--- a/apct-tests/perftests/core/src/android/text/StaticLayoutCreateDrawPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/StaticLayoutCreateDrawPerfTest.java
@@ -18,12 +18,13 @@
import static android.text.Layout.Alignment.ALIGN_NORMAL;
import android.graphics.Canvas;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
import android.text.NonEditableTextGenerator.TextType;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+
+import androidx.test.filters.LargeTest;
import org.junit.Rule;
import org.junit.Test;
@@ -50,7 +51,7 @@
@Rule
public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
- @Parameterized.Parameters(name = "cached={3},{1}chars,{0}")
+ @Parameterized.Parameters(name = "cached {3} {1}chars {0}")
public static Collection cases() {
final List<Object[]> params = new ArrayList<>();
for (int length : new int[]{128}) {
@@ -119,7 +120,7 @@
while (state.keepRunning()) {
state.pauseTiming();
- final DisplayListCanvas canvas = node.start(1200, 200);
+ final RecordingCanvas canvas = node.start(1200, 200);
int save = canvas.save();
if (!mCached) Canvas.freeTextLayoutCaches();
state.resumeTiming();
diff --git a/apct-tests/perftests/core/src/android/text/StaticLayoutGetOffsetForHorizontalPerfTest.java b/apct-tests/perftests/core/src/android/text/StaticLayoutGetOffsetForHorizontalPerfTest.java
new file mode 100644
index 0000000..47e04ef
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/text/StaticLayoutGetOffsetForHorizontalPerfTest.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package android.text;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@LargeTest
+@RunWith(AndroidJUnit4.class)
+public class StaticLayoutGetOffsetForHorizontalPerfTest {
+ private static final int WORD_LENGTH = 9; // Random word has 9 characters.
+ private static final int WORDS_IN_LINE = 64; // Roughly, 64 words in a line.
+ private static final boolean NO_STYLE_TEXT = false;
+ private static final boolean STYLE_TEXT = true;
+
+ private static TextPaint PAINT = new TextPaint();
+ static {
+ PAINT.setTextSize(16.0f);
+ }
+ private static final int TEXT_WIDTH = WORDS_IN_LINE * WORD_LENGTH * (int) PAINT.getTextSize();
+
+ public StaticLayoutGetOffsetForHorizontalPerfTest() {}
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ private TextPerfUtils mTextUtil = new TextPerfUtils();
+
+ @Before
+ public void setUp() {
+ mTextUtil.resetRandom(0 /* seed */);
+ }
+
+ @Test
+ public void testGetOffsetForHorizontal_LTR() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT,
+ "[a-zA-Z]");
+ StaticLayout layout =
+ StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
+ state.resumeTiming();
+
+ layout.getOffsetForHorizontal(0, TEXT_WIDTH / 2.0f);
+ }
+ }
+
+ @Test
+ public void testGetOffsetForHorizontal_RTL() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT,
+ "[:Arabic:]");
+ StaticLayout layout =
+ StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
+ state.resumeTiming();
+
+ layout.getOffsetForHorizontal(0, TEXT_WIDTH / 2.0f);
+ }
+ }
+
+ @Test
+ public void testGetOffsetForHorizontal_BiDi() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT,
+ "[[a-zA-Z][:Arabic:]]");
+ StaticLayout layout =
+ StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
+ state.resumeTiming();
+
+ layout.getOffsetForHorizontal(0, TEXT_WIDTH / 2.0f);
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/text/StaticLayoutMultithreadPerfTest.java b/apct-tests/perftests/core/src/android/text/StaticLayoutMultithreadPerfTest.java
index 60c6d89..0b79834 100644
--- a/apct-tests/perftests/core/src/android/text/StaticLayoutMultithreadPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/StaticLayoutMultithreadPerfTest.java
@@ -19,17 +19,16 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.util.Random;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
@LargeTest
@RunWith(AndroidJUnit4.class)
diff --git a/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java b/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
index e1a38a0..8a6c60f 100644
--- a/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java
@@ -16,30 +16,20 @@
package android.text;
-import static android.text.TextDirectionHeuristics.LTR;
-
+import android.graphics.Canvas;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-
-import android.content.res.ColorStateList;
-import android.graphics.Canvas;
-import android.graphics.Typeface;
-import android.text.Layout;
-import android.text.style.TextAppearanceSpan;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import java.nio.CharBuffer;
-import java.util.Random;
-
@LargeTest
@RunWith(AndroidJUnit4.class)
public class StaticLayoutPerfTest {
@@ -180,6 +170,25 @@
}
@Test
+ public void testCreate_PrecomputedText_NoStyled_Greedy_NoHyphenation_DirDifferent() {
+ final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ state.pauseTiming();
+ final PrecomputedText text = makeMeasured(
+ mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT,
+ Layout.BREAK_STRATEGY_SIMPLE, Layout.HYPHENATION_FREQUENCY_NONE);
+ Canvas.freeTextLayoutCaches();
+ state.resumeTiming();
+
+ StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH)
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE)
+ .setTextDirection(TextDirectionHeuristics.RTL)
+ .build();
+ }
+ }
+
+ @Test
public void testCreate_PrecomputedText_NoStyled_Greedy_Hyphenation() {
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
while (state.keepRunning()) {
@@ -256,10 +265,11 @@
state.pauseTiming();
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -272,10 +282,11 @@
final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -288,10 +299,11 @@
final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -304,11 +316,12 @@
final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
Canvas.freeTextLayoutCaches();
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -321,11 +334,12 @@
final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
Canvas.freeTextLayoutCaches();
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -339,10 +353,11 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -356,10 +371,11 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -373,11 +389,12 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
Canvas.freeTextLayoutCaches();
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
@@ -391,11 +408,12 @@
mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT);
final StaticLayout layout =
StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build();
- final DisplayListCanvas c = node.start(1200, 200);
+ final RecordingCanvas c = node.beginRecording(1200, 200);
Canvas.freeTextLayoutCaches();
state.resumeTiming();
layout.draw(c);
+ node.endRecording();
}
}
diff --git a/apct-tests/perftests/core/src/android/text/TextPerfUtils.java b/apct-tests/perftests/core/src/android/text/TextPerfUtils.java
index fefda64..2a98ebf 100644
--- a/apct-tests/perftests/core/src/android/text/TextPerfUtils.java
+++ b/apct-tests/perftests/core/src/android/text/TextPerfUtils.java
@@ -16,28 +16,14 @@
package android.text;
-import static android.text.TextDirectionHeuristics.LTR;
-
-import android.perftests.utils.BenchmarkState;
-import android.perftests.utils.PerfStatusReporter;
-
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-
import android.content.res.ColorStateList;
-import android.graphics.Canvas;
import android.graphics.Typeface;
-import android.text.Layout;
+import android.icu.text.UnicodeSet;
+import android.icu.text.UnicodeSetIterator;
import android.text.style.TextAppearanceSpan;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
import java.nio.CharBuffer;
+import java.util.ArrayList;
import java.util.Random;
public class TextPerfUtils {
@@ -46,8 +32,17 @@
private Random mRandom = new Random(0);
- private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
- private static final int ALPHABET_LENGTH = ALPHABET.length();
+ private static final String[] ALPHABET;
+ private static final int ALPHABET_LENGTH;
+ static {
+ String alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+ ALPHABET_LENGTH = alphabets.length();
+ ALPHABET = new String[ALPHABET_LENGTH];
+ for (int i = 0; i < ALPHABET_LENGTH; ++i) {
+ ALPHABET[i] = Character.toString(alphabets.charAt(i));
+ }
+ }
+
private static final ColorStateList TEXT_COLOR = ColorStateList.valueOf(0x00000000);
private static final String[] FAMILIES = { "sans-serif", "serif", "monospace" };
@@ -55,30 +50,64 @@
Typeface.NORMAL, Typeface.BOLD, Typeface.ITALIC, Typeface.BOLD_ITALIC
};
- private final char[] mBuffer = new char[PARA_LENGTH];
-
public void resetRandom(long seed) {
mRandom = new Random(seed);
}
+ private static String[] UnicodeSetToArray(String setStr) {
+ final UnicodeSet set = new UnicodeSet(setStr);
+ final UnicodeSetIterator iterator = new UnicodeSetIterator(set);
+ final ArrayList<String> out = new ArrayList<>(set.size());
+ while (iterator.next()) {
+ out.add(iterator.getString());
+ }
+ return out.toArray(new String[out.size()]);
+ }
+
+ public CharSequence nextRandomParagraph(int wordLen, boolean applyRandomStyle, String setStr) {
+ return nextRandomParagraph(wordLen, PARA_LENGTH, applyRandomStyle,
+ UnicodeSetToArray(setStr));
+ }
+
public CharSequence nextRandomParagraph(int wordLen, boolean applyRandomStyle) {
- for (int i = 0; i < PARA_LENGTH; i++) {
+ return nextRandomParagraph(wordLen, PARA_LENGTH, applyRandomStyle, ALPHABET);
+ }
+
+ public CharSequence nextRandomParagraph(int wordLen, int paraLength) {
+ return nextRandomParagraph(wordLen, paraLength, false /* no style */, ALPHABET);
+ }
+
+ public CharSequence nextRandomParagraph(int wordLen, int paraLength, boolean applyRandomStyle,
+ String[] charSet) {
+ ArrayList<Character> chars = new ArrayList<>();
+ ArrayList<Integer> wordOffsets = new ArrayList<>();
+ for (int i = 0; i < paraLength; i++) {
if (i % (wordLen + 1) == wordLen) {
- mBuffer[i] = ' ';
+ chars.add(' ');
+ wordOffsets.add(chars.size());
} else {
- mBuffer[i] = ALPHABET.charAt(mRandom.nextInt(ALPHABET_LENGTH));
+ final String str = charSet[mRandom.nextInt(charSet.length)];
+ for (int j = 0; j < str.length(); ++j) {
+ chars.add(str.charAt(j));
+ }
}
}
+ wordOffsets.add(chars.size());
- CharSequence cs = CharBuffer.wrap(mBuffer);
+ char[] buffer = new char[chars.size()];
+ for (int i = 0; i < buffer.length; ++i) {
+ buffer[i] = chars.get(i);
+ }
+ CharSequence cs = CharBuffer.wrap(buffer);
if (!applyRandomStyle) {
return cs;
}
SpannableStringBuilder ssb = new SpannableStringBuilder(cs);
- for (int i = 0; i < ssb.length(); i += wordLen + 1) {
- final int spanStart = i;
- final int spanEnd = (i + wordLen) > ssb.length() ? ssb.length() : i + wordLen;
+ int prevWordStart = 0;
+ for (int i = 0; i < wordOffsets.size(); i++) {
+ final int spanStart = prevWordStart;
+ final int spanEnd = wordOffsets.get(i);
final TextAppearanceSpan span = new TextAppearanceSpan(
FAMILIES[mRandom.nextInt(FAMILIES.length)],
@@ -87,6 +116,7 @@
TEXT_COLOR, TEXT_COLOR);
ssb.setSpan(span, spanStart, spanEnd, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
+ prevWordStart = spanEnd;
}
return ssb;
}
diff --git a/apct-tests/perftests/core/src/android/text/TextViewSetTextMeasurePerfTest.java b/apct-tests/perftests/core/src/android/text/TextViewSetTextMeasurePerfTest.java
index ff2d57e..10bfa42 100644
--- a/apct-tests/perftests/core/src/android/text/TextViewSetTextMeasurePerfTest.java
+++ b/apct-tests/perftests/core/src/android/text/TextViewSetTextMeasurePerfTest.java
@@ -19,15 +19,16 @@
import static android.view.View.MeasureSpec.UNSPECIFIED;
import android.graphics.Canvas;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
import android.text.NonEditableTextGenerator.TextType;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
import android.widget.TextView;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -51,7 +52,7 @@
@Rule
public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
- @Parameterized.Parameters(name = "cached={3},{1}chars,{0}")
+ @Parameterized.Parameters(name = "cached {3} {1}chars {0}")
public static Collection cases() {
final List<Object[]> params = new ArrayList<>();
for (int length : new int[]{128}) {
@@ -92,6 +93,8 @@
Canvas.freeTextLayoutCaches();
final CharSequence text = createRandomText(mLength);
final TextView textView = new TextView(InstrumentationRegistry.getTargetContext());
+ textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
+
textView.setText(text);
state.resumeTiming();
@@ -119,13 +122,14 @@
final RenderNode node = RenderNode.create("benchmark", null);
final CharSequence text = createRandomText(mLength);
final TextView textView = new TextView(InstrumentationRegistry.getTargetContext());
+ textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
textView.setText(text);
state.resumeTiming();
while (state.keepRunning()) {
state.pauseTiming();
- final DisplayListCanvas canvas = node.start(1200, 200);
+ final RecordingCanvas canvas = node.start(1200, 200);
int save = canvas.save();
textView.setTextLocale(Locale.UK);
textView.setTextLocale(Locale.US);
diff --git a/apct-tests/perftests/core/src/android/util/ArraySetPerfTest.java b/apct-tests/perftests/core/src/android/util/ArraySetPerfTest.java
new file mode 100644
index 0000000..b24bf42
--- /dev/null
+++ b/apct-tests/perftests/core/src/android/util/ArraySetPerfTest.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.util;
+
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.function.Predicate;
+
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class ArraySetPerfTest {
+ private static final int NUM_ITERATIONS = 100;
+ private static final int SET_SIZE_SMALL = 10;
+ private static final int SET_SIZE_LARGE = 50;
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ @Test
+ public void testValueAt_InBounds() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ ArraySet<Integer> set = new ArraySet<>();
+ set.add(0);
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ set.valueAt(0);
+ }
+ }
+ }
+
+ @Test
+ public void testValueAt_OutOfBounds_Negative() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ ArraySet<Integer> set = new ArraySet<>();
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ try {
+ set.valueAt(-1);
+ } catch (ArrayIndexOutOfBoundsException expected) {
+ // expected
+ }
+ }
+ }
+ }
+
+ /**
+ * Tests the case where ArraySet could index into its array even though the index is out of
+ * bounds.
+ */
+ @Test
+ public void testValueAt_OutOfBounds_EdgeCase() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ ArraySet<Integer> set = new ArraySet<>();
+ set.add(0);
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ try {
+ set.valueAt(1);
+ } catch (ArrayIndexOutOfBoundsException expected) {
+ // expected
+ }
+ }
+ }
+ }
+
+ /**
+ * This is the same code as testRemoveIf_Small_* without the removeIf in order to measure
+ * the performance of the rest of the code in the loop.
+ */
+ @Test
+ public void testRemoveIf_Small_Base() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> i % 2 == 0;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_SMALL; ++j) {
+ set.add(j);
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Small_RemoveNothing() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> false;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_SMALL; ++j) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Small_RemoveAll() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> true;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_SMALL; j++) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Small_RemoveHalf() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> i % 2 == 0;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_SMALL; ++j) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+
+ /**
+ * This is the same code as testRemoveIf_Large_* without the removeIf in order to measure
+ * the performance of the rest of the code in the loop.
+ */
+ @Test
+ public void testRemoveIf_Large_Base() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> i % 2 == 0;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_LARGE; ++j) {
+ set.add(j);
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Large_RemoveNothing() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> false;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_LARGE; ++j) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Large_RemoveAll() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> true;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_LARGE; ++j) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveIf_Large_RemoveHalf() {
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ Predicate<Integer> predicate = (i) -> i % 2 == 0;
+ while (state.keepRunning()) {
+ for (int i = 0; i < NUM_ITERATIONS; ++i) {
+ ArraySet<Integer> set = new ArraySet<>();
+ for (int j = 0; j < SET_SIZE_LARGE; ++j) {
+ set.add(j);
+ }
+ set.removeIf(predicate);
+ }
+ }
+ }
+}
diff --git a/apct-tests/perftests/core/src/android/util/perftests/LogPerfTest.java b/apct-tests/perftests/core/src/android/util/perftests/LogPerfTest.java
index 07cd33f..26cec95 100644
--- a/apct-tests/perftests/core/src/android/util/perftests/LogPerfTest.java
+++ b/apct-tests/perftests/core/src/android/util/perftests/LogPerfTest.java
@@ -18,11 +18,11 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-
import android.util.Log;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/apct-tests/perftests/core/src/android/view/ViewPerfTest.java b/apct-tests/perftests/core/src/android/view/ViewPerfTest.java
index 990be24..a1f8608 100644
--- a/apct-tests/perftests/core/src/android/view/ViewPerfTest.java
+++ b/apct-tests/perftests/core/src/android/view/ViewPerfTest.java
@@ -17,13 +17,13 @@
package android.view;
import android.content.Context;
-import android.content.res.Resources;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
import android.widget.FrameLayout;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
import com.android.perftests.core.R;
import org.junit.Rule;
diff --git a/apct-tests/perftests/core/src/android/view/ViewShowHidePerfTest.java b/apct-tests/perftests/core/src/android/view/ViewShowHidePerfTest.java
index 6159da4..b34001d 100644
--- a/apct-tests/perftests/core/src/android/view/ViewShowHidePerfTest.java
+++ b/apct-tests/perftests/core/src/android/view/ViewShowHidePerfTest.java
@@ -24,14 +24,15 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
import android.view.View.MeasureSpec;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -155,7 +156,7 @@
}
private void updateAndValidateDisplayList(View view) {
- boolean hasDisplayList = view.updateDisplayListIfDirty().isValid();
+ boolean hasDisplayList = view.updateDisplayListIfDirty().hasDisplayList();
assertTrue(hasDisplayList);
}
diff --git a/apct-tests/perftests/core/src/android/widget/EditTextBackspacePerfTest.java b/apct-tests/perftests/core/src/android/widget/EditTextBackspacePerfTest.java
index d219d3a..b3ea62a 100644
--- a/apct-tests/perftests/core/src/android/widget/EditTextBackspacePerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/EditTextBackspacePerfTest.java
@@ -19,14 +19,15 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
import android.text.Selection;
import android.view.KeyEvent;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/widget/EditTextCursorMovementPerfTest.java b/apct-tests/perftests/core/src/android/widget/EditTextCursorMovementPerfTest.java
index b6cf7d3..aa47d5b 100644
--- a/apct-tests/perftests/core/src/android/widget/EditTextCursorMovementPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/EditTextCursorMovementPerfTest.java
@@ -19,14 +19,15 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
import android.text.Selection;
import android.view.KeyEvent;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/core/src/android/widget/EditTextLongTextPerfTest.java b/apct-tests/perftests/core/src/android/widget/EditTextLongTextPerfTest.java
index ce0c357..e50016c 100644
--- a/apct-tests/perftests/core/src/android/widget/EditTextLongTextPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/EditTextLongTextPerfTest.java
@@ -16,10 +16,16 @@
package android.widget;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Locale;
-import java.util.Random;
+import android.app.Activity;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+import android.perftests.utils.StubActivity;
+import android.view.KeyEvent;
+import android.view.View.MeasureSpec;
+import android.view.ViewGroup;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
import org.junit.Rule;
import org.junit.Test;
@@ -27,22 +33,9 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
-import android.app.Activity;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.RenderNodeAnimator;
-import android.view.ViewGroup;
-import android.view.View.MeasureSpec;
-
-import android.perftests.utils.BenchmarkState;
-import android.perftests.utils.PerfStatusReporter;
-import android.perftests.utils.StubActivity;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.InstrumentationRegistry;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Random;
@LargeTest
@RunWith(Parameterized.class)
diff --git a/apct-tests/perftests/core/src/android/widget/LayoutPerfTest.java b/apct-tests/perftests/core/src/android/widget/LayoutPerfTest.java
index d570ef3..644095b 100644
--- a/apct-tests/perftests/core/src/android/widget/LayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/LayoutPerfTest.java
@@ -16,17 +16,26 @@
package android.widget;
+import static android.perftests.utils.LayoutUtils.gatherViewTree;
+import static android.perftests.utils.LayoutUtils.requestLayoutForAllNodes;
+import static android.view.View.MeasureSpec.AT_MOST;
+import static android.view.View.MeasureSpec.EXACTLY;
+import static android.view.View.MeasureSpec.UNSPECIFIED;
+
+import static org.junit.Assert.assertTrue;
+
import android.app.Activity;
import android.os.Looper;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
import android.view.View;
import android.view.ViewGroup;
+import androidx.test.annotation.UiThreadTest;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
import com.android.perftests.core.R;
import org.junit.Rule;
@@ -38,13 +47,6 @@
import java.util.Collection;
import java.util.List;
-import static android.perftests.utils.LayoutUtils.gatherViewTree;
-import static android.perftests.utils.LayoutUtils.requestLayoutForAllNodes;
-import static android.view.View.MeasureSpec.AT_MOST;
-import static android.view.View.MeasureSpec.EXACTLY;
-import static android.view.View.MeasureSpec.UNSPECIFIED;
-import static org.junit.Assert.assertTrue;
-
@LargeTest
@RunWith(Parameterized.class)
public class LayoutPerfTest {
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
index c310166..bed173b 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewAutoSizeLayoutPerfTest.java
@@ -16,33 +16,27 @@
package android.widget;
+import static org.junit.Assert.assertTrue;
+
import android.app.Activity;
import android.os.Looper;
-import android.os.Bundle;
-import android.perftests.utils.PerfStatusReporter;
-import android.util.Log;
-import android.view.View;
-
import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.InstrumentationRegistry;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
import com.android.perftests.core.R;
-import java.util.Locale;
-import java.util.Collection;
-import java.util.Arrays;
-
-import org.junit.Test;
import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
-import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
+import java.util.Arrays;
+import java.util.Collection;
@LargeTest
@RunWith(Parameterized.class)
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewFontFamilyLayoutPerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewFontFamilyLayoutPerfTest.java
index 4b6da6b..1f00838 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewFontFamilyLayoutPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewFontFamilyLayoutPerfTest.java
@@ -19,23 +19,21 @@
import android.content.Context;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.view.LayoutInflater;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
import com.android.perftests.core.R;
-import java.util.Collection;
-import java.util.Arrays;
-
-import org.junit.Test;
import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
-import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
+import java.util.Arrays;
+import java.util.Collection;
@LargeTest
@RunWith(Parameterized.class)
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewOnMeasurePerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewOnMeasurePerfTest.java
index a14dd25..88acbba 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewOnMeasurePerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewOnMeasurePerfTest.java
@@ -25,24 +25,20 @@
import android.graphics.Typeface;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.TextAppearanceSpan;
-import android.view.LayoutInflater;
-import com.android.perftests.core.R;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
-import java.util.Random;
-import java.util.Locale;
-
-import org.junit.Test;
import org.junit.Rule;
+import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
+import java.util.Locale;
+import java.util.Random;
@LargeTest
@RunWith(AndroidJUnit4.class)
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java
index dc34b7f..55d54e4 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java
@@ -16,46 +16,30 @@
package android.widget;
-import static android.view.View.MeasureSpec.AT_MOST;
-import static android.view.View.MeasureSpec.EXACTLY;
-import static android.view.View.MeasureSpec.UNSPECIFIED;
+import static android.widget.TextView.UNKNOWN_BORING;
import android.content.Context;
-import android.content.res.ColorStateList;
-import android.graphics.Typeface;
import android.graphics.Canvas;
+import android.graphics.RecordingCanvas;
+import android.graphics.RenderNode;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
-import android.text.PrecomputedText;
-import android.text.Layout;
import android.text.BoringLayout;
-import android.text.SpannableStringBuilder;
-import android.text.Spanned;
+import android.text.Layout;
+import android.text.PrecomputedText;
import android.text.TextPaint;
-import android.text.style.TextAppearanceSpan;
-import android.view.LayoutInflater;
import android.text.TextPerfUtils;
import android.view.View.MeasureSpec;
-import android.view.DisplayListCanvas;
-import android.view.RenderNode;
-import com.android.perftests.core.R;
-
-import java.util.Random;
-import java.util.Locale;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
-import org.junit.Test;
import org.junit.Rule;
+import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
-
-import static android.widget.TextView.UNKNOWN_BORING;
-
@LargeTest
@RunWith(AndroidJUnit4.class)
public class TextViewPrecomputedTextPerfTest {
@@ -360,13 +344,14 @@
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
- final DisplayListCanvas c = node.start(
+ final RecordingCanvas c = node.beginRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
+ node.endRecording();
}
}
@@ -386,13 +371,14 @@
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
- final DisplayListCanvas c = node.start(
+ final RecordingCanvas c = node.beginRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
+ node.endRecording();
}
}
@@ -414,13 +400,14 @@
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
- final DisplayListCanvas c = node.start(
+ final RecordingCanvas c = node.beginRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
+ node.endRecording();
}
}
@@ -443,13 +430,14 @@
textView.setText(text);
textView.measure(width, height);
textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
- final DisplayListCanvas c = node.start(
+ final RecordingCanvas c = node.beginRecording(
textView.getMeasuredWidth(), textView.getMeasuredHeight());
textView.nullLayouts();
Canvas.freeTextLayoutCaches();
state.resumeTiming();
textView.onDraw(c);
+ node.endRecording();
}
}
}
diff --git a/apct-tests/perftests/core/src/android/widget/TextViewSetTextLocalePerfTest.java b/apct-tests/perftests/core/src/android/widget/TextViewSetTextLocalePerfTest.java
index e95676b..00bd8db 100644
--- a/apct-tests/perftests/core/src/android/widget/TextViewSetTextLocalePerfTest.java
+++ b/apct-tests/perftests/core/src/android/widget/TextViewSetTextLocalePerfTest.java
@@ -19,8 +19,9 @@
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.perftests.utils.StubActivity;
-import android.support.test.filters.LargeTest;
-import android.support.test.rule.ActivityTestRule;
+
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
import org.junit.Rule;
import org.junit.Test;
diff --git a/apct-tests/perftests/multiuser/Android.bp b/apct-tests/perftests/multiuser/Android.bp
new file mode 100644
index 0000000..508bf60
--- /dev/null
+++ b/apct-tests/perftests/multiuser/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "MultiUserPerfTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "androidx.test.rules",
+ "apct-perftests-utils",
+ ],
+ platform_apis: true,
+ test_suites: ["device-tests"],
+ certificate: "platform",
+}
diff --git a/apct-tests/perftests/multiuser/Android.mk b/apct-tests/perftests/multiuser/Android.mk
deleted file mode 100644
index 9bc7d05..0000000
--- a/apct-tests/perftests/multiuser/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- ub-uiautomator
-
-LOCAL_PACKAGE_NAME := MultiUserPerfTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_COMPATIBILITY_SUITE += device-tests
-
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
-
diff --git a/apct-tests/perftests/multiuser/AndroidManifest.xml b/apct-tests/perftests/multiuser/AndroidManifest.xml
index adb316f..e96771c 100644
--- a/apct-tests/perftests/multiuser/AndroidManifest.xml
+++ b/apct-tests/perftests/multiuser/AndroidManifest.xml
@@ -25,7 +25,7 @@
<uses-library android:name="android.test.runner" />
</application>
- <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.perftests.multiuser"/>
</manifest>
diff --git a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResults.java b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResults.java
index e417ca7..c1362dc 100644
--- a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResults.java
+++ b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResults.java
@@ -60,11 +60,13 @@
if (size == 0) {
return 0f;
}
- Collections.sort(mResults);
+
+ final ArrayList<Long> resultsCopy = new ArrayList<>(mResults);
+ Collections.sort(resultsCopy);
final int idx = size / 2;
return size % 2 == 0
- ? (double) (mResults.get(idx) + mResults.get(idx - 1)) / 2
- : mResults.get(idx);
+ ? (double) (resultsCopy.get(idx) + resultsCopy.get(idx - 1)) / 2
+ : resultsCopy.get(idx);
}
private double standardDeviation() {
diff --git a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResultsReporter.java b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResultsReporter.java
index d3a3ce5..ba33e64 100644
--- a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResultsReporter.java
+++ b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkResultsReporter.java
@@ -18,9 +18,10 @@
import android.app.Activity;
import android.app.Instrumentation;
import android.os.Bundle;
-import android.support.test.InstrumentationRegistry;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
diff --git a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkRunner.java b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkRunner.java
index 629e6f4..7b65bfa 100644
--- a/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkRunner.java
+++ b/apct-tests/perftests/multiuser/src/android/multiuser/BenchmarkRunner.java
@@ -17,10 +17,8 @@
import android.os.Bundle;
import android.os.SystemClock;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.uiautomator.UiDevice;
+import android.perftests.utils.ShellHelper;
-import java.io.IOException;
import java.util.ArrayList;
// Based on //platform/frameworks/base/apct-tests/perftests/utils/BenchmarkState.java
@@ -74,12 +72,7 @@
private void prepareForNextRun() {
SystemClock.sleep(COOL_OFF_PERIOD_MS);
- try {
- UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
- .executeShellCommand("am wait-for-broadcast-idle");
- } catch (IOException e) {
- throw new IllegalStateException("Cannot execute shell command", e);
- }
+ ShellHelper.runShellCommand("am wait-for-broadcast-idle");
mStartTimeNs = System.nanoTime();
mPausedDurationNs = 0;
}
diff --git a/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java b/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
index 855be08..c121bd9 100644
--- a/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
+++ b/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
@@ -27,9 +27,11 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.LargeTest;
-import android.support.test.runner.AndroidJUnit4;
+import android.util.Log;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
@@ -50,7 +52,7 @@
* adb install -r \
* ${ANDROID_PRODUCT_OUT}/data/app/MultiUserPerfTests/MultiUserPerfTests.apk &&
* adb shell am instrument -e class android.multiuser.UserLifecycleTests \
- * -w com.android.perftests.multiuser/android.support.test.runner.AndroidJUnitRunner
+ * -w com.android.perftests.multiuser/androidx.test.runner.AndroidJUnitRunner
*
* or
*
@@ -129,6 +131,47 @@
}
}
+ /** Tests switching to an already-created, but no-longer-running, user. */
+ @Test
+ public void switchUser_stopped() throws Exception {
+ while (mRunner.keepRunning()) {
+ mRunner.pauseTiming();
+ final int startUser = mAm.getCurrentUser();
+ final int testUser = initializeNewUserAndSwitchBack(/* stopNewUser */ true);
+ final CountDownLatch latch = new CountDownLatch(1);
+ registerBroadcastReceiver(Intent.ACTION_USER_UNLOCKED, latch, testUser);
+ mRunner.resumeTiming();
+
+ mAm.switchUser(testUser);
+ boolean success = latch.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS);
+
+ mRunner.pauseTiming();
+ attestTrue("Failed to achieve 2nd ACTION_USER_UNLOCKED for user " + testUser, success);
+ switchUser(startUser);
+ removeUser(testUser);
+ mRunner.resumeTiming();
+ }
+ }
+
+ /** Tests switching to an already-created already-running non-owner user. */
+ @Test
+ public void switchUser_running() throws Exception {
+ while (mRunner.keepRunning()) {
+ mRunner.pauseTiming();
+ final int startUser = mAm.getCurrentUser();
+ final int testUser = initializeNewUserAndSwitchBack(/* stopNewUser */ false);
+ mRunner.resumeTiming();
+
+ switchUser(testUser);
+
+ mRunner.pauseTiming();
+ attestTrue("Failed to switch to user " + testUser, mAm.isUserRunning(testUser));
+ switchUser(startUser);
+ removeUser(testUser);
+ mRunner.resumeTiming();
+ }
+ }
+
@Test
public void stopUser() throws Exception {
while (mRunner.keepRunning()) {
@@ -187,6 +230,34 @@
}
}
+ /** Tests starting an already-created, but no-longer-running, profile. */
+ @Test
+ public void managedProfileUnlock_stopped() throws Exception {
+ while (mRunner.keepRunning()) {
+ mRunner.pauseTiming();
+ final UserInfo userInfo = mUm.createProfileForUser("TestUser",
+ UserInfo.FLAG_MANAGED_PROFILE, mAm.getCurrentUser());
+ // Start the profile initially, then stop it. Similar to setQuietModeEnabled.
+ final CountDownLatch latch1 = new CountDownLatch(1);
+ registerBroadcastReceiver(Intent.ACTION_USER_UNLOCKED, latch1, userInfo.id);
+ mIam.startUserInBackground(userInfo.id);
+ latch1.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS);
+ stopUser(userInfo.id, true);
+
+ // Now we restart the profile.
+ final CountDownLatch latch2 = new CountDownLatch(1);
+ registerBroadcastReceiver(Intent.ACTION_USER_UNLOCKED, latch2, userInfo.id);
+ mRunner.resumeTiming();
+
+ mIam.startUserInBackground(userInfo.id);
+ latch2.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS);
+
+ mRunner.pauseTiming();
+ removeUser(userInfo.id);
+ mRunner.resumeTiming();
+ }
+ }
+
@Test
public void ephemeralUserStopped() throws Exception {
while (mRunner.keepRunning()) {
@@ -261,6 +332,35 @@
latch.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS);
}
+ /**
+ * Creates a user and waits for its ACTION_USER_UNLOCKED.
+ * Then switches to back to the original user and waits for its switchUser() to finish.
+ *
+ * @param stopNewUser whether to stop the new user after switching to otherUser.
+ * @return userId of the newly created user.
+ */
+ private int initializeNewUserAndSwitchBack(boolean stopNewUser) throws Exception {
+ final int origUser = mAm.getCurrentUser();
+ // First, create and switch to testUser, waiting for its ACTION_USER_UNLOCKED
+ final int testUser = mUm.createUser("TestUser", 0).id;
+ final CountDownLatch latch1 = new CountDownLatch(1);
+ registerBroadcastReceiver(Intent.ACTION_USER_UNLOCKED, latch1, testUser);
+ mAm.switchUser(testUser);
+ attestTrue("Failed to achieve initial ACTION_USER_UNLOCKED for user " + testUser,
+ latch1.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS));
+
+ // Second, switch back to origUser, waiting merely for switchUser() to finish
+ switchUser(origUser);
+ attestTrue("Didn't switch back to user, " + origUser, origUser == mAm.getCurrentUser());
+
+ if (stopNewUser) {
+ stopUser(testUser, true);
+ attestFalse("Failed to stop user " + testUser, mAm.isUserRunning(testUser));
+ }
+
+ return testUser;
+ }
+
private void registerUserSwitchObserver(final CountDownLatch switchLatch,
final CountDownLatch bootCompleteLatch, final int userId) throws Exception {
ActivityManager.getService().registerUserSwitchObserver(
@@ -312,4 +412,14 @@
mUsersToRemove.add(userId);
}
}
+
+ private void attestTrue(String message, boolean attestion) {
+ if (!attestion) {
+ Log.w(TAG, message);
+ }
+ }
+
+ private void attestFalse(String message, boolean attestion) {
+ attestTrue(message, !attestion);
+ }
}
diff --git a/apct-tests/perftests/textclassifier/Android.bp b/apct-tests/perftests/textclassifier/Android.bp
new file mode 100644
index 0000000..49952dc
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "TextClassifierPerfTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "androidx.test.rules",
+ "androidx.annotation_annotation",
+ "apct-perftests-utils",
+ ],
+ platform_apis: true,
+ test_suites: ["device-tests"],
+}
diff --git a/apct-tests/perftests/textclassifier/AndroidManifest.xml b/apct-tests/perftests/textclassifier/AndroidManifest.xml
new file mode 100644
index 0000000..7cf487f
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.perftests.textclassifier">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.perftests.textclassifier"/>
+</manifest>
diff --git a/apct-tests/perftests/textclassifier/AndroidTest.xml b/apct-tests/perftests/textclassifier/AndroidTest.xml
new file mode 100644
index 0000000..3df51b8
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs TextClassifierPerfTests metric instrumentation.">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-metric-instrumentation" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="TextClassifierPerfTests.apk" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="com.android.perftests.textclassifier" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
diff --git a/apct-tests/perftests/textclassifier/run.sh b/apct-tests/perftests/textclassifier/run.sh
new file mode 100755
index 0000000..8660d26
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/run.sh
@@ -0,0 +1,8 @@
+set -e
+make TextClassifierPerfTests perf-setup.sh
+adb install ${OUT}/testcases/TextClassifierPerfTests/arm64/TextClassifierPerfTests.apk
+adb shell cmd package compile -m speed -f com.android.perftests.textclassifier
+adb push ${OUT}/obj/EXECUTABLES/perf-setup.sh_intermediates/perf-setup.sh /data/local/tmp/
+adb shell chmod +x /data/local/tmp/perf-setup.sh
+adb shell /data/local/tmp/perf-setup.sh
+adb shell am instrument -w -e package android.view.textclassifier com.android.perftests.textclassifier/androidx.test.runner.AndroidJUnitRunner
\ No newline at end of file
diff --git a/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java
new file mode 100644
index 0000000..bd3b673
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.view.textclassifier;
+
+import android.content.Context;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+import android.perftests.utils.SettingsHelper;
+import android.provider.Settings;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+
+@LargeTest
+public class TextClassificationManagerPerfTest {
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ @After
+ public void tearDown() {
+ SettingsHelper.delete(
+ SettingsHelper.NAMESPACE_GLOBAL, Settings.Global.TEXT_CLASSIFIER_CONSTANTS);
+ }
+
+ @Test
+ public void testGetTextClassifier_systemTextClassifierDisabled() {
+ Context context = InstrumentationRegistry.getTargetContext();
+ SettingsHelper.set(
+ SettingsHelper.NAMESPACE_GLOBAL,
+ Settings.Global.TEXT_CLASSIFIER_CONSTANTS,
+ "system_textclassifier_enabled=false");
+ TextClassificationManager textClassificationManager =
+ context.getSystemService(TextClassificationManager.class);
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ textClassificationManager.getTextClassifier();
+ textClassificationManager.invalidateForTesting();
+ }
+ }
+
+ @Test
+ public void testGetTextClassifier_systemTextClassifierEnabled() {
+ Context context = InstrumentationRegistry.getTargetContext();
+ SettingsHelper.set(
+ SettingsHelper.NAMESPACE_GLOBAL,
+ Settings.Global.TEXT_CLASSIFIER_CONSTANTS,
+ "system_textclassifier_enabled=true");
+ TextClassificationManager textClassificationManager =
+ context.getSystemService(TextClassificationManager.class);
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ textClassificationManager.getTextClassifier();
+ textClassificationManager.invalidateForTesting();
+ }
+ }
+}
diff --git a/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassifierPerfTest.java b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassifierPerfTest.java
new file mode 100644
index 0000000..14a121d
--- /dev/null
+++ b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassifierPerfTest.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.view.textclassifier;
+
+import android.content.Context;
+import android.perftests.utils.BenchmarkState;
+import android.perftests.utils.PerfStatusReporter;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.LargeTest;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Random;
+
+@RunWith(Parameterized.class)
+@LargeTest
+public class TextClassifierPerfTest {
+ /** Request contains meaning text, rather than garbled text. */
+ private static final int ACTUAL_REQUEST = 0;
+ private static final String RANDOM_CHAR_SET = "abcdefghijklmnopqrstuvwxyz0123456789";
+
+ @Rule
+ public PerfStatusReporter mPerfStatusReporter = new PerfStatusReporter();
+
+ @Parameterized.Parameters(name = "size{0}")
+ public static Collection<Object[]> data() {
+ return Arrays.asList(new Object[][]{{ACTUAL_REQUEST}, {10}, {100}, {1000}});
+ }
+
+ private TextClassifier mTextClassifier;
+ private final int mSize;
+
+ public TextClassifierPerfTest(int size) {
+ mSize = size;
+ }
+
+ @Before
+ public void setUp() {
+ Context context = InstrumentationRegistry.getTargetContext();
+ TextClassificationManager textClassificationManager =
+ context.getSystemService(TextClassificationManager.class);
+ mTextClassifier = textClassificationManager.getTextClassifier(TextClassifier.LOCAL);
+ }
+
+ @Test
+ public void testSuggestConversationActions() {
+ String text = mSize == ACTUAL_REQUEST ? "Where are you?" : generateRandomString(mSize);
+ ConversationActions.Request request = createConversationActionsRequest(text);
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mTextClassifier.suggestConversationActions(request);
+ }
+ }
+
+ @Test
+ public void testDetectLanguage() {
+ String text = mSize == ACTUAL_REQUEST
+ ? "これは日本語のテキストです" : generateRandomString(mSize);
+ TextLanguage.Request request = createTextLanguageRequest(text);
+ BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
+ while (state.keepRunning()) {
+ mTextClassifier.detectLanguage(request);
+ }
+ }
+
+ private static ConversationActions.Request createConversationActionsRequest(CharSequence text) {
+ ConversationActions.Message message =
+ new ConversationActions.Message.Builder(
+ ConversationActions.Message.PERSON_USER_OTHERS)
+ .setText(text)
+ .build();
+ return new ConversationActions.Request.Builder(Collections.singletonList(message))
+ .build();
+ }
+
+ private static TextLanguage.Request createTextLanguageRequest(CharSequence text) {
+ return new TextLanguage.Request.Builder(text).build();
+ }
+
+ private static String generateRandomString(int length) {
+ Random random = new Random();
+ StringBuilder stringBuilder = new StringBuilder(length);
+ for (int i = 0; i < length; i++) {
+ int index = random.nextInt(RANDOM_CHAR_SET.length());
+ stringBuilder.append(RANDOM_CHAR_SET.charAt(index));
+ }
+ return stringBuilder.toString();
+ }
+}
diff --git a/apct-tests/perftests/utils/Android.bp b/apct-tests/perftests/utils/Android.bp
new file mode 100644
index 0000000..be85816
--- /dev/null
+++ b/apct-tests/perftests/utils/Android.bp
@@ -0,0 +1,9 @@
+java_library {
+ name: "apct-perftests-utils",
+ static_libs: [
+ "androidx.test.rules",
+ "androidx.annotation_annotation",
+ ],
+ // Build all java files in the java subdirectory
+ srcs: ["**/*.java"],
+}
diff --git a/apct-tests/perftests/utils/Android.mk b/apct-tests/perftests/utils/Android.mk
deleted file mode 100644
index 55c13b0..0000000
--- a/apct-tests/perftests/utils/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test
-
-# Build all java files in the java subdirectory
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-# The name of the jar file to create
-LOCAL_MODULE := apct-perftests-utils
-
-# Build a static jar file.
-include $(BUILD_STATIC_JAVA_LIBRARY)
\ No newline at end of file
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/BenchmarkState.java b/apct-tests/perftests/utils/src/android/perftests/utils/BenchmarkState.java
index da17818..93bf541 100644
--- a/apct-tests/perftests/utils/src/android/perftests/utils/BenchmarkState.java
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/BenchmarkState.java
@@ -20,9 +20,10 @@
import android.app.Instrumentation;
import android.os.Bundle;
import android.os.Debug;
-import android.support.test.InstrumentationRegistry;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+
import java.io.File;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/OneTimeSettingsListener.java b/apct-tests/perftests/utils/src/android/perftests/utils/OneTimeSettingsListener.java
new file mode 100644
index 0000000..37af4c7
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/OneTimeSettingsListener.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.perftests.utils;
+
+import static android.perftests.utils.SettingsHelper.NAMESPACE_SECURE;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.provider.Settings;
+
+import androidx.annotation.NonNull;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Helper used to block tests until a secure settings value has been updated.
+ */
+public final class OneTimeSettingsListener extends ContentObserver {
+ private final CountDownLatch mLatch = new CountDownLatch(1);
+ private final ContentResolver mResolver;
+ private final String mKey;
+ private final int mTimeoutMs;
+
+ public OneTimeSettingsListener(@NonNull Context context, @NonNull String namespace,
+ @NonNull String key, int timeoutMs) {
+ super(new Handler(Looper.getMainLooper()));
+ mKey = key;
+ mResolver = context.getContentResolver();
+ mTimeoutMs = timeoutMs;
+ final Uri uri;
+ switch (namespace) {
+ case NAMESPACE_SECURE:
+ uri = Settings.Secure.getUriFor(key);
+ break;
+ default:
+ throw new IllegalArgumentException("invalid namespace: " + namespace);
+ }
+ mResolver.registerContentObserver(uri, false, this);
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri) {
+ mResolver.unregisterContentObserver(this);
+ mLatch.countDown();
+ }
+
+ /**
+ * Blocks for a few seconds until it's called, or throws an {@link IllegalStateException} if
+ * it isn't.
+ */
+ public void assertCalled() {
+ try {
+ final boolean updated = mLatch.await(mTimeoutMs, TimeUnit.MILLISECONDS);
+ if (!updated) {
+ throw new IllegalStateException(
+ "Settings " + mKey + " not called in " + mTimeoutMs + "ms");
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw new IllegalStateException("Interrupted", e);
+ }
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/PerfManualStatusReporter.java b/apct-tests/perftests/utils/src/android/perftests/utils/PerfManualStatusReporter.java
index 0de6f1d..8187c6f 100644
--- a/apct-tests/perftests/utils/src/android/perftests/utils/PerfManualStatusReporter.java
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/PerfManualStatusReporter.java
@@ -16,7 +16,7 @@
package android.perftests.utils;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/PerfStatusReporter.java b/apct-tests/perftests/utils/src/android/perftests/utils/PerfStatusReporter.java
index 64b0bf5..d54a851 100644
--- a/apct-tests/perftests/utils/src/android/perftests/utils/PerfStatusReporter.java
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/PerfStatusReporter.java
@@ -16,15 +16,17 @@
package android.perftests.utils;
-import android.support.test.InstrumentationRegistry;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import android.util.Log;
+
+import androidx.test.InstrumentationRegistry;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-
/**
* Use this rule to make sure we report the status after the test success.
*
@@ -49,6 +51,7 @@
*/
public class PerfStatusReporter implements TestRule {
+ private static final String TAG = "PerfStatusReporter";
private final BenchmarkState mState = new BenchmarkState();
public BenchmarkState getBenchmarkState() {
@@ -61,6 +64,8 @@
@Override
public void evaluate() throws Throwable {
String invokeMethodName = description.getMethodName();
+ Log.i(TAG, "Running " + description.getClassName() + "#" + invokeMethodName);
+
// validate and simplify the function name.
// First, remove the "test" prefix which normally comes from CTS test.
// Then make sure the [subTestName] is valid, not just numbers like [0].
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/SettingsHelper.java b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsHelper.java
new file mode 100644
index 0000000..9835886
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsHelper.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.perftests.utils;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import java.util.Objects;
+
+/**
+ * Provides utilities to interact with the device's {@link Settings}.
+ */
+public final class SettingsHelper {
+
+ public static final String NAMESPACE_SECURE = "secure";
+ public static final String NAMESPACE_GLOBAL = "global";
+
+ private static int DEFAULT_TIMEOUT_MS = 5000;
+
+ /**
+ * Uses a Shell command to "asynchronously" set the given preference, returning right away.
+ */
+ public static void set(@NonNull String namespace, @NonNull String key, @Nullable String value) {
+ if (value == null) {
+ delete(namespace, key);
+ return;
+ }
+ ShellHelper.runShellCommand("settings put %s %s %s default", namespace, key, value);
+ }
+
+ /**
+ * Uses a Shell command to "synchronously" set the given preference by registering a listener
+ * and wait until it's set.
+ */
+ public static void syncSet(@NonNull Context context, @NonNull String namespace,
+ @NonNull String key, @Nullable String value) {
+ if (value == null) {
+ syncDelete(context, namespace, key);
+ return;
+ }
+
+ String currentValue = get(namespace, key);
+ if (value.equals(currentValue)) {
+ // Already set, ignore
+ return;
+ }
+
+ OneTimeSettingsListener observer = new OneTimeSettingsListener(context, namespace, key,
+ DEFAULT_TIMEOUT_MS);
+ set(namespace, key, value);
+ observer.assertCalled();
+ assertNewValue(namespace, key, value);
+ }
+
+ /**
+ * Uses a Shell command to "asynchronously" delete the given preference, returning right away.
+ */
+ public static void delete(@NonNull String namespace, @NonNull String key) {
+ ShellHelper.runShellCommand("settings delete %s %s", namespace, key);
+ }
+
+ /**
+ * Uses a Shell command to "synchronously" delete the given preference by registering a listener
+ * and wait until it's called.
+ */
+ public static void syncDelete(@NonNull Context context, @NonNull String namespace,
+ @NonNull String key) {
+ String currentValue = get(namespace, key);
+ if (currentValue == null || currentValue.equals("null")) {
+ // Already set, ignore
+ return;
+ }
+
+ OneTimeSettingsListener observer = new OneTimeSettingsListener(context, namespace, key,
+ DEFAULT_TIMEOUT_MS);
+ delete(namespace, key);
+ observer.assertCalled();
+ assertNewValue(namespace, key, "null");
+ }
+
+ /**
+ * Gets the value of a given preference using Shell command.
+ */
+ @NonNull
+ public static String get(@NonNull String namespace, @NonNull String key) {
+ return ShellHelper.runShellCommand("settings get %s %s", namespace, key);
+ }
+
+ private static void assertNewValue(@NonNull String namespace, @NonNull String key,
+ @Nullable String expectedValue) {
+ String actualValue = get(namespace, key);
+ if (!Objects.equals(actualValue, expectedValue)) {
+ throw new AssertionError("invalid value for " + namespace + ":" + key + ": expected '"
+ + actualValue + "' , got '" + expectedValue + "'");
+ }
+ }
+
+ private SettingsHelper() {
+ throw new UnsupportedOperationException("contain static methods only");
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateKeeperRule.java b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateKeeperRule.java
new file mode 100644
index 0000000..a8e2fdf
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateKeeperRule.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.perftests.utils;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.annotation.NonNull;
+
+/**
+ * JUnit rule used to restore a {@link Settings} preference after the test is run.
+ *
+ * <p>It stores the current value before the test, and restores it after the test (if necessary).
+ */
+public class SettingsStateKeeperRule extends StateKeeperRule<String> {
+
+ /**
+ * Default constructor.
+ *
+ * @param context context used to retrieve the {@link Settings} provider.
+ * @param key prefence key.
+ */
+ public SettingsStateKeeperRule(@NonNull Context context, @NonNull String key) {
+ super(new SettingsStateManager(context, SettingsHelper.NAMESPACE_SECURE, key));
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateManager.java b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateManager.java
new file mode 100644
index 0000000..13ad66a
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/SettingsStateManager.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.perftests.utils;
+
+import android.content.Context;
+import android.provider.Settings;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+/**
+ * Manages the state of a preference backed by {@link Settings}.
+ */
+public class SettingsStateManager implements StateManager<String> {
+
+ private final Context mContext;
+ private final String mNamespace;
+ private final String mKey;
+
+ /**
+ * Default constructor.
+ *
+ * @param context context used to retrieve the {@link Settings} provider.
+ * @param namespace settings namespace.
+ * @param key prefence key.
+ */
+ public SettingsStateManager(@NonNull Context context, @NonNull String namespace,
+ @NonNull String key) {
+ mContext = context;
+ mNamespace = namespace;
+ mKey = key;
+ }
+
+ @Override
+ public void set(@Nullable String value) {
+ SettingsHelper.syncSet(mContext, mNamespace, mKey, value);
+ }
+
+ @Override
+ @Nullable
+ public String get() {
+ return SettingsHelper.get(mNamespace, mKey);
+ }
+
+ @Override
+ public String toString() {
+ return "SettingsStateManager[namespace=" + mNamespace + ", key=" + mKey + "]";
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/ShellHelper.java b/apct-tests/perftests/utils/src/android/perftests/utils/ShellHelper.java
new file mode 100644
index 0000000..7b52576
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/ShellHelper.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.perftests.utils;
+
+import android.app.UiAutomation;
+import android.os.ParcelFileDescriptor;
+import android.text.TextUtils;
+import android.util.AndroidRuntimeException;
+
+import androidx.annotation.NonNull;
+import androidx.test.InstrumentationRegistry;
+
+import java.io.FileInputStream;
+
+/**
+ * Provides Shell-based utilities such as running a command.
+ */
+public final class ShellHelper {
+
+ /**
+ * Runs a Shell command, returning a trimmed response.
+ */
+ @NonNull
+ public static String runShellCommand(@NonNull String template, Object...args) {
+ String command = String.format(template, args);
+ return runShellCommandRaw(command);
+ }
+
+ /**
+ * Runs a Shell command, returning a trimmed response.
+ */
+ @NonNull
+ public static String runShellCommandRaw(@NonNull String command) {
+ UiAutomation automan = InstrumentationRegistry.getInstrumentation()
+ .getUiAutomation();
+ ParcelFileDescriptor pfd = automan.executeShellCommand(command);
+ byte[] buf = new byte[512];
+ int bytesRead;
+ try(FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd)) {
+ StringBuilder stdout = new StringBuilder();
+ while ((bytesRead = fis.read(buf)) != -1) {
+ stdout.append(new String(buf, 0, bytesRead));
+ }
+ String result = stdout.toString();
+ return TextUtils.isEmpty(result) ? "" : result.trim();
+ } catch (Exception e) {
+ throw new AndroidRuntimeException("Command '" + command + "' failed: ", e);
+ } finally {
+ // Must disconnect UI automation after every call, otherwise its accessibility service
+ // skews the performance tests.
+ automan.destroy();
+ }
+ }
+
+ private ShellHelper() {
+ throw new UnsupportedOperationException("contain static methods only");
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/StateKeeperRule.java b/apct-tests/perftests/utils/src/android/perftests/utils/StateKeeperRule.java
new file mode 100644
index 0000000..1bb09b2
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/StateKeeperRule.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.perftests.utils;
+
+import androidx.annotation.NonNull;
+
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import java.util.Objects;
+
+/**
+ * JUnit rule used to restore a state after the test is run.
+ *
+ * <p>It stores the current state before the test, and restores it after the test (if necessary).
+ */
+public class StateKeeperRule<T> implements TestRule {
+
+ private final StateManager<T> mStateManager;
+
+ /**
+ * Default constructor.
+ *
+ * @param stateManager abstraction used to manage the state.
+ */
+ public StateKeeperRule(StateManager<T> stateManager) {
+ mStateManager = stateManager;
+ }
+
+ @Override
+ public Statement apply(Statement base, Description description) {
+ return new Statement() {
+
+ @Override
+ public void evaluate() throws Throwable {
+ final T previousValue = mStateManager.get();
+ try {
+ base.evaluate();
+ } finally {
+ final T currentValue = mStateManager.get();
+ if (!Objects.equals(previousValue, currentValue)) {
+ mStateManager.set(previousValue);
+ }
+ }
+ }
+ };
+ }
+}
diff --git a/apct-tests/perftests/utils/src/android/perftests/utils/StateManager.java b/apct-tests/perftests/utils/src/android/perftests/utils/StateManager.java
new file mode 100644
index 0000000..5fc499a
--- /dev/null
+++ b/apct-tests/perftests/utils/src/android/perftests/utils/StateManager.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.perftests.utils;
+
+import androidx.annotation.Nullable;
+
+/**
+ * Abstraction for a state that is managed somewhere, like Android Settings.
+ */
+public interface StateManager<T> {
+
+ /**
+ * Sets a new state.
+ */
+ void set(@Nullable T value);
+
+ /**
+ * Gets the current state.
+ */
+ @Nullable T get();
+}
diff --git a/api/TEST_MAPPING b/api/TEST_MAPPING
new file mode 100644
index 0000000..3a2e528
--- /dev/null
+++ b/api/TEST_MAPPING
@@ -0,0 +1,15 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsCurrentApiSignatureTestCases"
+ },
+ {
+ "name": "CtsSystemApiSignatureTestCases"
+ }
+ ],
+ "imports": [
+ {
+ "path": "vendor/xts/gts-tests/hostsidetests/api"
+ }
+ ]
+}
diff --git a/api/current.txt b/api/current.txt
index 557d536..cd78602 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1,3 +1,4 @@
+// Signature format: 2.0
package android {
public final class Manifest {
@@ -6,171 +7,179 @@
public static final class Manifest.permission {
ctor public Manifest.permission();
- field public static final java.lang.String ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
- field public static final java.lang.String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
- field public static final java.lang.String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
- field public static final java.lang.String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
- field public static final java.lang.String ACCESS_LOCATION_EXTRA_COMMANDS = "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS";
- field public static final java.lang.String ACCESS_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE";
- field public static final java.lang.String ACCESS_NOTIFICATION_POLICY = "android.permission.ACCESS_NOTIFICATION_POLICY";
- field public static final java.lang.String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
- field public static final java.lang.String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
- field public static final java.lang.String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
- field public static final java.lang.String ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS";
- field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
- field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
- field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
- field public static final java.lang.String BIND_AUTOFILL_SERVICE = "android.permission.BIND_AUTOFILL_SERVICE";
- field public static final deprecated java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
- field public static final java.lang.String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
- field public static final java.lang.String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
- field public static final java.lang.String BIND_CONDITION_PROVIDER_SERVICE = "android.permission.BIND_CONDITION_PROVIDER_SERVICE";
- field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
- field public static final java.lang.String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE";
- field public static final java.lang.String BIND_INCALL_SERVICE = "android.permission.BIND_INCALL_SERVICE";
- field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
- field public static final java.lang.String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_SERVICE";
- field public static final java.lang.String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
- field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
- field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
- field public static final java.lang.String BIND_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
- field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
- field public static final java.lang.String BIND_SCREENING_SERVICE = "android.permission.BIND_SCREENING_SERVICE";
- field public static final java.lang.String BIND_TELECOM_CONNECTION_SERVICE = "android.permission.BIND_TELECOM_CONNECTION_SERVICE";
- field public static final java.lang.String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
- field public static final java.lang.String BIND_TV_INPUT = "android.permission.BIND_TV_INPUT";
- field public static final java.lang.String BIND_VISUAL_VOICEMAIL_SERVICE = "android.permission.BIND_VISUAL_VOICEMAIL_SERVICE";
- field public static final java.lang.String BIND_VOICE_INTERACTION = "android.permission.BIND_VOICE_INTERACTION";
- field public static final java.lang.String BIND_VPN_SERVICE = "android.permission.BIND_VPN_SERVICE";
- field public static final java.lang.String BIND_VR_LISTENER_SERVICE = "android.permission.BIND_VR_LISTENER_SERVICE";
- field public static final java.lang.String BIND_WALLPAPER = "android.permission.BIND_WALLPAPER";
- field public static final java.lang.String BLUETOOTH = "android.permission.BLUETOOTH";
- field public static final java.lang.String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";
- field public static final java.lang.String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
- field public static final java.lang.String BODY_SENSORS = "android.permission.BODY_SENSORS";
- field public static final java.lang.String BROADCAST_PACKAGE_REMOVED = "android.permission.BROADCAST_PACKAGE_REMOVED";
- field public static final java.lang.String BROADCAST_SMS = "android.permission.BROADCAST_SMS";
- field public static final java.lang.String BROADCAST_STICKY = "android.permission.BROADCAST_STICKY";
- field public static final java.lang.String BROADCAST_WAP_PUSH = "android.permission.BROADCAST_WAP_PUSH";
- field public static final java.lang.String CALL_PHONE = "android.permission.CALL_PHONE";
- field public static final java.lang.String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
- field public static final java.lang.String CAMERA = "android.permission.CAMERA";
- field public static final java.lang.String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
- field public static final java.lang.String CAPTURE_SECURE_VIDEO_OUTPUT = "android.permission.CAPTURE_SECURE_VIDEO_OUTPUT";
- field public static final java.lang.String CAPTURE_VIDEO_OUTPUT = "android.permission.CAPTURE_VIDEO_OUTPUT";
- field public static final java.lang.String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
- field public static final java.lang.String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
- field public static final java.lang.String CHANGE_NETWORK_STATE = "android.permission.CHANGE_NETWORK_STATE";
- field public static final java.lang.String CHANGE_WIFI_MULTICAST_STATE = "android.permission.CHANGE_WIFI_MULTICAST_STATE";
- field public static final java.lang.String CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE";
- field public static final java.lang.String CLEAR_APP_CACHE = "android.permission.CLEAR_APP_CACHE";
- field public static final java.lang.String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES";
- field public static final java.lang.String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES";
- field public static final java.lang.String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES";
- field public static final java.lang.String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
- field public static final java.lang.String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD";
- field public static final java.lang.String DUMP = "android.permission.DUMP";
- field public static final java.lang.String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
- field public static final java.lang.String FACTORY_TEST = "android.permission.FACTORY_TEST";
- field public static final java.lang.String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
- field public static final java.lang.String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
- field public static final java.lang.String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
- field public static final java.lang.String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE";
- field public static final deprecated java.lang.String GET_TASKS = "android.permission.GET_TASKS";
- field public static final java.lang.String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
- field public static final java.lang.String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
- field public static final java.lang.String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
- field public static final java.lang.String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
- field public static final java.lang.String INSTANT_APP_FOREGROUND_SERVICE = "android.permission.INSTANT_APP_FOREGROUND_SERVICE";
- field public static final java.lang.String INTERNET = "android.permission.INTERNET";
- field public static final java.lang.String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
- field public static final java.lang.String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
- field public static final java.lang.String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
- field public static final java.lang.String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
- field public static final java.lang.String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
- field public static final java.lang.String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
- field public static final java.lang.String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
- field public static final java.lang.String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
- field public static final java.lang.String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
- field public static final java.lang.String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
- field public static final java.lang.String NFC = "android.permission.NFC";
- field public static final java.lang.String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
- field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
- field public static final deprecated java.lang.String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
- field public static final java.lang.String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
- field public static final java.lang.String READ_CALENDAR = "android.permission.READ_CALENDAR";
- field public static final java.lang.String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
- field public static final java.lang.String READ_CONTACTS = "android.permission.READ_CONTACTS";
- field public static final java.lang.String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
- field public static final java.lang.String READ_FRAME_BUFFER = "android.permission.READ_FRAME_BUFFER";
- field public static final deprecated java.lang.String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
- field public static final java.lang.String READ_LOGS = "android.permission.READ_LOGS";
- field public static final java.lang.String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
- field public static final java.lang.String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
- field public static final java.lang.String READ_SMS = "android.permission.READ_SMS";
- field public static final java.lang.String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
- field public static final java.lang.String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
- field public static final java.lang.String READ_VOICEMAIL = "com.android.voicemail.permission.READ_VOICEMAIL";
- field public static final java.lang.String REBOOT = "android.permission.REBOOT";
- field public static final java.lang.String RECEIVE_BOOT_COMPLETED = "android.permission.RECEIVE_BOOT_COMPLETED";
- field public static final java.lang.String RECEIVE_MMS = "android.permission.RECEIVE_MMS";
- field public static final java.lang.String RECEIVE_SMS = "android.permission.RECEIVE_SMS";
- field public static final java.lang.String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH";
- field public static final java.lang.String RECORD_AUDIO = "android.permission.RECORD_AUDIO";
- field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS";
- field public static final java.lang.String REQUEST_COMPANION_RUN_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND";
- field public static final java.lang.String REQUEST_COMPANION_USE_DATA_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND";
- field public static final java.lang.String REQUEST_DELETE_PACKAGES = "android.permission.REQUEST_DELETE_PACKAGES";
- field public static final java.lang.String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
- field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
- field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
- field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
- field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
- field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
- field public static final java.lang.String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH";
- field public static final java.lang.String SET_ANIMATION_SCALE = "android.permission.SET_ANIMATION_SCALE";
- field public static final java.lang.String SET_DEBUG_APP = "android.permission.SET_DEBUG_APP";
- field public static final deprecated java.lang.String SET_PREFERRED_APPLICATIONS = "android.permission.SET_PREFERRED_APPLICATIONS";
- field public static final java.lang.String SET_PROCESS_LIMIT = "android.permission.SET_PROCESS_LIMIT";
- field public static final java.lang.String SET_TIME = "android.permission.SET_TIME";
- field public static final java.lang.String SET_TIME_ZONE = "android.permission.SET_TIME_ZONE";
- field public static final java.lang.String SET_WALLPAPER = "android.permission.SET_WALLPAPER";
- field public static final java.lang.String SET_WALLPAPER_HINTS = "android.permission.SET_WALLPAPER_HINTS";
- field public static final java.lang.String SIGNAL_PERSISTENT_PROCESSES = "android.permission.SIGNAL_PERSISTENT_PROCESSES";
- field public static final java.lang.String STATUS_BAR = "android.permission.STATUS_BAR";
- field public static final java.lang.String SYSTEM_ALERT_WINDOW = "android.permission.SYSTEM_ALERT_WINDOW";
- field public static final java.lang.String TRANSMIT_IR = "android.permission.TRANSMIT_IR";
- field public static final java.lang.String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
- field public static final java.lang.String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
- field public static final java.lang.String USE_BIOMETRIC = "android.permission.USE_BIOMETRIC";
- field public static final deprecated java.lang.String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
- field public static final java.lang.String USE_SIP = "android.permission.USE_SIP";
- field public static final java.lang.String VIBRATE = "android.permission.VIBRATE";
- field public static final java.lang.String WAKE_LOCK = "android.permission.WAKE_LOCK";
- field public static final java.lang.String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
- field public static final java.lang.String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
- field public static final java.lang.String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
- field public static final java.lang.String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
- field public static final java.lang.String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
- field public static final java.lang.String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
- field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
- field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
- field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
- field public static final java.lang.String WRITE_VOICEMAIL = "com.android.voicemail.permission.WRITE_VOICEMAIL";
+ field public static final String ACCEPT_HANDOVER = "android.permission.ACCEPT_HANDOVER";
+ field public static final String ACCESS_BACKGROUND_LOCATION = "android.permission.ACCESS_BACKGROUND_LOCATION";
+ field public static final String ACCESS_CHECKIN_PROPERTIES = "android.permission.ACCESS_CHECKIN_PROPERTIES";
+ field public static final String ACCESS_COARSE_LOCATION = "android.permission.ACCESS_COARSE_LOCATION";
+ field public static final String ACCESS_FINE_LOCATION = "android.permission.ACCESS_FINE_LOCATION";
+ field public static final String ACCESS_LOCATION_EXTRA_COMMANDS = "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS";
+ field public static final String ACCESS_MEDIA_LOCATION = "android.permission.ACCESS_MEDIA_LOCATION";
+ field public static final String ACCESS_NETWORK_STATE = "android.permission.ACCESS_NETWORK_STATE";
+ field public static final String ACCESS_NOTIFICATION_POLICY = "android.permission.ACCESS_NOTIFICATION_POLICY";
+ field public static final String ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
+ field public static final String ACCOUNT_MANAGER = "android.permission.ACCOUNT_MANAGER";
+ field public static final String ACTIVITY_RECOGNITION = "android.permission.ACTIVITY_RECOGNITION";
+ field public static final String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL";
+ field public static final String ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS";
+ field public static final String BATTERY_STATS = "android.permission.BATTERY_STATS";
+ field public static final String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
+ field public static final String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
+ field public static final String BIND_AUTOFILL_SERVICE = "android.permission.BIND_AUTOFILL_SERVICE";
+ field public static final String BIND_CALL_REDIRECTION_SERVICE = "android.permission.BIND_CALL_REDIRECTION_SERVICE";
+ field public static final String BIND_CARRIER_MESSAGING_CLIENT_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE";
+ field @Deprecated public static final String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
+ field public static final String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
+ field public static final String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
+ field public static final String BIND_CONDITION_PROVIDER_SERVICE = "android.permission.BIND_CONDITION_PROVIDER_SERVICE";
+ field public static final String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
+ field public static final String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE";
+ field public static final String BIND_INCALL_SERVICE = "android.permission.BIND_INCALL_SERVICE";
+ field public static final String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
+ field public static final String BIND_MIDI_DEVICE_SERVICE = "android.permission.BIND_MIDI_DEVICE_SERVICE";
+ field public static final String BIND_NFC_SERVICE = "android.permission.BIND_NFC_SERVICE";
+ field public static final String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
+ field public static final String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
+ field public static final String BIND_QUICK_SETTINGS_TILE = "android.permission.BIND_QUICK_SETTINGS_TILE";
+ field public static final String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
+ field public static final String BIND_SCREENING_SERVICE = "android.permission.BIND_SCREENING_SERVICE";
+ field public static final String BIND_TELECOM_CONNECTION_SERVICE = "android.permission.BIND_TELECOM_CONNECTION_SERVICE";
+ field public static final String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
+ field public static final String BIND_TV_INPUT = "android.permission.BIND_TV_INPUT";
+ field public static final String BIND_VISUAL_VOICEMAIL_SERVICE = "android.permission.BIND_VISUAL_VOICEMAIL_SERVICE";
+ field public static final String BIND_VOICE_INTERACTION = "android.permission.BIND_VOICE_INTERACTION";
+ field public static final String BIND_VPN_SERVICE = "android.permission.BIND_VPN_SERVICE";
+ field public static final String BIND_VR_LISTENER_SERVICE = "android.permission.BIND_VR_LISTENER_SERVICE";
+ field public static final String BIND_WALLPAPER = "android.permission.BIND_WALLPAPER";
+ field public static final String BLUETOOTH = "android.permission.BLUETOOTH";
+ field public static final String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";
+ field public static final String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
+ field public static final String BODY_SENSORS = "android.permission.BODY_SENSORS";
+ field public static final String BROADCAST_PACKAGE_REMOVED = "android.permission.BROADCAST_PACKAGE_REMOVED";
+ field public static final String BROADCAST_SMS = "android.permission.BROADCAST_SMS";
+ field public static final String BROADCAST_STICKY = "android.permission.BROADCAST_STICKY";
+ field public static final String BROADCAST_WAP_PUSH = "android.permission.BROADCAST_WAP_PUSH";
+ field public static final String CALL_COMPANION_APP = "android.permission.CALL_COMPANION_APP";
+ field public static final String CALL_PHONE = "android.permission.CALL_PHONE";
+ field public static final String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
+ field public static final String CAMERA = "android.permission.CAMERA";
+ field public static final String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
+ field public static final String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
+ field public static final String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
+ field public static final String CHANGE_NETWORK_STATE = "android.permission.CHANGE_NETWORK_STATE";
+ field public static final String CHANGE_WIFI_MULTICAST_STATE = "android.permission.CHANGE_WIFI_MULTICAST_STATE";
+ field public static final String CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE";
+ field public static final String CLEAR_APP_CACHE = "android.permission.CLEAR_APP_CACHE";
+ field public static final String CONTROL_LOCATION_UPDATES = "android.permission.CONTROL_LOCATION_UPDATES";
+ field public static final String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES";
+ field public static final String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES";
+ field public static final String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
+ field public static final String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD";
+ field public static final String DUMP = "android.permission.DUMP";
+ field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
+ field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
+ field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
+ field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
+ field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
+ field public static final String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE";
+ field @Deprecated public static final String GET_TASKS = "android.permission.GET_TASKS";
+ field public static final String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
+ field public static final String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
+ field public static final String INSTALL_PACKAGES = "android.permission.INSTALL_PACKAGES";
+ field public static final String INSTALL_SHORTCUT = "com.android.launcher.permission.INSTALL_SHORTCUT";
+ field public static final String INSTANT_APP_FOREGROUND_SERVICE = "android.permission.INSTANT_APP_FOREGROUND_SERVICE";
+ field public static final String INTERNET = "android.permission.INTERNET";
+ field public static final String KILL_BACKGROUND_PROCESSES = "android.permission.KILL_BACKGROUND_PROCESSES";
+ field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE";
+ field public static final String MANAGE_DOCUMENTS = "android.permission.MANAGE_DOCUMENTS";
+ field public static final String MANAGE_OWN_CALLS = "android.permission.MANAGE_OWN_CALLS";
+ field public static final String MASTER_CLEAR = "android.permission.MASTER_CLEAR";
+ field public static final String MEDIA_CONTENT_CONTROL = "android.permission.MEDIA_CONTENT_CONTROL";
+ field public static final String MODIFY_AUDIO_SETTINGS = "android.permission.MODIFY_AUDIO_SETTINGS";
+ field public static final String MODIFY_PHONE_STATE = "android.permission.MODIFY_PHONE_STATE";
+ field public static final String MOUNT_FORMAT_FILESYSTEMS = "android.permission.MOUNT_FORMAT_FILESYSTEMS";
+ field public static final String MOUNT_UNMOUNT_FILESYSTEMS = "android.permission.MOUNT_UNMOUNT_FILESYSTEMS";
+ field public static final String NFC = "android.permission.NFC";
+ field public static final String NFC_TRANSACTION_EVENT = "android.permission.NFC_TRANSACTION_EVENT";
+ field public static final String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS";
+ field @Deprecated public static final String PERSISTENT_ACTIVITY = "android.permission.PERSISTENT_ACTIVITY";
+ field @Deprecated public static final String PROCESS_OUTGOING_CALLS = "android.permission.PROCESS_OUTGOING_CALLS";
+ field public static final String READ_CALENDAR = "android.permission.READ_CALENDAR";
+ field public static final String READ_CALL_LOG = "android.permission.READ_CALL_LOG";
+ field public static final String READ_CONTACTS = "android.permission.READ_CONTACTS";
+ field public static final String READ_EXTERNAL_STORAGE = "android.permission.READ_EXTERNAL_STORAGE";
+ field @Deprecated public static final String READ_INPUT_STATE = "android.permission.READ_INPUT_STATE";
+ field public static final String READ_LOGS = "android.permission.READ_LOGS";
+ field public static final String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
+ field public static final String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
+ field public static final String READ_SMS = "android.permission.READ_SMS";
+ field public static final String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
+ field public static final String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
+ field public static final String READ_VOICEMAIL = "com.android.voicemail.permission.READ_VOICEMAIL";
+ field public static final String REBOOT = "android.permission.REBOOT";
+ field public static final String RECEIVE_BOOT_COMPLETED = "android.permission.RECEIVE_BOOT_COMPLETED";
+ field public static final String RECEIVE_MMS = "android.permission.RECEIVE_MMS";
+ field public static final String RECEIVE_SMS = "android.permission.RECEIVE_SMS";
+ field public static final String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH";
+ field public static final String RECORD_AUDIO = "android.permission.RECORD_AUDIO";
+ field public static final String REORDER_TASKS = "android.permission.REORDER_TASKS";
+ field public static final String REQUEST_COMPANION_RUN_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND";
+ field public static final String REQUEST_COMPANION_USE_DATA_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND";
+ field public static final String REQUEST_DELETE_PACKAGES = "android.permission.REQUEST_DELETE_PACKAGES";
+ field public static final String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
+ field public static final String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES";
+ field public static final String REQUEST_PASSWORD_COMPLEXITY = "android.permission.REQUEST_PASSWORD_COMPLEXITY";
+ field @Deprecated public static final String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
+ field public static final String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
+ field public static final String SEND_SMS = "android.permission.SEND_SMS";
+ field public static final String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
+ field public static final String SET_ALWAYS_FINISH = "android.permission.SET_ALWAYS_FINISH";
+ field public static final String SET_ANIMATION_SCALE = "android.permission.SET_ANIMATION_SCALE";
+ field public static final String SET_DEBUG_APP = "android.permission.SET_DEBUG_APP";
+ field @Deprecated public static final String SET_PREFERRED_APPLICATIONS = "android.permission.SET_PREFERRED_APPLICATIONS";
+ field public static final String SET_PROCESS_LIMIT = "android.permission.SET_PROCESS_LIMIT";
+ field public static final String SET_TIME = "android.permission.SET_TIME";
+ field public static final String SET_TIME_ZONE = "android.permission.SET_TIME_ZONE";
+ field public static final String SET_WALLPAPER = "android.permission.SET_WALLPAPER";
+ field public static final String SET_WALLPAPER_HINTS = "android.permission.SET_WALLPAPER_HINTS";
+ field public static final String SIGNAL_PERSISTENT_PROCESSES = "android.permission.SIGNAL_PERSISTENT_PROCESSES";
+ field public static final String SMS_FINANCIAL_TRANSACTIONS = "android.permission.SMS_FINANCIAL_TRANSACTIONS";
+ field public static final String START_VIEW_PERMISSION_USAGE = "android.permission.START_VIEW_PERMISSION_USAGE";
+ field public static final String STATUS_BAR = "android.permission.STATUS_BAR";
+ field public static final String SYSTEM_ALERT_WINDOW = "android.permission.SYSTEM_ALERT_WINDOW";
+ field public static final String TRANSMIT_IR = "android.permission.TRANSMIT_IR";
+ field public static final String UNINSTALL_SHORTCUT = "com.android.launcher.permission.UNINSTALL_SHORTCUT";
+ field public static final String UPDATE_DEVICE_STATS = "android.permission.UPDATE_DEVICE_STATS";
+ field public static final String USE_BIOMETRIC = "android.permission.USE_BIOMETRIC";
+ field @Deprecated public static final String USE_FINGERPRINT = "android.permission.USE_FINGERPRINT";
+ field public static final String USE_FULL_SCREEN_INTENT = "android.permission.USE_FULL_SCREEN_INTENT";
+ field public static final String USE_SIP = "android.permission.USE_SIP";
+ field public static final String VIBRATE = "android.permission.VIBRATE";
+ field public static final String WAKE_LOCK = "android.permission.WAKE_LOCK";
+ field public static final String WRITE_APN_SETTINGS = "android.permission.WRITE_APN_SETTINGS";
+ field public static final String WRITE_CALENDAR = "android.permission.WRITE_CALENDAR";
+ field public static final String WRITE_CALL_LOG = "android.permission.WRITE_CALL_LOG";
+ field public static final String WRITE_CONTACTS = "android.permission.WRITE_CONTACTS";
+ field public static final String WRITE_EXTERNAL_STORAGE = "android.permission.WRITE_EXTERNAL_STORAGE";
+ field public static final String WRITE_GSERVICES = "android.permission.WRITE_GSERVICES";
+ field public static final String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
+ field public static final String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
+ field public static final String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
+ field public static final String WRITE_VOICEMAIL = "com.android.voicemail.permission.WRITE_VOICEMAIL";
}
public static final class Manifest.permission_group {
ctor public Manifest.permission_group();
- field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
- field public static final java.lang.String CALL_LOG = "android.permission-group.CALL_LOG";
- field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
- field public static final java.lang.String CONTACTS = "android.permission-group.CONTACTS";
- field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
- field public static final java.lang.String MICROPHONE = "android.permission-group.MICROPHONE";
- field public static final java.lang.String PHONE = "android.permission-group.PHONE";
- field public static final java.lang.String SENSORS = "android.permission-group.SENSORS";
- field public static final java.lang.String SMS = "android.permission-group.SMS";
- field public static final java.lang.String STORAGE = "android.permission-group.STORAGE";
+ field public static final String ACTIVITY_RECOGNITION = "android.permission-group.ACTIVITY_RECOGNITION";
+ field public static final String CALENDAR = "android.permission-group.CALENDAR";
+ field public static final String CALL_LOG = "android.permission-group.CALL_LOG";
+ field public static final String CAMERA = "android.permission-group.CAMERA";
+ field public static final String CONTACTS = "android.permission-group.CONTACTS";
+ field public static final String LOCATION = "android.permission-group.LOCATION";
+ field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
+ field public static final String PHONE = "android.permission-group.PHONE";
+ field public static final String SENSORS = "android.permission-group.SENSORS";
+ field public static final String SMS = "android.permission-group.SMS";
+ field public static final String STORAGE = "android.permission-group.STORAGE";
}
public final class R {
@@ -269,6 +278,7 @@
field public static final int alertDialogTheme = 16843529; // 0x1010309
field public static final int alignmentMode = 16843642; // 0x101037a
field public static final int allContactsName = 16843468; // 0x10102cc
+ field public static final int allowAudioPlaybackCapture = 16844289; // 0x1010601
field public static final int allowBackup = 16843392; // 0x1010280
field public static final int allowClearUserData = 16842757; // 0x1010005
field public static final int allowEmbedded = 16843765; // 0x10103f5
@@ -281,8 +291,8 @@
field public static final int alphabeticShortcut = 16843235; // 0x10101e3
field public static final int alwaysDrawnWithCache = 16842991; // 0x10100ef
field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
- field public static final deprecated int amPmBackgroundColor = 16843941; // 0x10104a5
- field public static final deprecated int amPmTextColor = 16843940; // 0x10104a4
+ field @Deprecated public static final int amPmBackgroundColor = 16843941; // 0x10104a5
+ field @Deprecated public static final int amPmTextColor = 16843940; // 0x10104a4
field public static final int ambientShadowAlpha = 16843966; // 0x10104be
field public static final int angle = 16843168; // 0x10101a0
field public static final int animateFirstView = 16843477; // 0x10102d5
@@ -292,7 +302,7 @@
field public static final int animationCache = 16842989; // 0x10100ed
field public static final int animationDuration = 16843026; // 0x1010112
field public static final int animationOrder = 16843214; // 0x10101ce
- field public static final deprecated int animationResolution = 16843546; // 0x101031a
+ field @Deprecated public static final int animationResolution = 16843546; // 0x101031a
field public static final int antialias = 16843034; // 0x101011a
field public static final int anyDensity = 16843372; // 0x101026c
field public static final int apduServiceBanner = 16843757; // 0x10103ed
@@ -312,7 +322,7 @@
field public static final int autoSizeStepGranularity = 16844086; // 0x1010536
field public static final int autoSizeTextType = 16844085; // 0x1010535
field public static final int autoStart = 16843445; // 0x10102b5
- field public static final deprecated int autoText = 16843114; // 0x101016a
+ field @Deprecated public static final int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
field public static final int autoVerify = 16844014; // 0x10104ee
field public static final int autofillHints = 16844118; // 0x1010556
@@ -365,14 +375,14 @@
field public static final int canControlMagnification = 16844039; // 0x1010507
field public static final int canPerformGestures = 16844045; // 0x101050d
field public static final int canRecord = 16844060; // 0x101051c
- field public static final deprecated int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
+ field @Deprecated public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9
field public static final int canRequestFingerprintGestures = 16844109; // 0x101054d
field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7
field public static final int canRetrieveWindowContent = 16843653; // 0x1010385
field public static final int candidatesTextStyleSpans = 16843312; // 0x1010230
field public static final int cantSaveState = 16844142; // 0x101056e
- field public static final deprecated int capitalize = 16843113; // 0x1010169
+ field @Deprecated public static final int capitalize = 16843113; // 0x1010169
field public static final int category = 16843752; // 0x10103e8
field public static final int centerBright = 16842956; // 0x10100cc
field public static final int centerColor = 16843275; // 0x101020b
@@ -405,7 +415,7 @@
field public static final int clipOrientation = 16843274; // 0x101020a
field public static final int clipToPadding = 16842987; // 0x10100eb
field public static final int closeIcon = 16843905; // 0x1010481
- field public static final int codes = 16843330; // 0x1010242
+ field @Deprecated public static final int codes = 16843330; // 0x1010242
field public static final int collapseColumns = 16843083; // 0x101014b
field public static final int collapseContentDescription = 16843984; // 0x10104d0
field public static final int collapseIcon = 16844031; // 0x10104ff
@@ -475,8 +485,8 @@
field public static final int datePickerMode = 16843955; // 0x10104b3
field public static final int datePickerStyle = 16843612; // 0x101035c
field public static final int dateTextAppearance = 16843593; // 0x1010349
- field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494
- field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495
+ field @Deprecated public static final int dayOfWeekBackground = 16843924; // 0x1010494
+ field @Deprecated public static final int dayOfWeekTextAppearance = 16843925; // 0x1010495
field public static final int debuggable = 16842767; // 0x101000f
field public static final int defaultFocusHighlightEnabled = 16844130; // 0x1010562
field public static final int defaultHeight = 16844021; // 0x10104f5
@@ -503,7 +513,7 @@
field public static final int digits = 16843110; // 0x1010166
field public static final int directBootAware = 16844037; // 0x1010505
field public static final int direction = 16843217; // 0x10101d1
- field public static final deprecated int directionDescriptions = 16843681; // 0x10103a1
+ field @Deprecated public static final int directionDescriptions = 16843681; // 0x10103a1
field public static final int directionPriority = 16843218; // 0x10101d2
field public static final int disableDependentsState = 16843249; // 0x10101f1
field public static final int disabledAlpha = 16842803; // 0x1010033
@@ -543,7 +553,7 @@
field public static final int editTextColor = 16843601; // 0x1010351
field public static final int editTextPreferenceStyle = 16842898; // 0x1010092
field public static final int editTextStyle = 16842862; // 0x101006e
- field public static final deprecated int editable = 16843115; // 0x101016b
+ field @Deprecated public static final int editable = 16843115; // 0x101016b
field public static final int editorExtras = 16843300; // 0x1010224
field public static final int elegantTextHeight = 16843869; // 0x101045d
field public static final int elevation = 16843840; // 0x1010440
@@ -555,7 +565,9 @@
field public static final int endColor = 16843166; // 0x101019e
field public static final int endX = 16844050; // 0x1010512
field public static final int endY = 16844051; // 0x1010513
- field public static final deprecated int endYear = 16843133; // 0x101017d
+ field @Deprecated public static final int endYear = 16843133; // 0x101017d
+ field public static final int enforceNavigationBarContrast = 16844293; // 0x1010605
+ field public static final int enforceStatusBarContrast = 16844292; // 0x1010604
field public static final int enterFadeDuration = 16843532; // 0x101030c
field public static final int entries = 16842930; // 0x10100b2
field public static final int entryValues = 16843256; // 0x10101f8
@@ -614,7 +626,7 @@
field public static final int focusable = 16842970; // 0x10100da
field public static final int focusableInTouchMode = 16842971; // 0x10100db
field public static final int focusedByDefault = 16844100; // 0x1010544
- field public static final deprecated int focusedMonthDateColor = 16843587; // 0x1010343
+ field @Deprecated public static final int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int font = 16844082; // 0x1010532
field public static final int fontFamily = 16843692; // 0x10103ac
field public static final int fontFeatureSettings = 16843959; // 0x10104b7
@@ -626,9 +638,12 @@
field public static final int fontVariationSettings = 16844144; // 0x1010570
field public static final int fontWeight = 16844083; // 0x1010533
field public static final int footerDividersEnabled = 16843311; // 0x101022f
+ field public static final int forceDarkAllowed = 16844172; // 0x101058c
field public static final int forceHasOverlappingRendering = 16844065; // 0x1010521
+ field public static final int forceUriPermissions = 16844191; // 0x101059f
field public static final int foreground = 16843017; // 0x1010109
field public static final int foregroundGravity = 16843264; // 0x1010200
+ field public static final int foregroundServiceType = 16844185; // 0x1010599
field public static final int foregroundTint = 16843885; // 0x101046d
field public static final int foregroundTintMode = 16843886; // 0x101046e
field public static final int format = 16843013; // 0x1010105
@@ -686,20 +701,21 @@
field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e
field public static final int hardwareAccelerated = 16843475; // 0x10102d3
field public static final int hasCode = 16842764; // 0x101000c
- field public static final deprecated int headerAmPmTextAppearance = 16843936; // 0x10104a0
+ field public static final int hasFragileUserData = 16844186; // 0x101059a
+ field @Deprecated public static final int headerAmPmTextAppearance = 16843936; // 0x10104a0
field public static final int headerBackground = 16843055; // 0x101012f
- field public static final deprecated int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
+ field @Deprecated public static final int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
field public static final int headerDividersEnabled = 16843310; // 0x101022e
- field public static final deprecated int headerMonthTextAppearance = 16843926; // 0x1010496
- field public static final deprecated int headerTimeTextAppearance = 16843935; // 0x101049f
- field public static final deprecated int headerYearTextAppearance = 16843928; // 0x1010498
+ field @Deprecated public static final int headerMonthTextAppearance = 16843926; // 0x1010496
+ field @Deprecated public static final int headerTimeTextAppearance = 16843935; // 0x101049f
+ field @Deprecated public static final int headerYearTextAppearance = 16843928; // 0x1010498
field public static final int height = 16843093; // 0x1010155
field public static final int hideOnContentScroll = 16843843; // 0x1010443
field public static final int hint = 16843088; // 0x1010150
field public static final int homeAsUpIndicator = 16843531; // 0x101030b
field public static final int homeLayout = 16843549; // 0x101031d
field public static final int horizontalDivider = 16843053; // 0x101012d
- field public static final int horizontalGap = 16843327; // 0x101023f
+ field @Deprecated public static final int horizontalGap = 16843327; // 0x101023f
field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353
field public static final int horizontalSpacing = 16843028; // 0x1010114
field public static final int host = 16842792; // 0x1010028
@@ -707,12 +723,13 @@
field public static final int hotSpotY = 16844056; // 0x1010518
field public static final int hyphenationFrequency = 16843998; // 0x10104de
field public static final int icon = 16842754; // 0x1010002
- field public static final int iconPreview = 16843337; // 0x1010249
+ field @Deprecated public static final int iconPreview = 16843337; // 0x1010249
field public static final int iconSpaceReserved = 16844129; // 0x1010561
field public static final int iconTint = 16844126; // 0x101055e
field public static final int iconTintMode = 16844127; // 0x101055f
field public static final int iconifiedByDefault = 16843514; // 0x10102fa
field public static final int id = 16842960; // 0x10100d0
+ field public static final int identifier = 16844294; // 0x1010606
field public static final int ignoreGravity = 16843263; // 0x10101ff
field public static final int imageButtonStyle = 16842866; // 0x1010072
field public static final int imageWellStyle = 16842867; // 0x1010073
@@ -744,12 +761,13 @@
field public static final int indicatorRight = 16843022; // 0x101010e
field public static final int indicatorStart = 16843729; // 0x10103d1
field public static final int inflatedId = 16842995; // 0x10100f3
+ field public static final int inheritShowWhenLocked = 16844188; // 0x101059c
field public static final int initOrder = 16842778; // 0x101001a
field public static final int initialKeyguardLayout = 16843714; // 0x10103c2
field public static final int initialLayout = 16843345; // 0x1010251
field public static final int innerRadius = 16843359; // 0x101025f
field public static final int innerRadiusRatio = 16843163; // 0x101019b
- field public static final deprecated int inputMethod = 16843112; // 0x1010168
+ field @Deprecated public static final int inputMethod = 16843112; // 0x1010168
field public static final int inputType = 16843296; // 0x1010220
field public static final int inset = 16843957; // 0x10104b5
field public static final int insetBottom = 16843194; // 0x10101ba
@@ -757,6 +775,7 @@
field public static final int insetRight = 16843192; // 0x10101b8
field public static final int insetTop = 16843193; // 0x10101b9
field public static final int installLocation = 16843447; // 0x10102b7
+ field public static final int interactiveUiTimeout = 16844181; // 0x1010595
field public static final int interpolator = 16843073; // 0x1010141
field public static final int isAlwaysSyncable = 16843571; // 0x1010333
field public static final int isAsciiCapable = 16843753; // 0x10103e9
@@ -765,11 +784,13 @@
field public static final int isFeatureSplit = 16844123; // 0x101055b
field public static final int isGame = 16843764; // 0x10103f4
field public static final int isIndicator = 16843079; // 0x1010147
- field public static final int isModifier = 16843334; // 0x1010246
- field public static final int isRepeatable = 16843336; // 0x1010248
+ field public static final int isLightTheme = 16844176; // 0x1010590
+ field @Deprecated public static final int isModifier = 16843334; // 0x1010246
+ field @Deprecated public static final int isRepeatable = 16843336; // 0x1010248
field public static final int isScrollContainer = 16843342; // 0x101024e
+ field public static final int isSplitRequired = 16844177; // 0x1010591
field public static final int isStatic = 16844122; // 0x101055a
- field public static final int isSticky = 16843335; // 0x1010247
+ field @Deprecated public static final int isSticky = 16843335; // 0x1010247
field public static final int isolatedProcess = 16843689; // 0x10103a9
field public static final int isolatedSplits = 16844107; // 0x101054b
field public static final int itemBackground = 16843056; // 0x1010130
@@ -779,27 +800,27 @@
field public static final int justificationMode = 16844135; // 0x1010567
field public static final int keepScreenOn = 16843286; // 0x1010216
field public static final int key = 16843240; // 0x10101e8
- field public static final int keyBackground = 16843315; // 0x1010233
- field public static final int keyEdgeFlags = 16843333; // 0x1010245
- field public static final int keyHeight = 16843326; // 0x101023e
- field public static final int keyIcon = 16843340; // 0x101024c
- field public static final int keyLabel = 16843339; // 0x101024b
- field public static final int keyOutputText = 16843338; // 0x101024a
- field public static final int keyPreviewHeight = 16843321; // 0x1010239
- field public static final int keyPreviewLayout = 16843319; // 0x1010237
- field public static final int keyPreviewOffset = 16843320; // 0x1010238
+ field @Deprecated public static final int keyBackground = 16843315; // 0x1010233
+ field @Deprecated public static final int keyEdgeFlags = 16843333; // 0x1010245
+ field @Deprecated public static final int keyHeight = 16843326; // 0x101023e
+ field @Deprecated public static final int keyIcon = 16843340; // 0x101024c
+ field @Deprecated public static final int keyLabel = 16843339; // 0x101024b
+ field @Deprecated public static final int keyOutputText = 16843338; // 0x101024a
+ field @Deprecated public static final int keyPreviewHeight = 16843321; // 0x1010239
+ field @Deprecated public static final int keyPreviewLayout = 16843319; // 0x1010237
+ field @Deprecated public static final int keyPreviewOffset = 16843320; // 0x1010238
field public static final int keySet = 16843739; // 0x10103db
- field public static final int keyTextColor = 16843318; // 0x1010236
- field public static final int keyTextSize = 16843316; // 0x1010234
- field public static final int keyWidth = 16843325; // 0x101023d
+ field @Deprecated public static final int keyTextColor = 16843318; // 0x1010236
+ field @Deprecated public static final int keyTextSize = 16843316; // 0x1010234
+ field @Deprecated public static final int keyWidth = 16843325; // 0x101023d
field public static final int keyboardLayout = 16843691; // 0x10103ab
- field public static final int keyboardMode = 16843341; // 0x101024d
+ field @Deprecated public static final int keyboardMode = 16843341; // 0x101024d
field public static final int keyboardNavigationCluster = 16844096; // 0x1010540
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
field public static final int label = 16842753; // 0x1010001
field public static final int labelFor = 16843718; // 0x10103c6
- field public static final int labelTextSize = 16843317; // 0x1010235
+ field @Deprecated public static final int labelTextSize = 16843317; // 0x1010235
field public static final int languageTag = 16844040; // 0x1010508
field public static final int largeHeap = 16843610; // 0x101035a
field public static final int largeScreens = 16843398; // 0x1010286
@@ -917,6 +938,7 @@
field public static final int menuCategory = 16843230; // 0x10101de
field public static final int mimeType = 16842790; // 0x1010026
field public static final int min = 16844089; // 0x1010539
+ field public static final int minAspectRatio = 16844187; // 0x101059b
field public static final int minDate = 16843583; // 0x101033f
field public static final int minEms = 16843098; // 0x101015a
field public static final int minHeight = 16843072; // 0x1010140
@@ -950,6 +972,7 @@
field public static final int nextFocusRight = 16842978; // 0x10100e2
field public static final int nextFocusUp = 16842979; // 0x10100e3
field public static final int noHistory = 16843309; // 0x101022d
+ field public static final int nonInteractiveUiTimeout = 16844175; // 0x101058f
field public static final int normalScreens = 16843397; // 0x1010285
field public static final int notificationTimeout = 16843651; // 0x1010383
field public static final int numColumns = 16843032; // 0x1010118
@@ -959,13 +982,17 @@
field public static final int numbersInnerTextColor = 16844001; // 0x10104e1
field public static final int numbersSelectorColor = 16843939; // 0x10104a3
field public static final int numbersTextColor = 16843937; // 0x10104a1
- field public static final deprecated int numeric = 16843109; // 0x1010165
+ field @Deprecated public static final int numeric = 16843109; // 0x1010165
field public static final int numericModifiers = 16844111; // 0x101054f
field public static final int numericShortcut = 16843236; // 0x10101e4
field public static final int offset = 16844052; // 0x1010514
field public static final int onClick = 16843375; // 0x101026f
field public static final int oneshot = 16843159; // 0x1010197
field public static final int opacity = 16843550; // 0x101031e
+ field public static final int opticalInsetBottom = 16844171; // 0x101058b
+ field public static final int opticalInsetLeft = 16844168; // 0x1010588
+ field public static final int opticalInsetRight = 16844170; // 0x101058a
+ field public static final int opticalInsetTop = 16844169; // 0x1010589
field public static final int order = 16843242; // 0x10101ea
field public static final int orderInCategory = 16843231; // 0x10101df
field public static final int ordering = 16843490; // 0x10102e2
@@ -981,6 +1008,7 @@
field public static final int overlapAnchor = 16843874; // 0x1010462
field public static final int overridesImplicitlyEnabledSubtype = 16843682; // 0x10103a2
field public static final int packageNames = 16843649; // 0x1010381
+ field public static final int packageType = 16844167; // 0x1010587
field public static final int padding = 16842965; // 0x10100d5
field public static final int paddingBottom = 16842969; // 0x10100d9
field public static final int paddingEnd = 16843700; // 0x10103b4
@@ -997,7 +1025,7 @@
field public static final int panelFullBackground = 16842847; // 0x101005f
field public static final int panelTextAppearance = 16842850; // 0x1010062
field public static final int parentActivityName = 16843687; // 0x10103a7
- field public static final deprecated int password = 16843100; // 0x101015c
+ field @Deprecated public static final int password = 16843100; // 0x101015c
field public static final int path = 16842794; // 0x101002a
field public static final int pathData = 16843781; // 0x1010405
field public static final int pathPattern = 16842796; // 0x101002c
@@ -1011,18 +1039,18 @@
field public static final int persistent = 16842765; // 0x101000d
field public static final int persistentDrawingCache = 16842990; // 0x10100ee
field public static final int persistentWhenFeatureAvailable = 16844131; // 0x1010563
- field public static final deprecated int phoneNumber = 16843111; // 0x1010167
+ field @Deprecated public static final int phoneNumber = 16843111; // 0x1010167
field public static final int pivotX = 16843189; // 0x10101b5
field public static final int pivotY = 16843190; // 0x10101b6
field public static final int pointerIcon = 16844041; // 0x1010509
field public static final int popupAnimationStyle = 16843465; // 0x10102c9
field public static final int popupBackground = 16843126; // 0x1010176
- field public static final int popupCharacters = 16843332; // 0x1010244
+ field @Deprecated public static final int popupCharacters = 16843332; // 0x1010244
field public static final int popupElevation = 16843916; // 0x101048c
field public static final int popupEnterTransition = 16844063; // 0x101051f
field public static final int popupExitTransition = 16844064; // 0x1010520
- field public static final int popupKeyboard = 16843331; // 0x1010243
- field public static final int popupLayout = 16843323; // 0x101023b
+ field @Deprecated public static final int popupKeyboard = 16843331; // 0x1010243
+ field @Deprecated public static final int popupLayout = 16843323; // 0x101023b
field public static final int popupMenuStyle = 16843520; // 0x1010300
field public static final int popupTheme = 16843945; // 0x10104a9
field public static final int popupWindowStyle = 16842870; // 0x1010076
@@ -1091,6 +1119,7 @@
field public static final int reqKeyboardType = 16843304; // 0x1010228
field public static final int reqNavigation = 16843306; // 0x101022a
field public static final int reqTouchScreen = 16843303; // 0x1010227
+ field public static final int requestLegacyExternalStorage = 16844291; // 0x1010603
field public static final int requireDeviceUnlock = 16843756; // 0x10103ec
field public static final int required = 16843406; // 0x101028e
field public static final int requiredAccountType = 16843734; // 0x10103d6
@@ -1105,7 +1134,7 @@
field public static final int resizeableActivity = 16844022; // 0x10104f6
field public static final int resource = 16842789; // 0x1010025
field public static final int restoreAnyVersion = 16843450; // 0x10102ba
- field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
+ field @Deprecated public static final int restoreNeedsApplication = 16843421; // 0x101029d
field public static final int restrictedAccountType = 16843733; // 0x10103d5
field public static final int restrictionType = 16843923; // 0x1010493
field public static final int resumeWhilePausing = 16843954; // 0x10104b2
@@ -1121,7 +1150,7 @@
field public static final int roundIcon = 16844076; // 0x101052c
field public static final int rowCount = 16843637; // 0x1010375
field public static final int rowDelay = 16843216; // 0x10101d0
- field public static final int rowEdgeFlags = 16843329; // 0x1010241
+ field @Deprecated public static final int rowEdgeFlags = 16843329; // 0x1010241
field public static final int rowHeight = 16843058; // 0x1010132
field public static final int rowOrderPreserved = 16843638; // 0x1010376
field public static final int saveEnabled = 16842983; // 0x10100e7
@@ -1153,7 +1182,7 @@
field public static final int scrollbarTrackVertical = 16842855; // 0x1010067
field public static final int scrollbars = 16842974; // 0x10100de
field public static final int scrollingCache = 16843006; // 0x10100fe
- field public static final deprecated int searchButtonText = 16843269; // 0x1010205
+ field @Deprecated public static final int searchButtonText = 16843269; // 0x1010205
field public static final int searchHintIcon = 16843988; // 0x10104d4
field public static final int searchIcon = 16843907; // 0x1010483
field public static final int searchMode = 16843221; // 0x10101d5
@@ -1169,16 +1198,19 @@
field public static final int secondaryProgress = 16843064; // 0x1010138
field public static final int secondaryProgressTint = 16843879; // 0x1010467
field public static final int secondaryProgressTintMode = 16843880; // 0x1010468
+ field public static final int secureElementName = 16844290; // 0x1010602
field public static final int seekBarStyle = 16842875; // 0x101007b
field public static final int segmentedButtonStyle = 16843568; // 0x1010330
field public static final int selectAllOnFocus = 16843102; // 0x101015e
field public static final int selectable = 16843238; // 0x10101e6
field public static final int selectableItemBackground = 16843534; // 0x101030e
field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c
- field public static final deprecated int selectedDateVerticalBar = 16843591; // 0x1010347
- field public static final deprecated int selectedWeekBackgroundColor = 16843586; // 0x1010342
+ field @Deprecated public static final int selectedDateVerticalBar = 16843591; // 0x1010347
+ field @Deprecated public static final int selectedWeekBackgroundColor = 16843586; // 0x1010342
+ field public static final int selectionDividerHeight = 16844184; // 0x1010598
field public static final int sessionService = 16843837; // 0x101043d
field public static final int settingsActivity = 16843301; // 0x1010225
+ field public static final int settingsSliceUri = 16844179; // 0x1010593
field public static final int setupActivity = 16843766; // 0x10103f6
field public static final int shadowColor = 16843105; // 0x1010161
field public static final int shadowDx = 16843106; // 0x1010162
@@ -1186,8 +1218,9 @@
field public static final int shadowRadius = 16843108; // 0x1010164
field public static final int shape = 16843162; // 0x101019a
field public static final int shareInterpolator = 16843195; // 0x10101bb
- field public static final int sharedUserId = 16842763; // 0x101000b
- field public static final int sharedUserLabel = 16843361; // 0x1010261
+ field @Deprecated public static final int sharedUserId = 16842763; // 0x101000b
+ field @Deprecated public static final int sharedUserLabel = 16843361; // 0x1010261
+ field public static final int shell = 16844180; // 0x1010594
field public static final int shortcutDisabledMessage = 16844075; // 0x101052b
field public static final int shortcutId = 16844072; // 0x1010528
field public static final int shortcutLongLabel = 16844074; // 0x101052a
@@ -1198,14 +1231,14 @@
field public static final int showDividers = 16843561; // 0x1010329
field public static final int showForAllUsers = 16844015; // 0x10104ef
field public static final int showMetadataInPreview = 16844079; // 0x101052f
- field public static final deprecated int showOnLockScreen = 16843721; // 0x10103c9
+ field @Deprecated public static final int showOnLockScreen = 16843721; // 0x10103c9
field public static final int showSilent = 16843259; // 0x10101fb
field public static final int showText = 16843949; // 0x10104ad
- field public static final deprecated int showWeekNumber = 16843582; // 0x101033e
+ field @Deprecated public static final int showWeekNumber = 16843582; // 0x101033e
field public static final int showWhenLocked = 16844137; // 0x1010569
- field public static final deprecated int shownWeekCount = 16843585; // 0x1010341
+ field @Deprecated public static final int shownWeekCount = 16843585; // 0x1010341
field public static final int shrinkColumns = 16843082; // 0x101014a
- field public static final deprecated int singleLine = 16843101; // 0x101015d
+ field @Deprecated public static final int singleLine = 16843101; // 0x101015d
field public static final int singleLineTitle = 16844124; // 0x101055c
field public static final int singleUser = 16843711; // 0x10103bf
field public static final int slideEdge = 16843824; // 0x1010430
@@ -1236,7 +1269,7 @@
field public static final int startOffset = 16843198; // 0x10101be
field public static final int startX = 16844048; // 0x1010510
field public static final int startY = 16844049; // 0x1010511
- field public static final deprecated int startYear = 16843132; // 0x101017c
+ field @Deprecated public static final int startYear = 16843132; // 0x101017c
field public static final int stateListAnimator = 16843848; // 0x1010448
field public static final int stateNotNeeded = 16842774; // 0x1010016
field public static final int state_above_anchor = 16842922; // 0x10100aa
@@ -1254,7 +1287,7 @@
field public static final int state_focused = 16842908; // 0x101009c
field public static final int state_hovered = 16843623; // 0x1010367
field public static final int state_last = 16842918; // 0x10100a6
- field public static final int state_long_pressable = 16843324; // 0x101023c
+ field @Deprecated public static final int state_long_pressable = 16843324; // 0x101023c
field public static final int state_middle = 16842917; // 0x10100a5
field public static final int state_multiline = 16843597; // 0x101034d
field public static final int state_pressed = 16842919; // 0x10100a7
@@ -1293,6 +1326,7 @@
field public static final int supportsAssist = 16844016; // 0x10104f0
field public static final int supportsLaunchVoiceAssistFromKeyguard = 16844017; // 0x10104f1
field public static final int supportsLocalInteraction = 16844047; // 0x101050f
+ field public static final int supportsMultipleDisplays = 16844182; // 0x1010596
field public static final int supportsPictureInPicture = 16844023; // 0x10104f7
field public static final int supportsRtl = 16843695; // 0x10103af
field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb
@@ -1312,12 +1346,12 @@
field public static final int tag = 16842961; // 0x10100d1
field public static final int targetActivity = 16843266; // 0x1010202
field public static final int targetClass = 16842799; // 0x101002f
- field public static final deprecated int targetDescriptions = 16843680; // 0x10103a0
+ field @Deprecated public static final int targetDescriptions = 16843680; // 0x10103a0
field public static final int targetId = 16843740; // 0x10103dc
field public static final int targetName = 16843853; // 0x101044d
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetProcesses = 16844097; // 0x1010541
- field public static final int targetSandboxVersion = 16844108; // 0x101054c
+ field @Deprecated public static final int targetSandboxVersion = 16844108; // 0x101054c
field public static final int targetSdkVersion = 16843376; // 0x1010270
field public static final int taskAffinity = 16842770; // 0x1010012
field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
@@ -1382,6 +1416,7 @@
field public static final int textFilterEnabled = 16843007; // 0x10100ff
field public static final int textFontWeight = 16844165; // 0x1010585
field public static final int textIsSelectable = 16843542; // 0x1010316
+ field public static final int textLocale = 16844178; // 0x1010592
field public static final int textOff = 16843045; // 0x1010125
field public static final int textOn = 16843044; // 0x1010124
field public static final int textScaleX = 16843089; // 0x1010151
@@ -1468,11 +1503,13 @@
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
field public static final int uncertainGestureColor = 16843382; // 0x1010276
- field public static final deprecated int unfocusedMonthDateColor = 16843588; // 0x1010344
+ field @Deprecated public static final int unfocusedMonthDateColor = 16843588; // 0x1010344
field public static final int unselectedAlpha = 16843278; // 0x101020e
field public static final int updatePeriodMillis = 16843344; // 0x1010250
field public static final int use32bitAbi = 16844053; // 0x1010515
+ field public static final int useAppZygote = 16844183; // 0x1010597
field public static final int useDefaultMargins = 16843641; // 0x1010379
+ field public static final int useEmbeddedDex = 16844190; // 0x101059e
field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
field public static final int useLevel = 16843167; // 0x101019f
field public static final int userVisible = 16843409; // 0x1010291
@@ -1488,9 +1525,9 @@
field public static final int versionCodeMajor = 16844150; // 0x1010576
field public static final int versionMajor = 16844151; // 0x1010577
field public static final int versionName = 16843292; // 0x101021c
- field public static final int verticalCorrection = 16843322; // 0x101023a
+ field @Deprecated public static final int verticalCorrection = 16843322; // 0x101023a
field public static final int verticalDivider = 16843054; // 0x101012e
- field public static final int verticalGap = 16843328; // 0x1010240
+ field @Deprecated public static final int verticalGap = 16843328; // 0x1010240
field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
field public static final int verticalSpacing = 16843029; // 0x1010115
field public static final int viewportHeight = 16843779; // 0x1010403
@@ -1516,8 +1553,8 @@
field public static final int webTextViewStyle = 16843449; // 0x10102b9
field public static final int webViewStyle = 16842885; // 0x1010085
field public static final int weekDayTextAppearance = 16843592; // 0x1010348
- field public static final deprecated int weekNumberColor = 16843589; // 0x1010345
- field public static final deprecated int weekSeparatorLineColor = 16843590; // 0x1010346
+ field @Deprecated public static final int weekNumberColor = 16843589; // 0x1010345
+ field @Deprecated public static final int weekSeparatorLineColor = 16843590; // 0x1010346
field public static final int weightSum = 16843048; // 0x1010128
field public static final int widgetCategory = 16843716; // 0x10103c4
field public static final int widgetFeatures = 16844153; // 0x1010579
@@ -1580,10 +1617,11 @@
field public static final int x = 16842924; // 0x10100ac
field public static final int xlargeScreens = 16843455; // 0x10102bf
field public static final int y = 16842925; // 0x10100ad
- field public static final deprecated int yearListItemTextAppearance = 16843929; // 0x1010499
- field public static final deprecated int yearListSelectorColor = 16843930; // 0x101049a
+ field @Deprecated public static final int yearListItemTextAppearance = 16843929; // 0x1010499
+ field @Deprecated public static final int yearListSelectorColor = 16843930; // 0x101049a
field public static final int yesNoPreferenceStyle = 16842896; // 0x1010090
field public static final int zAdjustment = 16843201; // 0x10101c1
+ field public static final int zygotePreloadName = 16844189; // 0x101059d
}
public static final class R.bool {
@@ -1606,17 +1644,17 @@
field public static final int holo_purple = 17170458; // 0x106001a
field public static final int holo_red_dark = 17170455; // 0x1060017
field public static final int holo_red_light = 17170454; // 0x1060016
- field public static final deprecated int primary_text_dark = 17170433; // 0x1060001
- field public static final deprecated int primary_text_dark_nodisable = 17170434; // 0x1060002
- field public static final deprecated int primary_text_light = 17170435; // 0x1060003
- field public static final deprecated int primary_text_light_nodisable = 17170436; // 0x1060004
- field public static final deprecated int secondary_text_dark = 17170437; // 0x1060005
- field public static final deprecated int secondary_text_dark_nodisable = 17170438; // 0x1060006
- field public static final deprecated int secondary_text_light = 17170439; // 0x1060007
- field public static final deprecated int secondary_text_light_nodisable = 17170440; // 0x1060008
+ field @Deprecated public static final int primary_text_dark = 17170433; // 0x1060001
+ field @Deprecated public static final int primary_text_dark_nodisable = 17170434; // 0x1060002
+ field @Deprecated public static final int primary_text_light = 17170435; // 0x1060003
+ field @Deprecated public static final int primary_text_light_nodisable = 17170436; // 0x1060004
+ field @Deprecated public static final int secondary_text_dark = 17170437; // 0x1060005
+ field @Deprecated public static final int secondary_text_dark_nodisable = 17170438; // 0x1060006
+ field @Deprecated public static final int secondary_text_light = 17170439; // 0x1060007
+ field @Deprecated public static final int secondary_text_light_nodisable = 17170440; // 0x1060008
field public static final int tab_indicator_text = 17170441; // 0x1060009
- field public static final deprecated int tertiary_text_dark = 17170448; // 0x1060010
- field public static final deprecated int tertiary_text_light = 17170449; // 0x1060011
+ field @Deprecated public static final int tertiary_text_dark = 17170448; // 0x1060010
+ field @Deprecated public static final int tertiary_text_light = 17170449; // 0x1060011
field public static final int transparent = 17170445; // 0x106000d
field public static final int white = 17170443; // 0x106000b
field public static final int widget_edittext_dark = 17170442; // 0x106000a
@@ -1786,14 +1824,14 @@
field public static final int stat_sys_download = 17301633; // 0x1080081
field public static final int stat_sys_download_done = 17301634; // 0x1080082
field public static final int stat_sys_headset = 17301635; // 0x1080083
- field public static final deprecated int stat_sys_phone_call = 17301636; // 0x1080084
- field public static final deprecated int stat_sys_phone_call_forward = 17301637; // 0x1080085
- field public static final deprecated int stat_sys_phone_call_on_hold = 17301638; // 0x1080086
+ field @Deprecated public static final int stat_sys_phone_call = 17301636; // 0x1080084
+ field @Deprecated public static final int stat_sys_phone_call_forward = 17301637; // 0x1080085
+ field @Deprecated public static final int stat_sys_phone_call_on_hold = 17301638; // 0x1080086
field public static final int stat_sys_speakerphone = 17301639; // 0x1080087
field public static final int stat_sys_upload = 17301640; // 0x1080088
field public static final int stat_sys_upload_done = 17301641; // 0x1080089
- field public static final deprecated int stat_sys_vp_phone_call = 17301671; // 0x10800a7
- field public static final deprecated int stat_sys_vp_phone_call_on_hold = 17301672; // 0x10800a8
+ field @Deprecated public static final int stat_sys_vp_phone_call = 17301671; // 0x10800a7
+ field @Deprecated public static final int stat_sys_vp_phone_call_on_hold = 17301672; // 0x10800a8
field public static final int stat_sys_warning = 17301642; // 0x108008a
field public static final int status_bar_item_app_background = 17301643; // 0x108008b
field public static final int status_bar_item_background = 17301644; // 0x108008c
@@ -1820,6 +1858,10 @@
field public static final int accessibilityActionContextClick = 16908348; // 0x102003c
field public static final int accessibilityActionHideTooltip = 16908357; // 0x1020045
field public static final int accessibilityActionMoveWindow = 16908354; // 0x1020042
+ field public static final int accessibilityActionPageDown = 16908359; // 0x1020047
+ field public static final int accessibilityActionPageLeft = 16908360; // 0x1020048
+ field public static final int accessibilityActionPageRight = 16908361; // 0x1020049
+ field public static final int accessibilityActionPageUp = 16908358; // 0x1020046
field public static final int accessibilityActionScrollDown = 16908346; // 0x102003a
field public static final int accessibilityActionScrollLeft = 16908345; // 0x1020039
field public static final int accessibilityActionScrollRight = 16908347; // 0x102003b
@@ -1854,7 +1896,7 @@
field public static final int input = 16908297; // 0x1020009
field public static final int inputArea = 16908318; // 0x102001e
field public static final int inputExtractEditText = 16908325; // 0x1020025
- field public static final int keyboardView = 16908326; // 0x1020026
+ field @Deprecated public static final int keyboardView = 16908326; // 0x1020026
field public static final int list = 16908298; // 0x102000a
field public static final int list_container = 16908351; // 0x102003f
field public static final int mask = 16908334; // 0x102002e
@@ -2036,13 +2078,13 @@
field public static final int TextAppearance_DeviceDefault_Widget = 16974265; // 0x10301b9
field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Menu = 16974286; // 0x10301ce
field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle = 16974279; // 0x10301c7
- field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle_Inverse = 16974283; // 0x10301cb
+ field @Deprecated public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle_Inverse = 16974283; // 0x10301cb
field public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Title = 16974278; // 0x10301c6
- field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionBar_Title_Inverse = 16974282; // 0x10301ca
+ field @Deprecated public static final int TextAppearance_DeviceDefault_Widget_ActionBar_Title_Inverse = 16974282; // 0x10301ca
field public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle = 16974281; // 0x10301c9
- field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle_Inverse = 16974285; // 0x10301cd
+ field @Deprecated public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle_Inverse = 16974285; // 0x10301cd
field public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Title = 16974280; // 0x10301c8
- field public static final deprecated int TextAppearance_DeviceDefault_Widget_ActionMode_Title_Inverse = 16974284; // 0x10301cc
+ field @Deprecated public static final int TextAppearance_DeviceDefault_Widget_ActionMode_Title_Inverse = 16974284; // 0x10301cc
field public static final int TextAppearance_DeviceDefault_Widget_Button = 16974266; // 0x10301ba
field public static final int TextAppearance_DeviceDefault_Widget_DropDownHint = 16974271; // 0x10301bf
field public static final int TextAppearance_DeviceDefault_Widget_DropDownItem = 16974272; // 0x10301c0
@@ -2177,6 +2219,7 @@
field public static final int TextAppearance_WindowTitle = 16973907; // 0x1030053
field public static final int Theme = 16973829; // 0x1030005
field public static final int ThemeOverlay = 16974407; // 0x1030247
+ field public static final int ThemeOverlay_DeviceDefault_Accent_DayNight = 16974564; // 0x10302e4
field public static final int ThemeOverlay_Material = 16974408; // 0x1030248
field public static final int ThemeOverlay_Material_ActionBar = 16974409; // 0x1030249
field public static final int ThemeOverlay_Material_Dark = 16974411; // 0x103024b
@@ -2188,6 +2231,7 @@
field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
field public static final int Theme_Black_NoTitleBar_Fullscreen = 16973834; // 0x103000a
field public static final int Theme_DeviceDefault = 16974120; // 0x1030128
+ field public static final int Theme_DeviceDefault_DayNight = 16974563; // 0x10302e3
field public static final int Theme_DeviceDefault_Dialog = 16974126; // 0x103012e
field public static final int Theme_DeviceDefault_DialogWhenLarge = 16974134; // 0x1030136
field public static final int Theme_DeviceDefault_DialogWhenLarge_NoActionBar = 16974135; // 0x1030137
@@ -2219,34 +2263,34 @@
field public static final int Theme_DeviceDefault_Wallpaper = 16974140; // 0x103013c
field public static final int Theme_DeviceDefault_Wallpaper_NoTitleBar = 16974141; // 0x103013d
field public static final int Theme_Dialog = 16973835; // 0x103000b
- field public static final deprecated int Theme_Holo = 16973931; // 0x103006b
- field public static final deprecated int Theme_Holo_Dialog = 16973935; // 0x103006f
- field public static final deprecated int Theme_Holo_DialogWhenLarge = 16973943; // 0x1030077
- field public static final deprecated int Theme_Holo_DialogWhenLarge_NoActionBar = 16973944; // 0x1030078
- field public static final deprecated int Theme_Holo_Dialog_MinWidth = 16973936; // 0x1030070
- field public static final deprecated int Theme_Holo_Dialog_NoActionBar = 16973937; // 0x1030071
- field public static final deprecated int Theme_Holo_Dialog_NoActionBar_MinWidth = 16973938; // 0x1030072
- field public static final deprecated int Theme_Holo_InputMethod = 16973951; // 0x103007f
- field public static final deprecated int Theme_Holo_Light = 16973934; // 0x103006e
- field public static final deprecated int Theme_Holo_Light_DarkActionBar = 16974105; // 0x1030119
- field public static final deprecated int Theme_Holo_Light_Dialog = 16973939; // 0x1030073
- field public static final deprecated int Theme_Holo_Light_DialogWhenLarge = 16973945; // 0x1030079
- field public static final deprecated int Theme_Holo_Light_DialogWhenLarge_NoActionBar = 16973946; // 0x103007a
- field public static final deprecated int Theme_Holo_Light_Dialog_MinWidth = 16973940; // 0x1030074
- field public static final deprecated int Theme_Holo_Light_Dialog_NoActionBar = 16973941; // 0x1030075
- field public static final deprecated int Theme_Holo_Light_Dialog_NoActionBar_MinWidth = 16973942; // 0x1030076
- field public static final deprecated int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0
- field public static final deprecated int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1
- field public static final deprecated int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de
- field public static final deprecated int Theme_Holo_Light_NoActionBar_TranslucentDecor = 16974306; // 0x10301e2
- field public static final deprecated int Theme_Holo_Light_Panel = 16973948; // 0x103007c
- field public static final deprecated int Theme_Holo_NoActionBar = 16973932; // 0x103006c
- field public static final deprecated int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d
- field public static final deprecated int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd
- field public static final deprecated int Theme_Holo_NoActionBar_TranslucentDecor = 16974305; // 0x10301e1
- field public static final deprecated int Theme_Holo_Panel = 16973947; // 0x103007b
- field public static final deprecated int Theme_Holo_Wallpaper = 16973949; // 0x103007d
- field public static final deprecated int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e
+ field @Deprecated public static final int Theme_Holo = 16973931; // 0x103006b
+ field @Deprecated public static final int Theme_Holo_Dialog = 16973935; // 0x103006f
+ field @Deprecated public static final int Theme_Holo_DialogWhenLarge = 16973943; // 0x1030077
+ field @Deprecated public static final int Theme_Holo_DialogWhenLarge_NoActionBar = 16973944; // 0x1030078
+ field @Deprecated public static final int Theme_Holo_Dialog_MinWidth = 16973936; // 0x1030070
+ field @Deprecated public static final int Theme_Holo_Dialog_NoActionBar = 16973937; // 0x1030071
+ field @Deprecated public static final int Theme_Holo_Dialog_NoActionBar_MinWidth = 16973938; // 0x1030072
+ field @Deprecated public static final int Theme_Holo_InputMethod = 16973951; // 0x103007f
+ field @Deprecated public static final int Theme_Holo_Light = 16973934; // 0x103006e
+ field @Deprecated public static final int Theme_Holo_Light_DarkActionBar = 16974105; // 0x1030119
+ field @Deprecated public static final int Theme_Holo_Light_Dialog = 16973939; // 0x1030073
+ field @Deprecated public static final int Theme_Holo_Light_DialogWhenLarge = 16973945; // 0x1030079
+ field @Deprecated public static final int Theme_Holo_Light_DialogWhenLarge_NoActionBar = 16973946; // 0x103007a
+ field @Deprecated public static final int Theme_Holo_Light_Dialog_MinWidth = 16973940; // 0x1030074
+ field @Deprecated public static final int Theme_Holo_Light_Dialog_NoActionBar = 16973941; // 0x1030075
+ field @Deprecated public static final int Theme_Holo_Light_Dialog_NoActionBar_MinWidth = 16973942; // 0x1030076
+ field @Deprecated public static final int Theme_Holo_Light_NoActionBar = 16974064; // 0x10300f0
+ field @Deprecated public static final int Theme_Holo_Light_NoActionBar_Fullscreen = 16974065; // 0x10300f1
+ field @Deprecated public static final int Theme_Holo_Light_NoActionBar_Overscan = 16974302; // 0x10301de
+ field @Deprecated public static final int Theme_Holo_Light_NoActionBar_TranslucentDecor = 16974306; // 0x10301e2
+ field @Deprecated public static final int Theme_Holo_Light_Panel = 16973948; // 0x103007c
+ field @Deprecated public static final int Theme_Holo_NoActionBar = 16973932; // 0x103006c
+ field @Deprecated public static final int Theme_Holo_NoActionBar_Fullscreen = 16973933; // 0x103006d
+ field @Deprecated public static final int Theme_Holo_NoActionBar_Overscan = 16974301; // 0x10301dd
+ field @Deprecated public static final int Theme_Holo_NoActionBar_TranslucentDecor = 16974305; // 0x10301e1
+ field @Deprecated public static final int Theme_Holo_Panel = 16973947; // 0x103007b
+ field @Deprecated public static final int Theme_Holo_Wallpaper = 16973949; // 0x103007d
+ field @Deprecated public static final int Theme_Holo_Wallpaper_NoTitleBar = 16973950; // 0x103007e
field public static final int Theme_InputMethod = 16973908; // 0x1030054
field public static final int Theme_Light = 16973836; // 0x103000c
field public static final int Theme_Light_NoTitleBar = 16973837; // 0x103000d
@@ -2360,18 +2404,18 @@
field public static final int Widget_DeviceDefault_Light = 16974196; // 0x1030174
field public static final int Widget_DeviceDefault_Light_ActionBar = 16974243; // 0x10301a3
field public static final int Widget_DeviceDefault_Light_ActionBar_Solid = 16974247; // 0x10301a7
- field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_Solid_Inverse = 16974248; // 0x10301a8
+ field @Deprecated public static final int Widget_DeviceDefault_Light_ActionBar_Solid_Inverse = 16974248; // 0x10301a8
field public static final int Widget_DeviceDefault_Light_ActionBar_TabBar = 16974246; // 0x10301a6
- field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabBar_Inverse = 16974249; // 0x10301a9
+ field @Deprecated public static final int Widget_DeviceDefault_Light_ActionBar_TabBar_Inverse = 16974249; // 0x10301a9
field public static final int Widget_DeviceDefault_Light_ActionBar_TabText = 16974245; // 0x10301a5
- field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabText_Inverse = 16974251; // 0x10301ab
+ field @Deprecated public static final int Widget_DeviceDefault_Light_ActionBar_TabText_Inverse = 16974251; // 0x10301ab
field public static final int Widget_DeviceDefault_Light_ActionBar_TabView = 16974244; // 0x10301a4
- field public static final deprecated int Widget_DeviceDefault_Light_ActionBar_TabView_Inverse = 16974250; // 0x10301aa
+ field @Deprecated public static final int Widget_DeviceDefault_Light_ActionBar_TabView_Inverse = 16974250; // 0x10301aa
field public static final int Widget_DeviceDefault_Light_ActionButton = 16974239; // 0x103019f
field public static final int Widget_DeviceDefault_Light_ActionButton_CloseMode = 16974242; // 0x10301a2
field public static final int Widget_DeviceDefault_Light_ActionButton_Overflow = 16974240; // 0x10301a0
field public static final int Widget_DeviceDefault_Light_ActionMode = 16974241; // 0x10301a1
- field public static final deprecated int Widget_DeviceDefault_Light_ActionMode_Inverse = 16974252; // 0x10301ac
+ field @Deprecated public static final int Widget_DeviceDefault_Light_ActionMode_Inverse = 16974252; // 0x10301ac
field public static final int Widget_DeviceDefault_Light_AutoCompleteTextView = 16974203; // 0x103017b
field public static final int Widget_DeviceDefault_Light_Button = 16974197; // 0x1030175
field public static final int Widget_DeviceDefault_Light_Button_Borderless_Small = 16974201; // 0x1030179
@@ -2565,7 +2609,7 @@
field public static final int Widget_Holo_WebView = 16973993; // 0x10300a9
field public static final int Widget_ImageButton = 16973862; // 0x1030026
field public static final int Widget_ImageWell = 16973861; // 0x1030025
- field public static final int Widget_KeyboardView = 16973911; // 0x1030057
+ field @Deprecated public static final int Widget_KeyboardView = 16973911; // 0x1030057
field public static final int Widget_ListPopupWindow = 16973957; // 0x1030085
field public static final int Widget_ListView = 16973870; // 0x103002e
field public static final int Widget_ListView_DropDown = 16973872; // 0x1030030
@@ -2754,12 +2798,12 @@
public final class AccessibilityButtonController {
method public boolean isAccessibilityButtonAvailable();
- method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
- method public void registerAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback, android.os.Handler);
- method public void unregisterAccessibilityButtonCallback(android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+ method public void registerAccessibilityButtonCallback(@NonNull android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
+ method public void registerAccessibilityButtonCallback(@NonNull android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback, @NonNull android.os.Handler);
+ method public void unregisterAccessibilityButtonCallback(@NonNull android.accessibilityservice.AccessibilityButtonController.AccessibilityButtonCallback);
}
- public static abstract class AccessibilityButtonController.AccessibilityButtonCallback {
+ public abstract static class AccessibilityButtonController.AccessibilityButtonCallback {
ctor public AccessibilityButtonController.AccessibilityButtonCallback();
method public void onAvailabilityChanged(android.accessibilityservice.AccessibilityButtonController, boolean);
method public void onClicked(android.accessibilityservice.AccessibilityButtonController);
@@ -2768,14 +2812,14 @@
public abstract class AccessibilityService extends android.app.Service {
ctor public AccessibilityService();
method public final void disableSelf();
- method public final boolean dispatchGesture(android.accessibilityservice.GestureDescription, android.accessibilityservice.AccessibilityService.GestureResultCallback, android.os.Handler);
+ method public final boolean dispatchGesture(@NonNull android.accessibilityservice.GestureDescription, @Nullable android.accessibilityservice.AccessibilityService.GestureResultCallback, @Nullable android.os.Handler);
method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
- method public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
- method public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
- method public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
+ method @NonNull public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
+ method @RequiresPermission(android.Manifest.permission.USE_FINGERPRINT) @NonNull public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
+ method @NonNull public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
method public final android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
- method public final android.accessibilityservice.AccessibilityService.SoftKeyboardController getSoftKeyboardController();
+ method @NonNull public final android.accessibilityservice.AccessibilityService.SoftKeyboardController getSoftKeyboardController();
method public java.util.List<android.view.accessibility.AccessibilityWindowInfo> getWindows();
method public abstract void onAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method public final android.os.IBinder onBind(android.content.Intent);
@@ -2810,70 +2854,75 @@
field public static final int GLOBAL_ACTION_RECENTS = 3; // 0x3
field public static final int GLOBAL_ACTION_TAKE_SCREENSHOT = 9; // 0x9
field public static final int GLOBAL_ACTION_TOGGLE_SPLIT_SCREEN = 7; // 0x7
- field public static final java.lang.String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
- field public static final java.lang.String SERVICE_META_DATA = "android.accessibilityservice";
+ field public static final String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
+ field public static final String SERVICE_META_DATA = "android.accessibilityservice";
field public static final int SHOW_MODE_AUTO = 0; // 0x0
field public static final int SHOW_MODE_HIDDEN = 1; // 0x1
+ field public static final int SHOW_MODE_IGNORE_HARD_KEYBOARD = 2; // 0x2
}
- public static abstract class AccessibilityService.GestureResultCallback {
+ public abstract static class AccessibilityService.GestureResultCallback {
ctor public AccessibilityService.GestureResultCallback();
method public void onCancelled(android.accessibilityservice.GestureDescription);
method public void onCompleted(android.accessibilityservice.GestureDescription);
}
public static final class AccessibilityService.MagnificationController {
- method public void addListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
- method public void addListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener, android.os.Handler);
+ method public void addListener(@NonNull android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
+ method public void addListener(@NonNull android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener, @Nullable android.os.Handler);
method public float getCenterX();
method public float getCenterY();
- method public android.graphics.Region getMagnificationRegion();
+ method @NonNull public android.graphics.Region getMagnificationRegion();
method public float getScale();
- method public boolean removeListener(android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
+ method public boolean removeListener(@NonNull android.accessibilityservice.AccessibilityService.MagnificationController.OnMagnificationChangedListener);
method public boolean reset(boolean);
method public boolean setCenter(float, float, boolean);
method public boolean setScale(float, boolean);
}
- public static abstract interface AccessibilityService.MagnificationController.OnMagnificationChangedListener {
- method public abstract void onMagnificationChanged(android.accessibilityservice.AccessibilityService.MagnificationController, android.graphics.Region, float, float, float);
+ public static interface AccessibilityService.MagnificationController.OnMagnificationChangedListener {
+ method public void onMagnificationChanged(@NonNull android.accessibilityservice.AccessibilityService.MagnificationController, @NonNull android.graphics.Region, float, float, float);
}
public static final class AccessibilityService.SoftKeyboardController {
- method public void addOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
- method public void addOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener, android.os.Handler);
+ method public void addOnShowModeChangedListener(@NonNull android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
+ method public void addOnShowModeChangedListener(@NonNull android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener, @Nullable android.os.Handler);
method public int getShowMode();
- method public boolean removeOnShowModeChangedListener(android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
+ method public boolean removeOnShowModeChangedListener(@NonNull android.accessibilityservice.AccessibilityService.SoftKeyboardController.OnShowModeChangedListener);
method public boolean setShowMode(int);
}
- public static abstract interface AccessibilityService.SoftKeyboardController.OnShowModeChangedListener {
- method public abstract void onShowModeChanged(android.accessibilityservice.AccessibilityService.SoftKeyboardController, int);
+ public static interface AccessibilityService.SoftKeyboardController.OnShowModeChangedListener {
+ method public void onShowModeChanged(@NonNull android.accessibilityservice.AccessibilityService.SoftKeyboardController, int);
}
public class AccessibilityServiceInfo implements android.os.Parcelable {
ctor public AccessibilityServiceInfo();
- method public static java.lang.String capabilityToString(int);
+ method public static String capabilityToString(int);
method public int describeContents();
- method public static java.lang.String feedbackTypeToString(int);
- method public static java.lang.String flagToString(int);
- method public deprecated boolean getCanRetrieveWindowContent();
+ method public static String feedbackTypeToString(int);
+ method public static String flagToString(int);
+ method @Deprecated public boolean getCanRetrieveWindowContent();
method public int getCapabilities();
- method public deprecated java.lang.String getDescription();
- method public java.lang.String getId();
+ method @Deprecated public String getDescription();
+ method public String getId();
+ method public int getInteractiveUiTimeoutMillis();
+ method public int getNonInteractiveUiTimeoutMillis();
method public android.content.pm.ResolveInfo getResolveInfo();
- method public java.lang.String getSettingsActivityName();
- method public java.lang.String loadDescription(android.content.pm.PackageManager);
- method public java.lang.CharSequence loadSummary(android.content.pm.PackageManager);
+ method public String getSettingsActivityName();
+ method public String loadDescription(android.content.pm.PackageManager);
+ method public CharSequence loadSummary(android.content.pm.PackageManager);
+ method public void setInteractiveUiTimeoutMillis(@IntRange(from=0) int);
+ method public void setNonInteractiveUiTimeoutMillis(@IntRange(from=0) int);
method public void writeToParcel(android.os.Parcel, int);
field public static final int CAPABILITY_CAN_CONTROL_MAGNIFICATION = 16; // 0x10
field public static final int CAPABILITY_CAN_PERFORM_GESTURES = 32; // 0x20
- field public static final deprecated int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4
+ field @Deprecated public static final int CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 4; // 0x4
field public static final int CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS = 8; // 0x8
field public static final int CAPABILITY_CAN_REQUEST_FINGERPRINT_GESTURES = 64; // 0x40
field public static final int CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION = 2; // 0x2
field public static final int CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT = 1; // 0x1
- field public static final android.os.Parcelable.Creator<android.accessibilityservice.AccessibilityServiceInfo> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.accessibilityservice.AccessibilityServiceInfo> CREATOR;
field public static final int DEFAULT = 1; // 0x1
field public static final int FEEDBACK_ALL_MASK = -1; // 0xffffffff
field public static final int FEEDBACK_AUDIBLE = 4; // 0x4
@@ -2886,21 +2935,22 @@
field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
field public static final int FLAG_REQUEST_ACCESSIBILITY_BUTTON = 256; // 0x100
- field public static final deprecated int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
+ field @Deprecated public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
field public static final int FLAG_REQUEST_FILTER_KEY_EVENTS = 32; // 0x20
field public static final int FLAG_REQUEST_FINGERPRINT_GESTURES = 512; // 0x200
+ field public static final int FLAG_REQUEST_SHORTCUT_WARNING_DIALOG_SPOKEN_FEEDBACK = 1024; // 0x400
field public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 4; // 0x4
field public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 64; // 0x40
field public int eventTypes;
field public int feedbackType;
field public int flags;
field public long notificationTimeout;
- field public java.lang.String[] packageNames;
+ field public String[] packageNames;
}
public final class FingerprintGestureController {
method public boolean isGestureDetectionAvailable();
- method public void registerFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback, android.os.Handler);
+ method public void registerFingerprintGestureCallback(@NonNull android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback, @Nullable android.os.Handler);
method public void unregisterFingerprintGestureCallback(android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback);
field public static final int FINGERPRINT_GESTURE_SWIPE_DOWN = 8; // 0x8
field public static final int FINGERPRINT_GESTURE_SWIPE_LEFT = 2; // 0x2
@@ -2908,7 +2958,7 @@
field public static final int FINGERPRINT_GESTURE_SWIPE_UP = 4; // 0x4
}
- public static abstract class FingerprintGestureController.FingerprintGestureCallback {
+ public abstract static class FingerprintGestureController.FingerprintGestureCallback {
ctor public FingerprintGestureController.FingerprintGestureCallback();
method public void onGestureDetected(int);
method public void onGestureDetectionAvailabilityChanged(boolean);
@@ -2917,19 +2967,19 @@
public final class GestureDescription {
method public static long getMaxGestureDuration();
method public static int getMaxStrokeCount();
- method public android.accessibilityservice.GestureDescription.StrokeDescription getStroke(int);
+ method public android.accessibilityservice.GestureDescription.StrokeDescription getStroke(@IntRange(from=0) int);
method public int getStrokeCount();
}
public static class GestureDescription.Builder {
ctor public GestureDescription.Builder();
- method public android.accessibilityservice.GestureDescription.Builder addStroke(android.accessibilityservice.GestureDescription.StrokeDescription);
+ method public android.accessibilityservice.GestureDescription.Builder addStroke(@NonNull android.accessibilityservice.GestureDescription.StrokeDescription);
method public android.accessibilityservice.GestureDescription build();
}
public static class GestureDescription.StrokeDescription {
- ctor public GestureDescription.StrokeDescription(android.graphics.Path, long, long);
- ctor public GestureDescription.StrokeDescription(android.graphics.Path, long, long, boolean);
+ ctor public GestureDescription.StrokeDescription(@NonNull android.graphics.Path, @IntRange(from=0) long, @IntRange(from=0) long);
+ ctor public GestureDescription.StrokeDescription(@NonNull android.graphics.Path, @IntRange(from=0) long, @IntRange(from=0) long, boolean);
method public android.accessibilityservice.GestureDescription.StrokeDescription continueStroke(android.graphics.Path, long, long, boolean);
method public long getDuration();
method public android.graphics.Path getPath();
@@ -2943,32 +2993,32 @@
public abstract class AbstractAccountAuthenticator {
ctor public AbstractAccountAuthenticator(android.content.Context);
- method public abstract android.os.Bundle addAccount(android.accounts.AccountAuthenticatorResponse, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
+ method public abstract android.os.Bundle addAccount(android.accounts.AccountAuthenticatorResponse, String, String, String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
method public android.os.Bundle addAccountFromCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public abstract android.os.Bundle confirmCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, java.lang.String);
- method public android.os.Bundle finishSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
+ method public abstract android.os.Bundle editProperties(android.accounts.AccountAuthenticatorResponse, String);
+ method public android.os.Bundle finishSession(android.accounts.AccountAuthenticatorResponse, String, android.os.Bundle) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountCredentialsForCloning(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
method public android.os.Bundle getAccountRemovalAllowed(android.accounts.AccountAuthenticatorResponse, android.accounts.Account) throws android.accounts.NetworkErrorException;
- method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public abstract java.lang.String getAuthTokenLabel(java.lang.String);
+ method public abstract android.os.Bundle getAuthToken(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, String, android.os.Bundle) throws android.accounts.NetworkErrorException;
+ method public abstract String getAuthTokenLabel(String);
method public final android.os.IBinder getIBinder();
- method public abstract android.os.Bundle hasFeatures(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String[]) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle isCredentialsUpdateSuggested(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle startAddAccountSession(android.accounts.AccountAuthenticatorResponse, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public android.os.Bundle startUpdateCredentialsSession(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
- method public abstract android.os.Bundle updateCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, java.lang.String, android.os.Bundle) throws android.accounts.NetworkErrorException;
- field public static final java.lang.String KEY_CUSTOM_TOKEN_EXPIRY = "android.accounts.expiry";
+ method public abstract android.os.Bundle hasFeatures(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, String[]) throws android.accounts.NetworkErrorException;
+ method public android.os.Bundle isCredentialsUpdateSuggested(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, String) throws android.accounts.NetworkErrorException;
+ method public android.os.Bundle startAddAccountSession(android.accounts.AccountAuthenticatorResponse, String, String, String[], android.os.Bundle) throws android.accounts.NetworkErrorException;
+ method public android.os.Bundle startUpdateCredentialsSession(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, String, android.os.Bundle) throws android.accounts.NetworkErrorException;
+ method public abstract android.os.Bundle updateCredentials(android.accounts.AccountAuthenticatorResponse, android.accounts.Account, String, android.os.Bundle) throws android.accounts.NetworkErrorException;
+ field public static final String KEY_CUSTOM_TOKEN_EXPIRY = "android.accounts.expiry";
}
public class Account implements android.os.Parcelable {
- ctor public Account(java.lang.String, java.lang.String);
+ ctor public Account(String, String);
ctor public Account(android.os.Parcel);
method public int describeContents();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.accounts.Account> CREATOR;
- field public final java.lang.String name;
- field public final java.lang.String type;
+ field @NonNull public static final android.os.Parcelable.Creator<android.accounts.Account> CREATOR;
+ field public final String name;
+ field public final String type;
}
public class AccountAuthenticatorActivity extends android.app.Activity {
@@ -2979,63 +3029,63 @@
public class AccountAuthenticatorResponse implements android.os.Parcelable {
ctor public AccountAuthenticatorResponse(android.os.Parcel);
method public int describeContents();
- method public void onError(int, java.lang.String);
+ method public void onError(int, String);
method public void onRequestContinued();
method public void onResult(android.os.Bundle);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.accounts.AccountAuthenticatorResponse> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.accounts.AccountAuthenticatorResponse> CREATOR;
}
public class AccountManager {
- method public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle);
- method public boolean addAccountExplicitly(android.accounts.Account, java.lang.String, android.os.Bundle, java.util.Map<java.lang.String, java.lang.Integer>);
- method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
- method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, java.lang.String[]);
- method public java.lang.String blockingGetAuthToken(android.accounts.Account, java.lang.String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
- method public void clearPassword(android.accounts.Account);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(java.lang.String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> addAccount(String, String, String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public boolean addAccountExplicitly(android.accounts.Account, String, android.os.Bundle);
+ method public boolean addAccountExplicitly(android.accounts.Account, String, android.os.Bundle, java.util.Map<java.lang.String,java.lang.Integer>);
+ method @RequiresPermission(value="android.permission.GET_ACCOUNTS", apis="..22") public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean);
+ method public void addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, String[]);
+ method @RequiresPermission(value="android.permission.USE_CREDENTIALS", apis="..22") public String blockingGetAuthToken(android.accounts.Account, String, boolean) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public void clearPassword(android.accounts.Account);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> editProperties(String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public android.accounts.AccountManagerFuture<android.os.Bundle> finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public static android.accounts.AccountManager get(android.content.Context);
- method public int getAccountVisibility(android.accounts.Account, java.lang.String);
- method public android.accounts.Account[] getAccounts();
- method public java.util.Map<android.accounts.Account, java.lang.Integer> getAccountsAndVisibilityForPackage(java.lang.String, java.lang.String);
- method public android.accounts.Account[] getAccountsByType(java.lang.String);
- method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(java.lang.String, java.lang.String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler);
- method public android.accounts.Account[] getAccountsByTypeForPackage(java.lang.String, java.lang.String);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public deprecated android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, java.lang.String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(java.lang.String, java.lang.String, java.lang.String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method public int getAccountVisibility(android.accounts.Account, String);
+ method @NonNull @RequiresPermission(value="android.permission.GET_ACCOUNTS", apis="..22") public android.accounts.Account[] getAccounts();
+ method public java.util.Map<android.accounts.Account,java.lang.Integer> getAccountsAndVisibilityForPackage(String, String);
+ method @NonNull @RequiresPermission(value="android.permission.GET_ACCOUNTS", apis="..22") public android.accounts.Account[] getAccountsByType(String);
+ method public android.accounts.AccountManagerFuture<android.accounts.Account[]> getAccountsByTypeAndFeatures(String, String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler);
+ method @NonNull public android.accounts.Account[] getAccountsByTypeForPackage(String, String);
+ method @RequiresPermission(value="android.permission.USE_CREDENTIALS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @Deprecated @RequiresPermission(value="android.permission.USE_CREDENTIALS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.USE_CREDENTIALS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthToken(android.accounts.Account, String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> getAuthTokenByFeatures(String, String, String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
method public android.accounts.AuthenticatorDescription[] getAuthenticatorTypes();
- method public java.util.Map<java.lang.String, java.lang.Integer> getPackagesAndVisibilityForAccount(android.accounts.Account);
- method public java.lang.String getPassword(android.accounts.Account);
- method public java.lang.String getPreviousName(android.accounts.Account);
- method public java.lang.String getUserData(android.accounts.Account, java.lang.String);
- method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, java.lang.String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
- method public void invalidateAuthToken(java.lang.String, java.lang.String);
- method public android.accounts.AccountManagerFuture<java.lang.Boolean> isCredentialsUpdateSuggested(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
- method public static deprecated android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.ArrayList<android.accounts.Account>, java.lang.String[], boolean, java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle);
- method public static android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.List<android.accounts.Account>, java.lang.String[], java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle);
- method public boolean notifyAccountAuthenticated(android.accounts.Account);
- method public java.lang.String peekAuthToken(android.accounts.Account, java.lang.String);
- method public deprecated android.accounts.AccountManagerFuture<java.lang.Boolean> removeAccount(android.accounts.Account, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public boolean removeAccountExplicitly(android.accounts.Account);
+ method public java.util.Map<java.lang.String,java.lang.Integer> getPackagesAndVisibilityForAccount(android.accounts.Account);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public String getPassword(android.accounts.Account);
+ method public String getPreviousName(android.accounts.Account);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public String getUserData(android.accounts.Account, String);
+ method public android.accounts.AccountManagerFuture<java.lang.Boolean> hasFeatures(android.accounts.Account, String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
+ method @RequiresPermission(anyOf={"android.permission.MANAGE_ACCOUNTS", "android.permission.USE_CREDENTIALS"}, apis="..22") public void invalidateAuthToken(String, String);
+ method public android.accounts.AccountManagerFuture<java.lang.Boolean> isCredentialsUpdateSuggested(android.accounts.Account, String, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
+ method @Deprecated public static android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.ArrayList<android.accounts.Account>, String[], boolean, String, String, String[], android.os.Bundle);
+ method public static android.content.Intent newChooseAccountIntent(android.accounts.Account, java.util.List<android.accounts.Account>, String[], String, String, String[], android.os.Bundle);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public boolean notifyAccountAuthenticated(android.accounts.Account);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public String peekAuthToken(android.accounts.Account, String);
+ method @Deprecated @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<java.lang.Boolean> removeAccount(android.accounts.Account, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public boolean removeAccountExplicitly(android.accounts.Account);
method public void removeOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener);
- method public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
- method public boolean setAccountVisibility(android.accounts.Account, java.lang.String, int);
- method public void setAuthToken(android.accounts.Account, java.lang.String, java.lang.String);
- method public void setPassword(android.accounts.Account, java.lang.String);
- method public void setUserData(android.accounts.Account, java.lang.String, java.lang.String);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> startAddAccountSession(java.lang.String, java.lang.String, java.lang.String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> startUpdateCredentialsSession(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- method public android.accounts.AccountManagerFuture<android.os.Bundle> updateCredentials(android.accounts.Account, java.lang.String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
- field public static final java.lang.String ACTION_ACCOUNT_REMOVED = "android.accounts.action.ACCOUNT_REMOVED";
- field public static final java.lang.String ACTION_AUTHENTICATOR_INTENT = "android.accounts.AccountAuthenticator";
- field public static final java.lang.String AUTHENTICATOR_ATTRIBUTES_NAME = "account-authenticator";
- field public static final java.lang.String AUTHENTICATOR_META_DATA_NAME = "android.accounts.AccountAuthenticator";
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.accounts.Account> renameAccount(android.accounts.Account, @Size(min=1) String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler);
+ method public boolean setAccountVisibility(android.accounts.Account, String, int);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public void setAuthToken(android.accounts.Account, String, String);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public void setPassword(android.accounts.Account, String);
+ method @RequiresPermission(value="android.permission.AUTHENTICATE_ACCOUNTS", apis="..22") public void setUserData(android.accounts.Account, String, String);
+ method public android.accounts.AccountManagerFuture<android.os.Bundle> startAddAccountSession(String, String, String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method public android.accounts.AccountManagerFuture<android.os.Bundle> startUpdateCredentialsSession(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ method @RequiresPermission(value="android.permission.MANAGE_ACCOUNTS", apis="..22") public android.accounts.AccountManagerFuture<android.os.Bundle> updateCredentials(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler);
+ field public static final String ACTION_ACCOUNT_REMOVED = "android.accounts.action.ACCOUNT_REMOVED";
+ field public static final String ACTION_AUTHENTICATOR_INTENT = "android.accounts.AccountAuthenticator";
+ field public static final String AUTHENTICATOR_ATTRIBUTES_NAME = "account-authenticator";
+ field public static final String AUTHENTICATOR_META_DATA_NAME = "android.accounts.AccountAuthenticator";
field public static final int ERROR_CODE_BAD_ARGUMENTS = 7; // 0x7
field public static final int ERROR_CODE_BAD_AUTHENTICATION = 9; // 0x9
field public static final int ERROR_CODE_BAD_REQUEST = 8; // 0x8
@@ -3044,30 +3094,30 @@
field public static final int ERROR_CODE_NETWORK_ERROR = 3; // 0x3
field public static final int ERROR_CODE_REMOTE_EXCEPTION = 1; // 0x1
field public static final int ERROR_CODE_UNSUPPORTED_OPERATION = 6; // 0x6
- field public static final java.lang.String KEY_ACCOUNTS = "accounts";
- field public static final java.lang.String KEY_ACCOUNT_AUTHENTICATOR_RESPONSE = "accountAuthenticatorResponse";
- field public static final java.lang.String KEY_ACCOUNT_MANAGER_RESPONSE = "accountManagerResponse";
- field public static final java.lang.String KEY_ACCOUNT_NAME = "authAccount";
- field public static final java.lang.String KEY_ACCOUNT_SESSION_BUNDLE = "accountSessionBundle";
- field public static final java.lang.String KEY_ACCOUNT_STATUS_TOKEN = "accountStatusToken";
- field public static final java.lang.String KEY_ACCOUNT_TYPE = "accountType";
- field public static final java.lang.String KEY_ANDROID_PACKAGE_NAME = "androidPackageName";
- field public static final java.lang.String KEY_AUTHENTICATOR_TYPES = "authenticator_types";
- field public static final java.lang.String KEY_AUTHTOKEN = "authtoken";
- field public static final java.lang.String KEY_AUTH_FAILED_MESSAGE = "authFailedMessage";
- field public static final java.lang.String KEY_AUTH_TOKEN_LABEL = "authTokenLabelKey";
- field public static final java.lang.String KEY_BOOLEAN_RESULT = "booleanResult";
- field public static final java.lang.String KEY_CALLER_PID = "callerPid";
- field public static final java.lang.String KEY_CALLER_UID = "callerUid";
- field public static final java.lang.String KEY_ERROR_CODE = "errorCode";
- field public static final java.lang.String KEY_ERROR_MESSAGE = "errorMessage";
- field public static final java.lang.String KEY_INTENT = "intent";
- field public static final java.lang.String KEY_LAST_AUTHENTICATED_TIME = "lastAuthenticatedTime";
- field public static final java.lang.String KEY_PASSWORD = "password";
- field public static final java.lang.String KEY_USERDATA = "userdata";
- field public static final deprecated java.lang.String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
- field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE = "android:accounts:key_legacy_not_visible";
- field public static final java.lang.String PACKAGE_NAME_KEY_LEGACY_VISIBLE = "android:accounts:key_legacy_visible";
+ field public static final String KEY_ACCOUNTS = "accounts";
+ field public static final String KEY_ACCOUNT_AUTHENTICATOR_RESPONSE = "accountAuthenticatorResponse";
+ field public static final String KEY_ACCOUNT_MANAGER_RESPONSE = "accountManagerResponse";
+ field public static final String KEY_ACCOUNT_NAME = "authAccount";
+ field public static final String KEY_ACCOUNT_SESSION_BUNDLE = "accountSessionBundle";
+ field public static final String KEY_ACCOUNT_STATUS_TOKEN = "accountStatusToken";
+ field public static final String KEY_ACCOUNT_TYPE = "accountType";
+ field public static final String KEY_ANDROID_PACKAGE_NAME = "androidPackageName";
+ field public static final String KEY_AUTHENTICATOR_TYPES = "authenticator_types";
+ field public static final String KEY_AUTHTOKEN = "authtoken";
+ field public static final String KEY_AUTH_FAILED_MESSAGE = "authFailedMessage";
+ field public static final String KEY_AUTH_TOKEN_LABEL = "authTokenLabelKey";
+ field public static final String KEY_BOOLEAN_RESULT = "booleanResult";
+ field public static final String KEY_CALLER_PID = "callerPid";
+ field public static final String KEY_CALLER_UID = "callerUid";
+ field public static final String KEY_ERROR_CODE = "errorCode";
+ field public static final String KEY_ERROR_MESSAGE = "errorMessage";
+ field public static final String KEY_INTENT = "intent";
+ field public static final String KEY_LAST_AUTHENTICATED_TIME = "lastAuthenticatedTime";
+ field public static final String KEY_PASSWORD = "password";
+ field public static final String KEY_USERDATA = "userdata";
+ field @Deprecated public static final String LOGIN_ACCOUNTS_CHANGED_ACTION = "android.accounts.LOGIN_ACCOUNTS_CHANGED";
+ field public static final String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE = "android:accounts:key_legacy_not_visible";
+ field public static final String PACKAGE_NAME_KEY_LEGACY_VISIBLE = "android:accounts:key_legacy_visible";
field public static final int VISIBILITY_NOT_VISIBLE = 3; // 0x3
field public static final int VISIBILITY_UNDEFINED = 0; // 0x0
field public static final int VISIBILITY_USER_MANAGED_NOT_VISIBLE = 4; // 0x4
@@ -3075,64 +3125,64 @@
field public static final int VISIBILITY_VISIBLE = 1; // 0x1
}
- public abstract interface AccountManagerCallback<V> {
- method public abstract void run(android.accounts.AccountManagerFuture<V>);
+ public interface AccountManagerCallback<V> {
+ method public void run(android.accounts.AccountManagerFuture<V>);
}
- public abstract interface AccountManagerFuture<V> {
- method public abstract boolean cancel(boolean);
- method public abstract V getResult() throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
- method public abstract V getResult(long, java.util.concurrent.TimeUnit) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
- method public abstract boolean isCancelled();
- method public abstract boolean isDone();
+ public interface AccountManagerFuture<V> {
+ method public boolean cancel(boolean);
+ method public V getResult() throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
+ method public V getResult(long, java.util.concurrent.TimeUnit) throws android.accounts.AuthenticatorException, java.io.IOException, android.accounts.OperationCanceledException;
+ method public boolean isCancelled();
+ method public boolean isDone();
}
public class AccountsException extends java.lang.Exception {
ctor public AccountsException();
- ctor public AccountsException(java.lang.String);
- ctor public AccountsException(java.lang.String, java.lang.Throwable);
- ctor public AccountsException(java.lang.Throwable);
+ ctor public AccountsException(String);
+ ctor public AccountsException(String, Throwable);
+ ctor public AccountsException(Throwable);
}
public class AuthenticatorDescription implements android.os.Parcelable {
- ctor public AuthenticatorDescription(java.lang.String, java.lang.String, int, int, int, int, boolean);
- ctor public AuthenticatorDescription(java.lang.String, java.lang.String, int, int, int, int);
+ ctor public AuthenticatorDescription(String, String, int, int, int, int, boolean);
+ ctor public AuthenticatorDescription(String, String, int, int, int, int);
method public int describeContents();
- method public static android.accounts.AuthenticatorDescription newKey(java.lang.String);
+ method public static android.accounts.AuthenticatorDescription newKey(String);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.accounts.AuthenticatorDescription> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.accounts.AuthenticatorDescription> CREATOR;
field public final int accountPreferencesId;
field public final boolean customTokens;
field public final int iconId;
field public final int labelId;
- field public final java.lang.String packageName;
+ field public final String packageName;
field public final int smallIconId;
- field public final java.lang.String type;
+ field public final String type;
}
public class AuthenticatorException extends android.accounts.AccountsException {
ctor public AuthenticatorException();
- ctor public AuthenticatorException(java.lang.String);
- ctor public AuthenticatorException(java.lang.String, java.lang.Throwable);
- ctor public AuthenticatorException(java.lang.Throwable);
+ ctor public AuthenticatorException(String);
+ ctor public AuthenticatorException(String, Throwable);
+ ctor public AuthenticatorException(Throwable);
}
public class NetworkErrorException extends android.accounts.AccountsException {
ctor public NetworkErrorException();
- ctor public NetworkErrorException(java.lang.String);
- ctor public NetworkErrorException(java.lang.String, java.lang.Throwable);
- ctor public NetworkErrorException(java.lang.Throwable);
+ ctor public NetworkErrorException(String);
+ ctor public NetworkErrorException(String, Throwable);
+ ctor public NetworkErrorException(Throwable);
}
- public abstract interface OnAccountsUpdateListener {
- method public abstract void onAccountsUpdated(android.accounts.Account[]);
+ public interface OnAccountsUpdateListener {
+ method public void onAccountsUpdated(android.accounts.Account[]);
}
public class OperationCanceledException extends android.accounts.AccountsException {
ctor public OperationCanceledException();
- ctor public OperationCanceledException(java.lang.String);
- ctor public OperationCanceledException(java.lang.String, java.lang.Throwable);
- ctor public OperationCanceledException(java.lang.Throwable);
+ ctor public OperationCanceledException(String);
+ ctor public OperationCanceledException(String, Throwable);
+ ctor public OperationCanceledException(Throwable);
}
}
@@ -3162,30 +3212,30 @@
method public abstract android.animation.Animator setDuration(long);
method public abstract void setInterpolator(android.animation.TimeInterpolator);
method public abstract void setStartDelay(long);
- method public void setTarget(java.lang.Object);
+ method public void setTarget(@Nullable Object);
method public void setupEndValues();
method public void setupStartValues();
method public void start();
field public static final long DURATION_INFINITE = -1L; // 0xffffffffffffffffL
}
- public static abstract interface Animator.AnimatorListener {
- method public abstract void onAnimationCancel(android.animation.Animator);
+ public static interface Animator.AnimatorListener {
+ method public void onAnimationCancel(android.animation.Animator);
method public default void onAnimationEnd(android.animation.Animator, boolean);
- method public abstract void onAnimationEnd(android.animation.Animator);
- method public abstract void onAnimationRepeat(android.animation.Animator);
+ method public void onAnimationEnd(android.animation.Animator);
+ method public void onAnimationRepeat(android.animation.Animator);
method public default void onAnimationStart(android.animation.Animator, boolean);
- method public abstract void onAnimationStart(android.animation.Animator);
+ method public void onAnimationStart(android.animation.Animator);
}
- public static abstract interface Animator.AnimatorPauseListener {
- method public abstract void onAnimationPause(android.animation.Animator);
- method public abstract void onAnimationResume(android.animation.Animator);
+ public static interface Animator.AnimatorPauseListener {
+ method public void onAnimationPause(android.animation.Animator);
+ method public void onAnimationResume(android.animation.Animator);
}
public class AnimatorInflater {
ctor public AnimatorInflater();
- method public static android.animation.Animator loadAnimator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
+ method public static android.animation.Animator loadAnimator(android.content.Context, @AnimatorRes int) throws android.content.res.Resources.NotFoundException;
method public static android.animation.StateListAnimator loadStateListAnimator(android.content.Context, int) throws android.content.res.Resources.NotFoundException;
}
@@ -3228,35 +3278,35 @@
public class ArgbEvaluator implements android.animation.TypeEvaluator {
ctor public ArgbEvaluator();
- method public java.lang.Object evaluate(float, java.lang.Object, java.lang.Object);
+ method public Object evaluate(float, Object, Object);
}
- public abstract class BidirectionalTypeConverter<T, V> extends android.animation.TypeConverter {
- ctor public BidirectionalTypeConverter(java.lang.Class<T>, java.lang.Class<V>);
+ public abstract class BidirectionalTypeConverter<T, V> extends android.animation.TypeConverter<T,V> {
+ ctor public BidirectionalTypeConverter(Class<T>, Class<V>);
method public abstract T convertBack(V);
- method public android.animation.BidirectionalTypeConverter<V, T> invert();
+ method public android.animation.BidirectionalTypeConverter<V,T> invert();
}
- public class FloatArrayEvaluator implements android.animation.TypeEvaluator {
+ public class FloatArrayEvaluator implements android.animation.TypeEvaluator<float[]> {
ctor public FloatArrayEvaluator();
ctor public FloatArrayEvaluator(float[]);
method public float[] evaluate(float, float[], float[]);
}
- public class FloatEvaluator implements android.animation.TypeEvaluator {
+ public class FloatEvaluator implements android.animation.TypeEvaluator<java.lang.Number> {
ctor public FloatEvaluator();
- method public java.lang.Float evaluate(float, java.lang.Number, java.lang.Number);
+ method public Float evaluate(float, Number, Number);
}
- public class IntArrayEvaluator implements android.animation.TypeEvaluator {
+ public class IntArrayEvaluator implements android.animation.TypeEvaluator<int[]> {
ctor public IntArrayEvaluator();
ctor public IntArrayEvaluator(int[]);
method public int[] evaluate(float, int[], int[]);
}
- public class IntEvaluator implements android.animation.TypeEvaluator {
+ public class IntEvaluator implements android.animation.TypeEvaluator<java.lang.Integer> {
ctor public IntEvaluator();
- method public java.lang.Integer evaluate(float, java.lang.Integer, java.lang.Integer);
+ method public Integer evaluate(float, Integer, Integer);
}
public abstract class Keyframe implements java.lang.Cloneable {
@@ -3264,18 +3314,18 @@
method public abstract android.animation.Keyframe clone();
method public float getFraction();
method public android.animation.TimeInterpolator getInterpolator();
- method public java.lang.Class getType();
- method public abstract java.lang.Object getValue();
+ method public Class getType();
+ method public abstract Object getValue();
method public boolean hasValue();
method public static android.animation.Keyframe ofFloat(float, float);
method public static android.animation.Keyframe ofFloat(float);
method public static android.animation.Keyframe ofInt(float, int);
method public static android.animation.Keyframe ofInt(float);
- method public static android.animation.Keyframe ofObject(float, java.lang.Object);
+ method public static android.animation.Keyframe ofObject(float, Object);
method public static android.animation.Keyframe ofObject(float);
method public void setFraction(float);
method public void setInterpolator(android.animation.TimeInterpolator);
- method public abstract void setValue(java.lang.Object);
+ method public abstract void setValue(Object);
}
public class LayoutTransition {
@@ -3290,7 +3340,7 @@
method public long getStagger(int);
method public long getStartDelay(int);
method public java.util.List<android.animation.LayoutTransition.TransitionListener> getTransitionListeners();
- method public deprecated void hideChild(android.view.ViewGroup, android.view.View);
+ method @Deprecated public void hideChild(android.view.ViewGroup, android.view.View);
method public void hideChild(android.view.ViewGroup, android.view.View, int);
method public boolean isChangingLayout();
method public boolean isRunning();
@@ -3304,7 +3354,7 @@
method public void setInterpolator(int, android.animation.TimeInterpolator);
method public void setStagger(int, long);
method public void setStartDelay(int, long);
- method public deprecated void showChild(android.view.ViewGroup, android.view.View);
+ method @Deprecated public void showChild(android.view.ViewGroup, android.view.View);
method public void showChild(android.view.ViewGroup, android.view.View, int);
field public static final int APPEARING = 2; // 0x2
field public static final int CHANGE_APPEARING = 0; // 0x0
@@ -3313,45 +3363,45 @@
field public static final int DISAPPEARING = 3; // 0x3
}
- public static abstract interface LayoutTransition.TransitionListener {
- method public abstract void endTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
- method public abstract void startTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
+ public static interface LayoutTransition.TransitionListener {
+ method public void endTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
+ method public void startTransition(android.animation.LayoutTransition, android.view.ViewGroup, android.view.View, int);
}
public final class ObjectAnimator extends android.animation.ValueAnimator {
ctor public ObjectAnimator();
method public android.animation.ObjectAnimator clone();
- method public java.lang.String getPropertyName();
- method public java.lang.Object getTarget();
- method public static android.animation.ObjectAnimator ofArgb(java.lang.Object, java.lang.String, int...);
- method public static <T> android.animation.ObjectAnimator ofArgb(T, android.util.Property<T, java.lang.Integer>, int...);
- method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, float...);
- method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
- method public static <T> android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, float...);
- method public static <T> android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, android.util.Property<T, java.lang.Float>, android.graphics.Path);
- method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, int...);
- method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
- method public static <T> android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, int...);
- method public static <T> android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, android.util.Property<T, java.lang.Integer>, android.graphics.Path);
- method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, float[][]);
- method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.graphics.Path);
- method public static <T> android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, T...);
- method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, int[][]);
- method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.graphics.Path);
- method public static <T> android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, T...);
- method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
- method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
- method public static <T, V> android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeEvaluator<V>, V...);
- method public static <T, V, P> android.animation.ObjectAnimator ofObject(T, android.util.Property<T, P>, android.animation.TypeConverter<V, P>, android.animation.TypeEvaluator<V>, V...);
- method public static <T, V> android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
- method public static android.animation.ObjectAnimator ofPropertyValuesHolder(java.lang.Object, android.animation.PropertyValuesHolder...);
+ method @Nullable public String getPropertyName();
+ method @Nullable public Object getTarget();
+ method public static android.animation.ObjectAnimator ofArgb(Object, String, int...);
+ method public static <T> android.animation.ObjectAnimator ofArgb(T, android.util.Property<T,java.lang.Integer>, int...);
+ method public static android.animation.ObjectAnimator ofFloat(Object, String, float...);
+ method public static android.animation.ObjectAnimator ofFloat(Object, String, String, android.graphics.Path);
+ method public static <T> android.animation.ObjectAnimator ofFloat(T, android.util.Property<T,java.lang.Float>, float...);
+ method public static <T> android.animation.ObjectAnimator ofFloat(T, android.util.Property<T,java.lang.Float>, android.util.Property<T,java.lang.Float>, android.graphics.Path);
+ method public static android.animation.ObjectAnimator ofInt(Object, String, int...);
+ method public static android.animation.ObjectAnimator ofInt(Object, String, String, android.graphics.Path);
+ method public static <T> android.animation.ObjectAnimator ofInt(T, android.util.Property<T,java.lang.Integer>, int...);
+ method public static <T> android.animation.ObjectAnimator ofInt(T, android.util.Property<T,java.lang.Integer>, android.util.Property<T,java.lang.Integer>, android.graphics.Path);
+ method public static android.animation.ObjectAnimator ofMultiFloat(Object, String, float[][]);
+ method public static android.animation.ObjectAnimator ofMultiFloat(Object, String, android.graphics.Path);
+ method @java.lang.SafeVarargs public static <T> android.animation.ObjectAnimator ofMultiFloat(Object, String, android.animation.TypeConverter<T,float[]>, android.animation.TypeEvaluator<T>, T...);
+ method public static android.animation.ObjectAnimator ofMultiInt(Object, String, int[][]);
+ method public static android.animation.ObjectAnimator ofMultiInt(Object, String, android.graphics.Path);
+ method @java.lang.SafeVarargs public static <T> android.animation.ObjectAnimator ofMultiInt(Object, String, android.animation.TypeConverter<T,int[]>, android.animation.TypeEvaluator<T>, T...);
+ method public static android.animation.ObjectAnimator ofObject(Object, String, android.animation.TypeEvaluator, java.lang.Object...);
+ method @NonNull public static android.animation.ObjectAnimator ofObject(Object, String, @Nullable android.animation.TypeConverter<android.graphics.PointF,?>, android.graphics.Path);
+ method @NonNull @java.lang.SafeVarargs public static <T, V> android.animation.ObjectAnimator ofObject(T, android.util.Property<T,V>, android.animation.TypeEvaluator<V>, V...);
+ method @NonNull @java.lang.SafeVarargs public static <T, V, P> android.animation.ObjectAnimator ofObject(T, android.util.Property<T,P>, android.animation.TypeConverter<V,P>, android.animation.TypeEvaluator<V>, V...);
+ method @NonNull public static <T, V> android.animation.ObjectAnimator ofObject(T, @NonNull android.util.Property<T,V>, @Nullable android.animation.TypeConverter<android.graphics.PointF,V>, android.graphics.Path);
+ method @NonNull public static android.animation.ObjectAnimator ofPropertyValuesHolder(Object, android.animation.PropertyValuesHolder...);
method public void setAutoCancel(boolean);
- method public android.animation.ObjectAnimator setDuration(long);
- method public void setProperty(android.util.Property);
- method public void setPropertyName(java.lang.String);
+ method @NonNull public android.animation.ObjectAnimator setDuration(long);
+ method public void setProperty(@NonNull android.util.Property);
+ method public void setPropertyName(@NonNull String);
}
- public class PointFEvaluator implements android.animation.TypeEvaluator {
+ public class PointFEvaluator implements android.animation.TypeEvaluator<android.graphics.PointF> {
ctor public PointFEvaluator();
ctor public PointFEvaluator(android.graphics.PointF);
method public android.graphics.PointF evaluate(float, android.graphics.PointF, android.graphics.PointF);
@@ -3359,26 +3409,26 @@
public class PropertyValuesHolder implements java.lang.Cloneable {
method public android.animation.PropertyValuesHolder clone();
- method public java.lang.String getPropertyName();
- method public static android.animation.PropertyValuesHolder ofFloat(java.lang.String, float...);
- method public static android.animation.PropertyValuesHolder ofFloat(android.util.Property<?, java.lang.Float>, float...);
- method public static android.animation.PropertyValuesHolder ofInt(java.lang.String, int...);
- method public static android.animation.PropertyValuesHolder ofInt(android.util.Property<?, java.lang.Integer>, int...);
- method public static android.animation.PropertyValuesHolder ofKeyframe(java.lang.String, android.animation.Keyframe...);
+ method public String getPropertyName();
+ method public static android.animation.PropertyValuesHolder ofFloat(String, float...);
+ method public static android.animation.PropertyValuesHolder ofFloat(android.util.Property<?,java.lang.Float>, float...);
+ method public static android.animation.PropertyValuesHolder ofInt(String, int...);
+ method public static android.animation.PropertyValuesHolder ofInt(android.util.Property<?,java.lang.Integer>, int...);
+ method public static android.animation.PropertyValuesHolder ofKeyframe(String, android.animation.Keyframe...);
method public static android.animation.PropertyValuesHolder ofKeyframe(android.util.Property, android.animation.Keyframe...);
- method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, float[][]);
- method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.graphics.Path);
- method public static <V> android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<V, float[]>, android.animation.TypeEvaluator<V>, V...);
- method public static <T> android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
- method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, int[][]);
- method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.graphics.Path);
- method public static <V> android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<V, int[]>, android.animation.TypeEvaluator<V>, V...);
- method public static <T> android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
- method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
- method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
- method public static <V> android.animation.PropertyValuesHolder ofObject(android.util.Property, android.animation.TypeEvaluator<V>, V...);
- method public static <T, V> android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<T, V>, android.animation.TypeEvaluator<T>, T...);
- method public static <V> android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
+ method public static android.animation.PropertyValuesHolder ofMultiFloat(String, float[][]);
+ method public static android.animation.PropertyValuesHolder ofMultiFloat(String, android.graphics.Path);
+ method @java.lang.SafeVarargs public static <V> android.animation.PropertyValuesHolder ofMultiFloat(String, android.animation.TypeConverter<V,float[]>, android.animation.TypeEvaluator<V>, V...);
+ method public static <T> android.animation.PropertyValuesHolder ofMultiFloat(String, android.animation.TypeConverter<T,float[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
+ method public static android.animation.PropertyValuesHolder ofMultiInt(String, int[][]);
+ method public static android.animation.PropertyValuesHolder ofMultiInt(String, android.graphics.Path);
+ method @java.lang.SafeVarargs public static <V> android.animation.PropertyValuesHolder ofMultiInt(String, android.animation.TypeConverter<V,int[]>, android.animation.TypeEvaluator<V>, V...);
+ method public static <T> android.animation.PropertyValuesHolder ofMultiInt(String, android.animation.TypeConverter<T,int[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
+ method public static android.animation.PropertyValuesHolder ofObject(String, android.animation.TypeEvaluator, java.lang.Object...);
+ method public static android.animation.PropertyValuesHolder ofObject(String, android.animation.TypeConverter<android.graphics.PointF,?>, android.graphics.Path);
+ method @java.lang.SafeVarargs public static <V> android.animation.PropertyValuesHolder ofObject(android.util.Property, android.animation.TypeEvaluator<V>, V...);
+ method @java.lang.SafeVarargs public static <T, V> android.animation.PropertyValuesHolder ofObject(android.util.Property<?,V>, android.animation.TypeConverter<T,V>, android.animation.TypeEvaluator<T>, T...);
+ method public static <V> android.animation.PropertyValuesHolder ofObject(android.util.Property<?,V>, android.animation.TypeConverter<android.graphics.PointF,V>, android.graphics.Path);
method public void setConverter(android.animation.TypeConverter);
method public void setEvaluator(android.animation.TypeEvaluator);
method public void setFloatValues(float...);
@@ -3386,10 +3436,10 @@
method public void setKeyframes(android.animation.Keyframe...);
method public void setObjectValues(java.lang.Object...);
method public void setProperty(android.util.Property);
- method public void setPropertyName(java.lang.String);
+ method public void setPropertyName(String);
}
- public class RectEvaluator implements android.animation.TypeEvaluator {
+ public class RectEvaluator implements android.animation.TypeEvaluator<android.graphics.Rect> {
ctor public RectEvaluator();
ctor public RectEvaluator(android.graphics.Rect);
method public android.graphics.Rect evaluate(float, android.graphics.Rect, android.graphics.Rect);
@@ -3407,21 +3457,21 @@
method public void setTimeListener(android.animation.TimeAnimator.TimeListener);
}
- public static abstract interface TimeAnimator.TimeListener {
- method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long);
+ public static interface TimeAnimator.TimeListener {
+ method public void onTimeUpdate(android.animation.TimeAnimator, long, long);
}
- public abstract interface TimeInterpolator {
- method public abstract float getInterpolation(float);
+ public interface TimeInterpolator {
+ method public float getInterpolation(float);
}
public abstract class TypeConverter<T, V> {
- ctor public TypeConverter(java.lang.Class<T>, java.lang.Class<V>);
+ ctor public TypeConverter(Class<T>, Class<V>);
method public abstract V convert(T);
}
- public abstract interface TypeEvaluator<T> {
- method public abstract T evaluate(float, T, T);
+ public interface TypeEvaluator<T> {
+ method public T evaluate(float, T, T);
}
public class ValueAnimator extends android.animation.Animator {
@@ -3430,8 +3480,8 @@
method public static boolean areAnimatorsEnabled();
method public android.animation.ValueAnimator clone();
method public float getAnimatedFraction();
- method public java.lang.Object getAnimatedValue();
- method public java.lang.Object getAnimatedValue(java.lang.String);
+ method public Object getAnimatedValue();
+ method public Object getAnimatedValue(String);
method public long getCurrentPlayTime();
method public long getDuration();
method public static long getFrameDelay();
@@ -3466,18 +3516,20 @@
field public static final int REVERSE = 2; // 0x2
}
- public static abstract interface ValueAnimator.AnimatorUpdateListener {
- method public abstract void onAnimationUpdate(android.animation.ValueAnimator);
+ public static interface ValueAnimator.AnimatorUpdateListener {
+ method public void onAnimationUpdate(android.animation.ValueAnimator);
}
}
package android.annotation {
- public abstract class SuppressLint implements java.lang.annotation.Annotation {
+ @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface SuppressLint {
+ method public abstract String[] value();
}
- public abstract class TargetApi implements java.lang.annotation.Annotation {
+ @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface TargetApi {
+ method public abstract int value();
}
}
@@ -3487,37 +3539,37 @@
public abstract class ActionBar {
ctor public ActionBar();
method public abstract void addOnMenuVisibilityListener(android.app.ActionBar.OnMenuVisibilityListener);
- method public abstract deprecated void addTab(android.app.ActionBar.Tab);
- method public abstract deprecated void addTab(android.app.ActionBar.Tab, boolean);
- method public abstract deprecated void addTab(android.app.ActionBar.Tab, int);
- method public abstract deprecated void addTab(android.app.ActionBar.Tab, int, boolean);
+ method @Deprecated public abstract void addTab(android.app.ActionBar.Tab);
+ method @Deprecated public abstract void addTab(android.app.ActionBar.Tab, boolean);
+ method @Deprecated public abstract void addTab(android.app.ActionBar.Tab, int);
+ method @Deprecated public abstract void addTab(android.app.ActionBar.Tab, int, boolean);
method public abstract android.view.View getCustomView();
method public abstract int getDisplayOptions();
method public float getElevation();
method public abstract int getHeight();
method public int getHideOffset();
- method public abstract deprecated int getNavigationItemCount();
- method public abstract deprecated int getNavigationMode();
- method public abstract deprecated int getSelectedNavigationIndex();
- method public abstract deprecated android.app.ActionBar.Tab getSelectedTab();
- method public abstract java.lang.CharSequence getSubtitle();
- method public abstract deprecated android.app.ActionBar.Tab getTabAt(int);
- method public abstract deprecated int getTabCount();
+ method @Deprecated public abstract int getNavigationItemCount();
+ method @Deprecated public abstract int getNavigationMode();
+ method @Deprecated public abstract int getSelectedNavigationIndex();
+ method @Deprecated public abstract android.app.ActionBar.Tab getSelectedTab();
+ method public abstract CharSequence getSubtitle();
+ method @Deprecated public abstract android.app.ActionBar.Tab getTabAt(int);
+ method @Deprecated public abstract int getTabCount();
method public android.content.Context getThemedContext();
- method public abstract java.lang.CharSequence getTitle();
+ method public abstract CharSequence getTitle();
method public abstract void hide();
method public boolean isHideOnContentScrollEnabled();
method public abstract boolean isShowing();
- method public abstract deprecated android.app.ActionBar.Tab newTab();
- method public abstract deprecated void removeAllTabs();
+ method @Deprecated public abstract android.app.ActionBar.Tab newTab();
+ method @Deprecated public abstract void removeAllTabs();
method public abstract void removeOnMenuVisibilityListener(android.app.ActionBar.OnMenuVisibilityListener);
- method public abstract deprecated void removeTab(android.app.ActionBar.Tab);
- method public abstract deprecated void removeTabAt(int);
- method public abstract deprecated void selectTab(android.app.ActionBar.Tab);
- method public abstract void setBackgroundDrawable(android.graphics.drawable.Drawable);
+ method @Deprecated public abstract void removeTab(android.app.ActionBar.Tab);
+ method @Deprecated public abstract void removeTabAt(int);
+ method @Deprecated public abstract void selectTab(android.app.ActionBar.Tab);
+ method public abstract void setBackgroundDrawable(@Nullable android.graphics.drawable.Drawable);
method public abstract void setCustomView(android.view.View);
method public abstract void setCustomView(android.view.View, android.app.ActionBar.LayoutParams);
- method public abstract void setCustomView(int);
+ method public abstract void setCustomView(@LayoutRes int);
method public abstract void setDisplayHomeAsUpEnabled(boolean);
method public abstract void setDisplayOptions(int);
method public abstract void setDisplayOptions(int, int);
@@ -3528,79 +3580,79 @@
method public void setElevation(float);
method public void setHideOffset(int);
method public void setHideOnContentScrollEnabled(boolean);
- method public void setHomeActionContentDescription(java.lang.CharSequence);
- method public void setHomeActionContentDescription(int);
+ method public void setHomeActionContentDescription(CharSequence);
+ method public void setHomeActionContentDescription(@StringRes int);
method public void setHomeAsUpIndicator(android.graphics.drawable.Drawable);
- method public void setHomeAsUpIndicator(int);
+ method public void setHomeAsUpIndicator(@DrawableRes int);
method public void setHomeButtonEnabled(boolean);
- method public abstract void setIcon(int);
+ method public abstract void setIcon(@DrawableRes int);
method public abstract void setIcon(android.graphics.drawable.Drawable);
- method public abstract deprecated void setListNavigationCallbacks(android.widget.SpinnerAdapter, android.app.ActionBar.OnNavigationListener);
- method public abstract void setLogo(int);
+ method @Deprecated public abstract void setListNavigationCallbacks(android.widget.SpinnerAdapter, android.app.ActionBar.OnNavigationListener);
+ method public abstract void setLogo(@DrawableRes int);
method public abstract void setLogo(android.graphics.drawable.Drawable);
- method public abstract deprecated void setNavigationMode(int);
- method public abstract deprecated void setSelectedNavigationItem(int);
+ method @Deprecated public abstract void setNavigationMode(int);
+ method @Deprecated public abstract void setSelectedNavigationItem(int);
method public void setSplitBackgroundDrawable(android.graphics.drawable.Drawable);
method public void setStackedBackgroundDrawable(android.graphics.drawable.Drawable);
- method public abstract void setSubtitle(java.lang.CharSequence);
- method public abstract void setSubtitle(int);
- method public abstract void setTitle(java.lang.CharSequence);
- method public abstract void setTitle(int);
+ method public abstract void setSubtitle(CharSequence);
+ method public abstract void setSubtitle(@StringRes int);
+ method public abstract void setTitle(CharSequence);
+ method public abstract void setTitle(@StringRes int);
method public abstract void show();
field public static final int DISPLAY_HOME_AS_UP = 4; // 0x4
field public static final int DISPLAY_SHOW_CUSTOM = 16; // 0x10
field public static final int DISPLAY_SHOW_HOME = 2; // 0x2
field public static final int DISPLAY_SHOW_TITLE = 8; // 0x8
field public static final int DISPLAY_USE_LOGO = 1; // 0x1
- field public static final deprecated int NAVIGATION_MODE_LIST = 1; // 0x1
- field public static final deprecated int NAVIGATION_MODE_STANDARD = 0; // 0x0
- field public static final deprecated int NAVIGATION_MODE_TABS = 2; // 0x2
+ field @Deprecated public static final int NAVIGATION_MODE_LIST = 1; // 0x1
+ field @Deprecated public static final int NAVIGATION_MODE_STANDARD = 0; // 0x0
+ field @Deprecated public static final int NAVIGATION_MODE_TABS = 2; // 0x2
}
public static class ActionBar.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
- ctor public ActionBar.LayoutParams(android.content.Context, android.util.AttributeSet);
+ ctor public ActionBar.LayoutParams(@NonNull android.content.Context, android.util.AttributeSet);
ctor public ActionBar.LayoutParams(int, int);
ctor public ActionBar.LayoutParams(int, int, int);
ctor public ActionBar.LayoutParams(int);
ctor public ActionBar.LayoutParams(android.app.ActionBar.LayoutParams);
ctor public ActionBar.LayoutParams(android.view.ViewGroup.LayoutParams);
- field public int gravity;
+ field @android.view.ViewDebug.ExportedProperty(category="layout", mapping={@android.view.ViewDebug.IntToString(from=0xffffffff, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.NO_GRAVITY, to="NONE"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.TOP, to="TOP"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.BOTTOM, to="BOTTOM"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.LEFT, to="LEFT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.RIGHT, to="RIGHT"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.START, to="START"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.END, to="END"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_VERTICAL, to="CENTER_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_VERTICAL, to="FILL_VERTICAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER_HORIZONTAL, to="CENTER_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL_HORIZONTAL, to="FILL_HORIZONTAL"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.CENTER, to="CENTER"), @android.view.ViewDebug.IntToString(from=android.view.Gravity.FILL, to="FILL")}) public int gravity;
}
- public static abstract interface ActionBar.OnMenuVisibilityListener {
- method public abstract void onMenuVisibilityChanged(boolean);
+ public static interface ActionBar.OnMenuVisibilityListener {
+ method public void onMenuVisibilityChanged(boolean);
}
- public static abstract deprecated interface ActionBar.OnNavigationListener {
- method public abstract boolean onNavigationItemSelected(int, long);
+ @Deprecated public static interface ActionBar.OnNavigationListener {
+ method @Deprecated public boolean onNavigationItemSelected(int, long);
}
- public static abstract deprecated class ActionBar.Tab {
- ctor public ActionBar.Tab();
- method public abstract java.lang.CharSequence getContentDescription();
- method public abstract android.view.View getCustomView();
- method public abstract android.graphics.drawable.Drawable getIcon();
- method public abstract int getPosition();
- method public abstract java.lang.Object getTag();
- method public abstract java.lang.CharSequence getText();
- method public abstract void select();
- method public abstract android.app.ActionBar.Tab setContentDescription(int);
- method public abstract android.app.ActionBar.Tab setContentDescription(java.lang.CharSequence);
- method public abstract android.app.ActionBar.Tab setCustomView(android.view.View);
- method public abstract android.app.ActionBar.Tab setCustomView(int);
- method public abstract android.app.ActionBar.Tab setIcon(android.graphics.drawable.Drawable);
- method public abstract android.app.ActionBar.Tab setIcon(int);
- method public abstract android.app.ActionBar.Tab setTabListener(android.app.ActionBar.TabListener);
- method public abstract android.app.ActionBar.Tab setTag(java.lang.Object);
- method public abstract android.app.ActionBar.Tab setText(java.lang.CharSequence);
- method public abstract android.app.ActionBar.Tab setText(int);
- field public static final int INVALID_POSITION = -1; // 0xffffffff
+ @Deprecated public abstract static class ActionBar.Tab {
+ ctor @Deprecated public ActionBar.Tab();
+ method @Deprecated public abstract CharSequence getContentDescription();
+ method @Deprecated public abstract android.view.View getCustomView();
+ method @Deprecated public abstract android.graphics.drawable.Drawable getIcon();
+ method @Deprecated public abstract int getPosition();
+ method @Deprecated public abstract Object getTag();
+ method @Deprecated public abstract CharSequence getText();
+ method @Deprecated public abstract void select();
+ method @Deprecated public abstract android.app.ActionBar.Tab setContentDescription(@StringRes int);
+ method @Deprecated public abstract android.app.ActionBar.Tab setContentDescription(CharSequence);
+ method @Deprecated public abstract android.app.ActionBar.Tab setCustomView(android.view.View);
+ method @Deprecated public abstract android.app.ActionBar.Tab setCustomView(@LayoutRes int);
+ method @Deprecated public abstract android.app.ActionBar.Tab setIcon(android.graphics.drawable.Drawable);
+ method @Deprecated public abstract android.app.ActionBar.Tab setIcon(@DrawableRes int);
+ method @Deprecated public abstract android.app.ActionBar.Tab setTabListener(android.app.ActionBar.TabListener);
+ method @Deprecated public abstract android.app.ActionBar.Tab setTag(Object);
+ method @Deprecated public abstract android.app.ActionBar.Tab setText(CharSequence);
+ method @Deprecated public abstract android.app.ActionBar.Tab setText(@StringRes int);
+ field @Deprecated public static final int INVALID_POSITION = -1; // 0xffffffff
}
- public static abstract deprecated interface ActionBar.TabListener {
- method public abstract void onTabReselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
- method public abstract void onTabSelected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
- method public abstract void onTabUnselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
+ @Deprecated public static interface ActionBar.TabListener {
+ method @Deprecated public void onTabReselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
+ method @Deprecated public void onTabSelected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
+ method @Deprecated public void onTabUnselected(android.app.ActionBar.Tab, android.app.FragmentTransaction);
}
public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback {
@@ -3608,8 +3660,8 @@
method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
method public void closeContextMenu();
method public void closeOptionsMenu();
- method public android.app.PendingIntent createPendingResult(int, android.content.Intent, int);
- method public final deprecated void dismissDialog(int);
+ method public android.app.PendingIntent createPendingResult(int, @NonNull android.content.Intent, int);
+ method @Deprecated public final void dismissDialog(int);
method public final void dismissKeyboardShortcutsHelper();
method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
method public boolean dispatchKeyEvent(android.view.KeyEvent);
@@ -3617,43 +3669,43 @@
method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
method public boolean dispatchTouchEvent(android.view.MotionEvent);
method public boolean dispatchTrackballEvent(android.view.MotionEvent);
- method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
- method public deprecated void enterPictureInPictureMode();
- method public boolean enterPictureInPictureMode(android.app.PictureInPictureParams);
- method public <T extends android.view.View> T findViewById(int);
+ method public void dump(@NonNull String, @Nullable java.io.FileDescriptor, @NonNull java.io.PrintWriter, @Nullable String[]);
+ method @Deprecated public void enterPictureInPictureMode();
+ method public boolean enterPictureInPictureMode(@NonNull android.app.PictureInPictureParams);
+ method public <T extends android.view.View> T findViewById(@IdRes int);
method public void finish();
method public void finishActivity(int);
- method public void finishActivityFromChild(android.app.Activity, int);
+ method public void finishActivityFromChild(@NonNull android.app.Activity, int);
method public void finishAffinity();
method public void finishAfterTransition();
method public void finishAndRemoveTask();
method public void finishFromChild(android.app.Activity);
- method public android.app.ActionBar getActionBar();
+ method @Nullable public android.app.ActionBar getActionBar();
method public final android.app.Application getApplication();
- method public android.content.ComponentName getCallingActivity();
- method public java.lang.String getCallingPackage();
+ method @Nullable public android.content.ComponentName getCallingActivity();
+ method @Nullable public String getCallingPackage();
method public int getChangingConfigurations();
method public android.content.ComponentName getComponentName();
method public android.transition.Scene getContentScene();
method public android.transition.TransitionManager getContentTransitionManager();
- method public android.view.View getCurrentFocus();
- method public deprecated android.app.FragmentManager getFragmentManager();
+ method @Nullable public android.view.View getCurrentFocus();
+ method @Deprecated public android.app.FragmentManager getFragmentManager();
method public android.content.Intent getIntent();
- method public java.lang.Object getLastNonConfigurationInstance();
- method public android.view.LayoutInflater getLayoutInflater();
- method public deprecated android.app.LoaderManager getLoaderManager();
- method public java.lang.String getLocalClassName();
+ method @Nullable public Object getLastNonConfigurationInstance();
+ method @NonNull public android.view.LayoutInflater getLayoutInflater();
+ method @Deprecated public android.app.LoaderManager getLoaderManager();
+ method @NonNull public String getLocalClassName();
method public int getMaxNumPictureInPictureActions();
method public final android.media.session.MediaController getMediaController();
- method public android.view.MenuInflater getMenuInflater();
+ method @NonNull public android.view.MenuInflater getMenuInflater();
method public final android.app.Activity getParent();
- method public android.content.Intent getParentActivityIntent();
+ method @Nullable public android.content.Intent getParentActivityIntent();
method public android.content.SharedPreferences getPreferences(int);
- method public android.net.Uri getReferrer();
+ method @Nullable public android.net.Uri getReferrer();
method public int getRequestedOrientation();
method public final android.view.SearchEvent getSearchEvent();
method public int getTaskId();
- method public final java.lang.CharSequence getTitle();
+ method public final CharSequence getTitle();
method public final int getTitleColor();
method public android.app.VoiceInteractor getVoiceInteractor();
method public final int getVolumeControlStream();
@@ -3673,39 +3725,40 @@
method public boolean isTaskRoot();
method public boolean isVoiceInteraction();
method public boolean isVoiceInteractionRoot();
- method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
+ method @Deprecated public final android.database.Cursor managedQuery(android.net.Uri, String[], String, String[], String);
method public boolean moveTaskToBack(boolean);
method public boolean navigateUpTo(android.content.Intent);
method public boolean navigateUpToFromChild(android.app.Activity, android.content.Intent);
- method public void onActionModeFinished(android.view.ActionMode);
- method public void onActionModeStarted(android.view.ActionMode);
+ method @CallSuper public void onActionModeFinished(android.view.ActionMode);
+ method @CallSuper public void onActionModeStarted(android.view.ActionMode);
method public void onActivityReenter(int, android.content.Intent);
method protected void onActivityResult(int, int, android.content.Intent);
- method public deprecated void onAttachFragment(android.app.Fragment);
+ method @Deprecated public void onAttachFragment(android.app.Fragment);
method public void onAttachedToWindow();
method public void onBackPressed();
- method protected void onChildTitleChanged(android.app.Activity, java.lang.CharSequence);
- method public void onConfigurationChanged(android.content.res.Configuration);
+ method protected void onChildTitleChanged(android.app.Activity, CharSequence);
+ method public void onConfigurationChanged(@NonNull android.content.res.Configuration);
method public void onContentChanged();
- method public boolean onContextItemSelected(android.view.MenuItem);
- method public void onContextMenuClosed(android.view.Menu);
- method protected void onCreate(android.os.Bundle);
- method public void onCreate(android.os.Bundle, android.os.PersistableBundle);
+ method public boolean onContextItemSelected(@NonNull android.view.MenuItem);
+ method public void onContextMenuClosed(@NonNull android.view.Menu);
+ method @MainThread @CallSuper protected void onCreate(@Nullable android.os.Bundle);
+ method public void onCreate(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle);
method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
- method public java.lang.CharSequence onCreateDescription();
- method protected deprecated android.app.Dialog onCreateDialog(int);
- method protected deprecated android.app.Dialog onCreateDialog(int, android.os.Bundle);
+ method @Nullable public CharSequence onCreateDescription();
+ method @Deprecated protected android.app.Dialog onCreateDialog(int);
+ method @Deprecated @Nullable protected android.app.Dialog onCreateDialog(int, android.os.Bundle);
method public void onCreateNavigateUpTaskStack(android.app.TaskStackBuilder);
method public boolean onCreateOptionsMenu(android.view.Menu);
- method public boolean onCreatePanelMenu(int, android.view.Menu);
- method public android.view.View onCreatePanelView(int);
- method public deprecated boolean onCreateThumbnail(android.graphics.Bitmap, android.graphics.Canvas);
- method public android.view.View onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet);
- method public android.view.View onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet);
- method protected void onDestroy();
+ method public boolean onCreatePanelMenu(int, @NonNull android.view.Menu);
+ method @Nullable public android.view.View onCreatePanelView(int);
+ method @Deprecated public boolean onCreateThumbnail(android.graphics.Bitmap, android.graphics.Canvas);
+ method @Nullable public android.view.View onCreateView(@NonNull String, @NonNull android.content.Context, @NonNull android.util.AttributeSet);
+ method @Nullable public android.view.View onCreateView(@Nullable android.view.View, @NonNull String, @NonNull android.content.Context, @NonNull android.util.AttributeSet);
+ method @CallSuper protected void onDestroy();
method public void onDetachedFromWindow();
method public void onEnterAnimationComplete();
method public boolean onGenericMotionEvent(android.view.MotionEvent);
+ method public void onGetDirectActions(@NonNull android.os.CancellationSignal, @NonNull java.util.function.Consumer<java.util.List<android.app.DirectAction>>);
method public boolean onKeyDown(int, android.view.KeyEvent);
method public boolean onKeyLongPress(int, android.view.KeyEvent);
method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
@@ -3714,73 +3767,76 @@
method public void onLocalVoiceInteractionStarted();
method public void onLocalVoiceInteractionStopped();
method public void onLowMemory();
- method public boolean onMenuItemSelected(int, android.view.MenuItem);
- method public boolean onMenuOpened(int, android.view.Menu);
+ method public boolean onMenuItemSelected(int, @NonNull android.view.MenuItem);
+ method public boolean onMenuOpened(int, @NonNull android.view.Menu);
method public void onMultiWindowModeChanged(boolean, android.content.res.Configuration);
- method public deprecated void onMultiWindowModeChanged(boolean);
+ method @Deprecated public void onMultiWindowModeChanged(boolean);
method public boolean onNavigateUp();
method public boolean onNavigateUpFromChild(android.app.Activity);
method protected void onNewIntent(android.content.Intent);
- method public boolean onOptionsItemSelected(android.view.MenuItem);
+ method public boolean onOptionsItemSelected(@NonNull android.view.MenuItem);
method public void onOptionsMenuClosed(android.view.Menu);
- method public void onPanelClosed(int, android.view.Menu);
- method protected void onPause();
+ method public void onPanelClosed(int, @NonNull android.view.Menu);
+ method @CallSuper protected void onPause();
+ method public void onPerformDirectAction(@NonNull String, @NonNull android.os.Bundle, @NonNull android.os.CancellationSignal, @NonNull java.util.function.Consumer<android.os.Bundle>);
method public void onPictureInPictureModeChanged(boolean, android.content.res.Configuration);
- method public deprecated void onPictureInPictureModeChanged(boolean);
- method protected void onPostCreate(android.os.Bundle);
- method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
- method protected void onPostResume();
- method protected deprecated void onPrepareDialog(int, android.app.Dialog);
- method protected deprecated void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
+ method @Deprecated public void onPictureInPictureModeChanged(boolean);
+ method @CallSuper protected void onPostCreate(@Nullable android.os.Bundle);
+ method public void onPostCreate(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle);
+ method @CallSuper protected void onPostResume();
+ method @Deprecated protected void onPrepareDialog(int, android.app.Dialog);
+ method @Deprecated protected void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
method public void onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder);
method public boolean onPrepareOptionsMenu(android.view.Menu);
- method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
+ method public boolean onPreparePanel(int, @Nullable android.view.View, @NonNull android.view.Menu);
method public void onProvideAssistContent(android.app.assist.AssistContent);
method public void onProvideAssistData(android.os.Bundle);
method public android.net.Uri onProvideReferrer();
- method public void onRequestPermissionsResult(int, java.lang.String[], int[]);
- method protected void onRestart();
- method protected void onRestoreInstanceState(android.os.Bundle);
- method public void onRestoreInstanceState(android.os.Bundle, android.os.PersistableBundle);
- method protected void onResume();
- method public java.lang.Object onRetainNonConfigurationInstance();
- method protected void onSaveInstanceState(android.os.Bundle);
- method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle);
- method public boolean onSearchRequested(android.view.SearchEvent);
+ method public void onRequestPermissionsResult(int, @NonNull String[], @NonNull int[]);
+ method @CallSuper protected void onRestart();
+ method protected void onRestoreInstanceState(@NonNull android.os.Bundle);
+ method public void onRestoreInstanceState(@Nullable android.os.Bundle, @Nullable android.os.PersistableBundle);
+ method @CallSuper protected void onResume();
+ method public Object onRetainNonConfigurationInstance();
+ method protected void onSaveInstanceState(@NonNull android.os.Bundle);
+ method public void onSaveInstanceState(@NonNull android.os.Bundle, @NonNull android.os.PersistableBundle);
+ method public boolean onSearchRequested(@Nullable android.view.SearchEvent);
method public boolean onSearchRequested();
- method protected void onStart();
- method public void onStateNotSaved();
- method protected void onStop();
- method protected void onTitleChanged(java.lang.CharSequence, int);
+ method @CallSuper protected void onStart();
+ method @Deprecated public void onStateNotSaved();
+ method @CallSuper protected void onStop();
+ method protected void onTitleChanged(CharSequence, int);
+ method public void onTopResumedActivityChanged(boolean);
method public boolean onTouchEvent(android.view.MotionEvent);
method public boolean onTrackballEvent(android.view.MotionEvent);
method public void onTrimMemory(int);
method public void onUserInteraction();
method protected void onUserLeaveHint();
- method public deprecated void onVisibleBehindCanceled();
+ method @Deprecated @CallSuper public void onVisibleBehindCanceled();
method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
method public void onWindowFocusChanged(boolean);
- method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
- method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
+ method @Nullable public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
+ method @Nullable public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
method public void openContextMenu(android.view.View);
method public void openOptionsMenu();
method public void overridePendingTransition(int, int);
method public void postponeEnterTransition();
method public void recreate();
+ method public void registerActivityLifecycleCallbacks(@NonNull android.app.Application.ActivityLifecycleCallbacks);
method public void registerForContextMenu(android.view.View);
method public boolean releaseInstance();
- method public final deprecated void removeDialog(int);
+ method @Deprecated public final void removeDialog(int);
method public void reportFullyDrawn();
method public android.view.DragAndDropPermissions requestDragAndDropPermissions(android.view.DragEvent);
- method public final void requestPermissions(java.lang.String[], int);
+ method public final void requestPermissions(@NonNull String[], int);
method public final void requestShowKeyboardShortcuts();
- method public deprecated boolean requestVisibleBehind(boolean);
+ method @Deprecated public boolean requestVisibleBehind(boolean);
method public final boolean requestWindowFeature(int);
- method public final <T extends android.view.View> T requireViewById(int);
- method public final void runOnUiThread(java.lang.Runnable);
- method public void setActionBar(android.widget.Toolbar);
+ method @NonNull public final <T extends android.view.View> T requireViewById(@IdRes int);
+ method public final void runOnUiThread(Runnable);
+ method public void setActionBar(@Nullable android.widget.Toolbar);
method public void setContentTransitionManager(android.transition.TransitionManager);
- method public void setContentView(int);
+ method public void setContentView(@LayoutRes int);
method public void setContentView(android.view.View);
method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
method public final void setDefaultKeyMode(int);
@@ -3788,62 +3844,64 @@
method public void setExitSharedElementCallback(android.app.SharedElementCallback);
method public final void setFeatureDrawable(int, android.graphics.drawable.Drawable);
method public final void setFeatureDrawableAlpha(int, int);
- method public final void setFeatureDrawableResource(int, int);
+ method public final void setFeatureDrawableResource(int, @DrawableRes int);
method public final void setFeatureDrawableUri(int, android.net.Uri);
method public void setFinishOnTouchOutside(boolean);
method public void setImmersive(boolean);
+ method public void setInheritShowWhenLocked(boolean);
method public void setIntent(android.content.Intent);
method public final void setMediaController(android.media.session.MediaController);
- method public void setPictureInPictureParams(android.app.PictureInPictureParams);
- method public final deprecated void setProgress(int);
- method public final deprecated void setProgressBarIndeterminate(boolean);
- method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
- method public final deprecated void setProgressBarVisibility(boolean);
+ method public void setPictureInPictureParams(@NonNull android.app.PictureInPictureParams);
+ method @Deprecated public final void setProgress(int);
+ method @Deprecated public final void setProgressBarIndeterminate(boolean);
+ method @Deprecated public final void setProgressBarIndeterminateVisibility(boolean);
+ method @Deprecated public final void setProgressBarVisibility(boolean);
method public void setRequestedOrientation(int);
method public final void setResult(int);
method public final void setResult(int, android.content.Intent);
- method public final deprecated void setSecondaryProgress(int);
+ method @Deprecated public final void setSecondaryProgress(int);
method public void setShowWhenLocked(boolean);
method public void setTaskDescription(android.app.ActivityManager.TaskDescription);
- method public void setTitle(java.lang.CharSequence);
+ method public void setTitle(CharSequence);
method public void setTitle(int);
- method public deprecated void setTitleColor(int);
+ method @Deprecated public void setTitleColor(int);
method public void setTurnScreenOn(boolean);
method public void setVisible(boolean);
method public final void setVolumeControlStream(int);
- method public void setVrModeEnabled(boolean, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
- method public boolean shouldShowRequestPermissionRationale(java.lang.String);
+ method public void setVrModeEnabled(boolean, @NonNull android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
+ method public boolean shouldShowRequestPermissionRationale(@NonNull String);
method public boolean shouldUpRecreateTask(android.content.Intent);
method public boolean showAssist(android.os.Bundle);
- method public final deprecated void showDialog(int);
- method public final deprecated boolean showDialog(int, android.os.Bundle);
+ method @Deprecated public final void showDialog(int);
+ method @Deprecated public final boolean showDialog(int, android.os.Bundle);
method public void showLockTaskEscapeMessage();
- method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
- method public android.view.ActionMode startActionMode(android.view.ActionMode.Callback, int);
- method public void startActivityForResult(android.content.Intent, int);
- method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
- method public void startActivityFromChild(android.app.Activity, android.content.Intent, int);
- method public void startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle);
- method public deprecated void startActivityFromFragment(android.app.Fragment, android.content.Intent, int);
- method public deprecated void startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle);
- method public boolean startActivityIfNeeded(android.content.Intent, int);
- method public boolean startActivityIfNeeded(android.content.Intent, int, android.os.Bundle);
- method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
- method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
+ method @Nullable public android.view.ActionMode startActionMode(android.view.ActionMode.Callback);
+ method @Nullable public android.view.ActionMode startActionMode(android.view.ActionMode.Callback, int);
+ method public void startActivityForResult(@RequiresPermission android.content.Intent, int);
+ method public void startActivityForResult(@RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
+ method public void startActivityFromChild(@NonNull android.app.Activity, @RequiresPermission android.content.Intent, int);
+ method public void startActivityFromChild(@NonNull android.app.Activity, @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
+ method @Deprecated public void startActivityFromFragment(@NonNull android.app.Fragment, @RequiresPermission android.content.Intent, int);
+ method @Deprecated public void startActivityFromFragment(@NonNull android.app.Fragment, @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
+ method public boolean startActivityIfNeeded(@RequiresPermission @NonNull android.content.Intent, int);
+ method public boolean startActivityIfNeeded(@RequiresPermission @NonNull android.content.Intent, int, @Nullable android.os.Bundle);
+ method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
- method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
+ method public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, @Nullable android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startLocalVoiceInteraction(android.os.Bundle);
method public void startLockTask();
- method public deprecated void startManagingCursor(android.database.Cursor);
- method public boolean startNextMatchingActivity(android.content.Intent);
- method public boolean startNextMatchingActivity(android.content.Intent, android.os.Bundle);
+ method @Deprecated public void startManagingCursor(android.database.Cursor);
+ method public boolean startNextMatchingActivity(@RequiresPermission @NonNull android.content.Intent);
+ method public boolean startNextMatchingActivity(@RequiresPermission @NonNull android.content.Intent, @Nullable android.os.Bundle);
method public void startPostponedEnterTransition();
- method public void startSearch(java.lang.String, boolean, android.os.Bundle, boolean);
+ method public void startSearch(@Nullable String, boolean, @Nullable android.os.Bundle, boolean);
method public void stopLocalVoiceInteraction();
method public void stopLockTask();
- method public deprecated void stopManagingCursor(android.database.Cursor);
+ method @Deprecated public void stopManagingCursor(android.database.Cursor);
method public void takeKeyEvents(boolean);
- method public void triggerSearch(java.lang.String, android.os.Bundle);
+ method public void triggerSearch(String, @Nullable android.os.Bundle);
+ method public void unregisterActivityLifecycleCallbacks(@NonNull android.app.Application.ActivityLifecycleCallbacks);
method public void unregisterForContextMenu(android.view.View);
field public static final int DEFAULT_KEYS_DIALER = 1; // 0x1
field public static final int DEFAULT_KEYS_DISABLE = 0; // 0x0
@@ -3856,18 +3914,18 @@
field public static final int RESULT_OK = -1; // 0xffffffff
}
- public deprecated class ActivityGroup extends android.app.Activity {
- ctor public ActivityGroup();
- ctor public ActivityGroup(boolean);
- method public android.app.Activity getCurrentActivity();
- method public final android.app.LocalActivityManager getLocalActivityManager();
+ @Deprecated public class ActivityGroup extends android.app.Activity {
+ ctor @Deprecated public ActivityGroup();
+ ctor @Deprecated public ActivityGroup(boolean);
+ method @Deprecated public android.app.Activity getCurrentActivity();
+ method @Deprecated public final android.app.LocalActivityManager getLocalActivityManager();
}
public class ActivityManager {
- method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap);
+ method public int addAppTask(@NonNull android.app.Activity, @NonNull android.content.Intent, @Nullable android.app.ActivityManager.TaskDescription, @NonNull android.graphics.Bitmap);
method public boolean clearApplicationUserData();
method public void clearWatchHeapLimit();
- method public void dumpPackageState(java.io.FileDescriptor, java.lang.String);
+ method @RequiresPermission(android.Manifest.permission.DUMP) public void dumpPackageState(java.io.FileDescriptor, String);
method public android.util.Size getAppTaskThumbnailSize();
method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks();
method public android.content.pm.ConfigurationInfo getDeviceConfigurationInfo();
@@ -3880,27 +3938,29 @@
method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo);
method public android.os.Debug.MemoryInfo[] getProcessMemoryInfo(int[]);
method public java.util.List<android.app.ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState();
- method public deprecated java.util.List<android.app.ActivityManager.RecentTaskInfo> getRecentTasks(int, int) throws java.lang.SecurityException;
+ method @Deprecated public java.util.List<android.app.ActivityManager.RecentTaskInfo> getRecentTasks(int, int) throws java.lang.SecurityException;
method public java.util.List<android.app.ActivityManager.RunningAppProcessInfo> getRunningAppProcesses();
method public android.app.PendingIntent getRunningServiceControlPanel(android.content.ComponentName) throws java.lang.SecurityException;
- method public deprecated java.util.List<android.app.ActivityManager.RunningServiceInfo> getRunningServices(int) throws java.lang.SecurityException;
- method public deprecated java.util.List<android.app.ActivityManager.RunningTaskInfo> getRunningTasks(int) throws java.lang.SecurityException;
+ method @Deprecated public java.util.List<android.app.ActivityManager.RunningServiceInfo> getRunningServices(int) throws java.lang.SecurityException;
+ method @Deprecated public java.util.List<android.app.ActivityManager.RunningTaskInfo> getRunningTasks(int) throws java.lang.SecurityException;
+ method public boolean isActivityStartAllowedOnDisplay(@NonNull android.content.Context, int, @NonNull android.content.Intent);
method public boolean isBackgroundRestricted();
- method public deprecated boolean isInLockTaskMode();
+ method @Deprecated public boolean isInLockTaskMode();
method public boolean isLowRamDevice();
- method public static boolean isRunningInTestHarness();
+ method @Deprecated public static boolean isRunningInTestHarness();
+ method public static boolean isRunningInUserTestHarness();
method public static boolean isUserAMonkey();
- method public void killBackgroundProcesses(java.lang.String);
- method public void moveTaskToFront(int, int);
- method public void moveTaskToFront(int, int, android.os.Bundle);
- method public deprecated void restartPackage(java.lang.String);
+ method @RequiresPermission(android.Manifest.permission.KILL_BACKGROUND_PROCESSES) public void killBackgroundProcesses(String);
+ method @RequiresPermission(android.Manifest.permission.REORDER_TASKS) public void moveTaskToFront(int, int);
+ method @RequiresPermission(android.Manifest.permission.REORDER_TASKS) public void moveTaskToFront(int, int, android.os.Bundle);
+ method @Deprecated public void restartPackage(String);
method public static void setVrThread(int);
method public void setWatchHeapLimit(long);
- field public static final java.lang.String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
+ field public static final String ACTION_REPORT_HEAP_LIMIT = "android.app.action.REPORT_HEAP_LIMIT";
field public static final int LOCK_TASK_MODE_LOCKED = 1; // 0x1
field public static final int LOCK_TASK_MODE_NONE = 0; // 0x0
field public static final int LOCK_TASK_MODE_PINNED = 2; // 0x2
- field public static final java.lang.String META_HOME_ALTERNATE = "android.app.home.alternate";
+ field public static final String META_HOME_ALTERNATE = "android.app.home.alternate";
field public static final int MOVE_TASK_NO_USER_ACTION = 2; // 0x2
field public static final int MOVE_TASK_WITH_HOME = 1; // 0x1
field public static final int RECENT_IGNORE_UNAVAILABLE = 2; // 0x2
@@ -3920,7 +3980,7 @@
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.MemoryInfo> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.MemoryInfo> CREATOR;
field public long availMem;
field public boolean lowMemory;
field public long threshold;
@@ -3933,49 +3993,43 @@
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
field public static final int CRASHED = 1; // 0x1
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.ProcessErrorStateInfo> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.ProcessErrorStateInfo> CREATOR;
field public static final int NOT_RESPONDING = 2; // 0x2
field public static final int NO_ERROR = 0; // 0x0
field public int condition;
field public byte[] crashData;
- field public java.lang.String longMsg;
+ field public String longMsg;
field public int pid;
- field public java.lang.String processName;
- field public java.lang.String shortMsg;
- field public java.lang.String stackTrace;
- field public java.lang.String tag;
+ field public String processName;
+ field public String shortMsg;
+ field public String stackTrace;
+ field public String tag;
field public int uid;
}
- public static class ActivityManager.RecentTaskInfo implements android.os.Parcelable {
+ public static class ActivityManager.RecentTaskInfo extends android.app.TaskInfo implements android.os.Parcelable {
ctor public ActivityManager.RecentTaskInfo();
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RecentTaskInfo> CREATOR;
- field public int affiliatedTaskId;
- field public android.content.ComponentName baseActivity;
- field public android.content.Intent baseIntent;
- field public java.lang.CharSequence description;
- field public int id;
- field public int numActivities;
- field public android.content.ComponentName origActivity;
- field public int persistentId;
- field public android.app.ActivityManager.TaskDescription taskDescription;
- field public android.content.ComponentName topActivity;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.RecentTaskInfo> CREATOR;
+ field @Deprecated public int affiliatedTaskId;
+ field @Deprecated public CharSequence description;
+ field @Deprecated public int id;
+ field @Deprecated public int persistentId;
}
public static class ActivityManager.RunningAppProcessInfo implements android.os.Parcelable {
ctor public ActivityManager.RunningAppProcessInfo();
- ctor public ActivityManager.RunningAppProcessInfo(java.lang.String, int, java.lang.String[]);
+ ctor public ActivityManager.RunningAppProcessInfo(String, int, String[]);
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningAppProcessInfo> CREATOR;
- field public static final deprecated int IMPORTANCE_BACKGROUND = 400; // 0x190
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningAppProcessInfo> CREATOR;
+ field @Deprecated public static final int IMPORTANCE_BACKGROUND = 400; // 0x190
field public static final int IMPORTANCE_CACHED = 400; // 0x190
field public static final int IMPORTANCE_CANT_SAVE_STATE = 350; // 0x15e
- field public static final deprecated int IMPORTANCE_EMPTY = 500; // 0x1f4
+ field @Deprecated public static final int IMPORTANCE_EMPTY = 500; // 0x1f4
field public static final int IMPORTANCE_FOREGROUND = 100; // 0x64
field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d
field public static final int IMPORTANCE_GONE = 1000; // 0x3e8
@@ -3983,7 +4037,7 @@
field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82
field public static final int IMPORTANCE_SERVICE = 300; // 0x12c
field public static final int IMPORTANCE_TOP_SLEEPING = 325; // 0x145
- field public static final deprecated int IMPORTANCE_TOP_SLEEPING_PRE_28 = 150; // 0x96
+ field @Deprecated public static final int IMPORTANCE_TOP_SLEEPING_PRE_28 = 150; // 0x96
field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8
field public static final int REASON_PROVIDER_IN_USE = 1; // 0x1
field public static final int REASON_SERVICE_IN_USE = 2; // 0x2
@@ -3995,8 +4049,8 @@
field public int lastTrimLevel;
field public int lru;
field public int pid;
- field public java.lang.String[] pkgList;
- field public java.lang.String processName;
+ field public String[] pkgList;
+ field public String processName;
field public int uid;
}
@@ -4005,7 +4059,7 @@
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningServiceInfo> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningServiceInfo> CREATOR;
field public static final int FLAG_FOREGROUND = 2; // 0x2
field public static final int FLAG_PERSISTENT_PROCESS = 8; // 0x8
field public static final int FLAG_STARTED = 1; // 0x1
@@ -4013,72 +4067,69 @@
field public long activeSince;
field public int clientCount;
field public int clientLabel;
- field public java.lang.String clientPackage;
+ field public String clientPackage;
field public int crashCount;
field public int flags;
field public boolean foreground;
field public long lastActivityTime;
field public int pid;
- field public java.lang.String process;
+ field public String process;
field public long restarting;
field public android.content.ComponentName service;
field public boolean started;
field public int uid;
}
- public static class ActivityManager.RunningTaskInfo implements android.os.Parcelable {
+ public static class ActivityManager.RunningTaskInfo extends android.app.TaskInfo implements android.os.Parcelable {
ctor public ActivityManager.RunningTaskInfo();
method public int describeContents();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningTaskInfo> CREATOR;
- field public android.content.ComponentName baseActivity;
- field public java.lang.CharSequence description;
- field public int id;
- field public int numActivities;
- field public int numRunning;
- field public android.graphics.Bitmap thumbnail;
- field public android.content.ComponentName topActivity;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.RunningTaskInfo> CREATOR;
+ field @Deprecated public CharSequence description;
+ field @Deprecated public int id;
+ field @Deprecated public int numRunning;
+ field @Deprecated public android.graphics.Bitmap thumbnail;
}
public static class ActivityManager.TaskDescription implements android.os.Parcelable {
- ctor public deprecated ActivityManager.TaskDescription(java.lang.String, android.graphics.Bitmap, int);
- ctor public ActivityManager.TaskDescription(java.lang.String, int, int);
- ctor public deprecated ActivityManager.TaskDescription(java.lang.String, android.graphics.Bitmap);
- ctor public ActivityManager.TaskDescription(java.lang.String, int);
- ctor public ActivityManager.TaskDescription(java.lang.String);
+ ctor @Deprecated public ActivityManager.TaskDescription(String, android.graphics.Bitmap, int);
+ ctor public ActivityManager.TaskDescription(String, @DrawableRes int, int);
+ ctor @Deprecated public ActivityManager.TaskDescription(String, android.graphics.Bitmap);
+ ctor public ActivityManager.TaskDescription(String, @DrawableRes int);
+ ctor public ActivityManager.TaskDescription(String);
ctor public ActivityManager.TaskDescription();
ctor public ActivityManager.TaskDescription(android.app.ActivityManager.TaskDescription);
method public int describeContents();
method public android.graphics.Bitmap getIcon();
- method public java.lang.String getLabel();
+ method public String getLabel();
method public int getPrimaryColor();
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ActivityManager.TaskDescription> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ActivityManager.TaskDescription> CREATOR;
}
public class ActivityOptions {
- method public android.graphics.Rect getLaunchBounds();
+ method @Nullable public android.graphics.Rect getLaunchBounds();
method public int getLaunchDisplayId();
method public boolean getLockTaskMode();
method public static android.app.ActivityOptions makeBasic();
method public static android.app.ActivityOptions makeClipRevealAnimation(android.view.View, int, int, int, int);
method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int);
method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int);
- method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String);
- method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.util.Pair<android.view.View, java.lang.String>...);
+ method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, String);
+ method @java.lang.SafeVarargs public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.util.Pair<android.view.View,java.lang.String>...);
method public static android.app.ActivityOptions makeTaskLaunchBehind();
method public static android.app.ActivityOptions makeThumbnailScaleUpAnimation(android.view.View, android.graphics.Bitmap, int, int);
method public void requestUsageTimeReport(android.app.PendingIntent);
method public android.app.ActivityOptions setAppVerificationBundle(android.os.Bundle);
- method public android.app.ActivityOptions setLaunchBounds(android.graphics.Rect);
+ method public android.app.ActivityOptions setLaunchBounds(@Nullable android.graphics.Rect);
method public android.app.ActivityOptions setLaunchDisplayId(int);
method public android.app.ActivityOptions setLockTaskEnabled(boolean);
method public android.os.Bundle toBundle();
method public void update(android.app.ActivityOptions);
- field public static final java.lang.String EXTRA_USAGE_TIME_REPORT = "android.activity.usage_time";
- field public static final java.lang.String EXTRA_USAGE_TIME_REPORT_PACKAGES = "android.usage_time_packages";
+ field public static final String EXTRA_USAGE_TIME_REPORT = "android.activity.usage_time";
+ field public static final String EXTRA_USAGE_TIME_REPORT_PACKAGES = "android.usage_time_packages";
}
public class AlarmManager {
@@ -4086,19 +4137,19 @@
method public void cancel(android.app.AlarmManager.OnAlarmListener);
method public android.app.AlarmManager.AlarmClockInfo getNextAlarmClock();
method public void set(int, long, android.app.PendingIntent);
- method public void set(int, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
+ method public void set(int, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
method public void setAlarmClock(android.app.AlarmManager.AlarmClockInfo, android.app.PendingIntent);
method public void setAndAllowWhileIdle(int, long, android.app.PendingIntent);
method public void setExact(int, long, android.app.PendingIntent);
- method public void setExact(int, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
+ method public void setExact(int, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
method public void setExactAndAllowWhileIdle(int, long, android.app.PendingIntent);
method public void setInexactRepeating(int, long, long, android.app.PendingIntent);
method public void setRepeating(int, long, long, android.app.PendingIntent);
- method public void setTime(long);
- method public void setTimeZone(java.lang.String);
+ method @RequiresPermission(android.Manifest.permission.SET_TIME) public void setTime(long);
+ method @RequiresPermission(android.Manifest.permission.SET_TIME_ZONE) public void setTimeZone(String);
method public void setWindow(int, long, long, android.app.PendingIntent);
- method public void setWindow(int, long, long, java.lang.String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
- field public static final java.lang.String ACTION_NEXT_ALARM_CLOCK_CHANGED = "android.app.action.NEXT_ALARM_CLOCK_CHANGED";
+ method public void setWindow(int, long, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler);
+ field public static final String ACTION_NEXT_ALARM_CLOCK_CHANGED = "android.app.action.NEXT_ALARM_CLOCK_CHANGED";
field public static final int ELAPSED_REALTIME = 3; // 0x3
field public static final int ELAPSED_REALTIME_WAKEUP = 2; // 0x2
field public static final long INTERVAL_DAY = 86400000L; // 0x5265c00L
@@ -4116,40 +4167,40 @@
method public android.app.PendingIntent getShowIntent();
method public long getTriggerTime();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.AlarmManager.AlarmClockInfo> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.AlarmManager.AlarmClockInfo> CREATOR;
}
- public static abstract interface AlarmManager.OnAlarmListener {
- method public abstract void onAlarm();
+ public static interface AlarmManager.OnAlarmListener {
+ method public void onAlarm();
}
public class AlertDialog extends android.app.Dialog implements android.content.DialogInterface {
ctor protected AlertDialog(android.content.Context);
ctor protected AlertDialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
- ctor protected AlertDialog(android.content.Context, int);
+ ctor protected AlertDialog(android.content.Context, @StyleRes int);
method public android.widget.Button getButton(int);
method public android.widget.ListView getListView();
- method public void setButton(int, java.lang.CharSequence, android.os.Message);
- method public void setButton(int, java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
- method public deprecated void setButton(java.lang.CharSequence, android.os.Message);
- method public deprecated void setButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
- method public deprecated void setButton2(java.lang.CharSequence, android.os.Message);
- method public deprecated void setButton2(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
- method public deprecated void setButton3(java.lang.CharSequence, android.os.Message);
- method public deprecated void setButton3(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
+ method public void setButton(int, CharSequence, android.os.Message);
+ method public void setButton(int, CharSequence, android.content.DialogInterface.OnClickListener);
+ method @Deprecated public void setButton(CharSequence, android.os.Message);
+ method @Deprecated public void setButton(CharSequence, android.content.DialogInterface.OnClickListener);
+ method @Deprecated public void setButton2(CharSequence, android.os.Message);
+ method @Deprecated public void setButton2(CharSequence, android.content.DialogInterface.OnClickListener);
+ method @Deprecated public void setButton3(CharSequence, android.os.Message);
+ method @Deprecated public void setButton3(CharSequence, android.content.DialogInterface.OnClickListener);
method public void setCustomTitle(android.view.View);
- method public void setIcon(int);
+ method public void setIcon(@DrawableRes int);
method public void setIcon(android.graphics.drawable.Drawable);
- method public void setIconAttribute(int);
+ method public void setIconAttribute(@AttrRes int);
method public void setInverseBackgroundForced(boolean);
- method public void setMessage(java.lang.CharSequence);
+ method public void setMessage(CharSequence);
method public void setView(android.view.View);
method public void setView(android.view.View, int, int, int, int);
- field public static final deprecated int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
- field public static final deprecated int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
- field public static final deprecated int THEME_HOLO_DARK = 2; // 0x2
- field public static final deprecated int THEME_HOLO_LIGHT = 3; // 0x3
- field public static final deprecated int THEME_TRADITIONAL = 1; // 0x1
+ field @Deprecated public static final int THEME_DEVICE_DEFAULT_DARK = 4; // 0x4
+ field @Deprecated public static final int THEME_DEVICE_DEFAULT_LIGHT = 5; // 0x5
+ field @Deprecated public static final int THEME_HOLO_DARK = 2; // 0x2
+ field @Deprecated public static final int THEME_HOLO_LIGHT = 3; // 0x3
+ field @Deprecated public static final int THEME_TRADITIONAL = 1; // 0x1
}
public static class AlertDialog.Builder {
@@ -4159,35 +4210,35 @@
method public android.content.Context getContext();
method public android.app.AlertDialog.Builder setAdapter(android.widget.ListAdapter, android.content.DialogInterface.OnClickListener);
method public android.app.AlertDialog.Builder setCancelable(boolean);
- method public android.app.AlertDialog.Builder setCursor(android.database.Cursor, android.content.DialogInterface.OnClickListener, java.lang.String);
+ method public android.app.AlertDialog.Builder setCursor(android.database.Cursor, android.content.DialogInterface.OnClickListener, String);
method public android.app.AlertDialog.Builder setCustomTitle(android.view.View);
- method public android.app.AlertDialog.Builder setIcon(int);
+ method public android.app.AlertDialog.Builder setIcon(@DrawableRes int);
method public android.app.AlertDialog.Builder setIcon(android.graphics.drawable.Drawable);
- method public android.app.AlertDialog.Builder setIconAttribute(int);
- method public deprecated android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
- method public android.app.AlertDialog.Builder setItems(int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setItems(java.lang.CharSequence[], android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setMessage(int);
- method public android.app.AlertDialog.Builder setMessage(java.lang.CharSequence);
- method public android.app.AlertDialog.Builder setMultiChoiceItems(int, boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
- method public android.app.AlertDialog.Builder setMultiChoiceItems(java.lang.CharSequence[], boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
- method public android.app.AlertDialog.Builder setMultiChoiceItems(android.database.Cursor, java.lang.String, java.lang.String, android.content.DialogInterface.OnMultiChoiceClickListener);
- method public android.app.AlertDialog.Builder setNegativeButton(int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setNegativeButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setNeutralButton(int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setNeutralButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setIconAttribute(@AttrRes int);
+ method @Deprecated public android.app.AlertDialog.Builder setInverseBackgroundForced(boolean);
+ method public android.app.AlertDialog.Builder setItems(@ArrayRes int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setItems(CharSequence[], android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setMessage(@StringRes int);
+ method public android.app.AlertDialog.Builder setMessage(CharSequence);
+ method public android.app.AlertDialog.Builder setMultiChoiceItems(@ArrayRes int, boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
+ method public android.app.AlertDialog.Builder setMultiChoiceItems(CharSequence[], boolean[], android.content.DialogInterface.OnMultiChoiceClickListener);
+ method public android.app.AlertDialog.Builder setMultiChoiceItems(android.database.Cursor, String, String, android.content.DialogInterface.OnMultiChoiceClickListener);
+ method public android.app.AlertDialog.Builder setNegativeButton(@StringRes int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setNegativeButton(CharSequence, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setNeutralButton(@StringRes int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setNeutralButton(CharSequence, android.content.DialogInterface.OnClickListener);
method public android.app.AlertDialog.Builder setOnCancelListener(android.content.DialogInterface.OnCancelListener);
method public android.app.AlertDialog.Builder setOnDismissListener(android.content.DialogInterface.OnDismissListener);
method public android.app.AlertDialog.Builder setOnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener);
method public android.app.AlertDialog.Builder setOnKeyListener(android.content.DialogInterface.OnKeyListener);
- method public android.app.AlertDialog.Builder setPositiveButton(int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setPositiveButton(java.lang.CharSequence, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setSingleChoiceItems(int, int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setSingleChoiceItems(android.database.Cursor, int, java.lang.String, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setSingleChoiceItems(java.lang.CharSequence[], int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setPositiveButton(@StringRes int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setPositiveButton(CharSequence, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setSingleChoiceItems(@ArrayRes int, int, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setSingleChoiceItems(android.database.Cursor, int, String, android.content.DialogInterface.OnClickListener);
+ method public android.app.AlertDialog.Builder setSingleChoiceItems(CharSequence[], int, android.content.DialogInterface.OnClickListener);
method public android.app.AlertDialog.Builder setSingleChoiceItems(android.widget.ListAdapter, int, android.content.DialogInterface.OnClickListener);
- method public android.app.AlertDialog.Builder setTitle(int);
- method public android.app.AlertDialog.Builder setTitle(java.lang.CharSequence);
+ method public android.app.AlertDialog.Builder setTitle(@StringRes int);
+ method public android.app.AlertDialog.Builder setTitle(CharSequence);
method public android.app.AlertDialog.Builder setView(int);
method public android.app.AlertDialog.Builder setView(android.view.View);
method public android.app.AlertDialog show();
@@ -4199,107 +4250,130 @@
public class AppComponentFactory {
ctor public AppComponentFactory();
- method public android.app.Activity instantiateActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
- method public android.app.Application instantiateApplication(java.lang.ClassLoader, java.lang.String) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
- method public android.content.ContentProvider instantiateProvider(java.lang.ClassLoader, java.lang.String) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
- method public android.content.BroadcastReceiver instantiateReceiver(java.lang.ClassLoader, java.lang.String, android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
- method public android.app.Service instantiateService(java.lang.ClassLoader, java.lang.String, android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
+ method @NonNull public android.app.Activity instantiateActivity(@NonNull ClassLoader, @NonNull String, @Nullable android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
+ method @NonNull public android.app.Application instantiateApplication(@NonNull ClassLoader, @NonNull String) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
+ method @NonNull public ClassLoader instantiateClassLoader(@NonNull ClassLoader, @NonNull android.content.pm.ApplicationInfo);
+ method @NonNull public android.content.ContentProvider instantiateProvider(@NonNull ClassLoader, @NonNull String) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
+ method @NonNull public android.content.BroadcastReceiver instantiateReceiver(@NonNull ClassLoader, @NonNull String, @Nullable android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
+ method @NonNull public android.app.Service instantiateService(@NonNull ClassLoader, @NonNull String, @Nullable android.content.Intent) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
}
public class AppOpsManager {
- method public int checkOp(java.lang.String, int, java.lang.String);
- method public int checkOpNoThrow(java.lang.String, int, java.lang.String);
- method public void checkPackage(int, java.lang.String);
- method public void finishOp(java.lang.String, int, java.lang.String);
- method public int noteOp(java.lang.String, int, java.lang.String);
- method public int noteOpNoThrow(java.lang.String, int, java.lang.String);
- method public int noteProxyOp(java.lang.String, java.lang.String);
- method public int noteProxyOpNoThrow(java.lang.String, java.lang.String);
- method public static java.lang.String permissionToOp(java.lang.String);
- method public int startOp(java.lang.String, int, java.lang.String);
- method public int startOpNoThrow(java.lang.String, int, java.lang.String);
- method public void startWatchingMode(java.lang.String, java.lang.String, android.app.AppOpsManager.OnOpChangedListener);
- method public void stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener);
+ method @Deprecated public int checkOp(@NonNull String, int, @NonNull String);
+ method @Deprecated public int checkOpNoThrow(@NonNull String, int, @NonNull String);
+ method public void checkPackage(int, @NonNull String);
+ method public void finishOp(@NonNull String, int, @NonNull String);
+ method public int noteOp(@NonNull String, int, @NonNull String);
+ method public int noteOpNoThrow(@NonNull String, int, @NonNull String);
+ method public int noteProxyOp(@NonNull String, @NonNull String);
+ method public int noteProxyOpNoThrow(@NonNull String, @NonNull String);
+ method public int noteProxyOpNoThrow(@NonNull String, @Nullable String, int);
+ method public static String permissionToOp(String);
+ method public int startOp(@NonNull String, int, @NonNull String);
+ method public int startOpNoThrow(@NonNull String, int, @NonNull String);
+ method public void startWatchingMode(@NonNull String, @Nullable String, @NonNull android.app.AppOpsManager.OnOpChangedListener);
+ method public void startWatchingMode(@NonNull String, @Nullable String, int, @NonNull android.app.AppOpsManager.OnOpChangedListener);
+ method public void stopWatchingMode(@NonNull android.app.AppOpsManager.OnOpChangedListener);
+ method public int unsafeCheckOp(@NonNull String, int, @NonNull String);
+ method public int unsafeCheckOpNoThrow(@NonNull String, int, @NonNull String);
+ method public int unsafeCheckOpRaw(@NonNull String, int, @NonNull String);
+ method public int unsafeCheckOpRawNoThrow(@NonNull String, int, @NonNull String);
field public static final int MODE_ALLOWED = 0; // 0x0
field public static final int MODE_DEFAULT = 3; // 0x3
field public static final int MODE_ERRORED = 2; // 0x2
+ field public static final int MODE_FOREGROUND = 4; // 0x4
field public static final int MODE_IGNORED = 1; // 0x1
- field public static final java.lang.String OPSTR_ADD_VOICEMAIL = "android:add_voicemail";
- field public static final java.lang.String OPSTR_ANSWER_PHONE_CALLS = "android:answer_phone_calls";
- field public static final java.lang.String OPSTR_BODY_SENSORS = "android:body_sensors";
- field public static final java.lang.String OPSTR_CALL_PHONE = "android:call_phone";
- field public static final java.lang.String OPSTR_CAMERA = "android:camera";
- field public static final java.lang.String OPSTR_COARSE_LOCATION = "android:coarse_location";
- field public static final java.lang.String OPSTR_FINE_LOCATION = "android:fine_location";
- field public static final java.lang.String OPSTR_GET_USAGE_STATS = "android:get_usage_stats";
- field public static final java.lang.String OPSTR_MOCK_LOCATION = "android:mock_location";
- field public static final java.lang.String OPSTR_MONITOR_HIGH_POWER_LOCATION = "android:monitor_location_high_power";
- field public static final java.lang.String OPSTR_MONITOR_LOCATION = "android:monitor_location";
- field public static final java.lang.String OPSTR_PICTURE_IN_PICTURE = "android:picture_in_picture";
- field public static final java.lang.String OPSTR_PROCESS_OUTGOING_CALLS = "android:process_outgoing_calls";
- field public static final java.lang.String OPSTR_READ_CALENDAR = "android:read_calendar";
- field public static final java.lang.String OPSTR_READ_CALL_LOG = "android:read_call_log";
- field public static final java.lang.String OPSTR_READ_CELL_BROADCASTS = "android:read_cell_broadcasts";
- field public static final java.lang.String OPSTR_READ_CONTACTS = "android:read_contacts";
- field public static final java.lang.String OPSTR_READ_EXTERNAL_STORAGE = "android:read_external_storage";
- field public static final java.lang.String OPSTR_READ_PHONE_NUMBERS = "android:read_phone_numbers";
- field public static final java.lang.String OPSTR_READ_PHONE_STATE = "android:read_phone_state";
- field public static final java.lang.String OPSTR_READ_SMS = "android:read_sms";
- field public static final java.lang.String OPSTR_RECEIVE_MMS = "android:receive_mms";
- field public static final java.lang.String OPSTR_RECEIVE_SMS = "android:receive_sms";
- field public static final java.lang.String OPSTR_RECEIVE_WAP_PUSH = "android:receive_wap_push";
- field public static final java.lang.String OPSTR_RECORD_AUDIO = "android:record_audio";
- field public static final java.lang.String OPSTR_SEND_SMS = "android:send_sms";
- field public static final java.lang.String OPSTR_SYSTEM_ALERT_WINDOW = "android:system_alert_window";
- field public static final java.lang.String OPSTR_USE_FINGERPRINT = "android:use_fingerprint";
- field public static final java.lang.String OPSTR_USE_SIP = "android:use_sip";
- field public static final java.lang.String OPSTR_WRITE_CALENDAR = "android:write_calendar";
- field public static final java.lang.String OPSTR_WRITE_CALL_LOG = "android:write_call_log";
- field public static final java.lang.String OPSTR_WRITE_CONTACTS = "android:write_contacts";
- field public static final java.lang.String OPSTR_WRITE_EXTERNAL_STORAGE = "android:write_external_storage";
- field public static final java.lang.String OPSTR_WRITE_SETTINGS = "android:write_settings";
+ field public static final String OPSTR_ADD_VOICEMAIL = "android:add_voicemail";
+ field public static final String OPSTR_ANSWER_PHONE_CALLS = "android:answer_phone_calls";
+ field public static final String OPSTR_BODY_SENSORS = "android:body_sensors";
+ field public static final String OPSTR_CALL_PHONE = "android:call_phone";
+ field public static final String OPSTR_CAMERA = "android:camera";
+ field public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
+ field public static final String OPSTR_FINE_LOCATION = "android:fine_location";
+ field public static final String OPSTR_GET_USAGE_STATS = "android:get_usage_stats";
+ field public static final String OPSTR_MOCK_LOCATION = "android:mock_location";
+ field public static final String OPSTR_MONITOR_HIGH_POWER_LOCATION = "android:monitor_location_high_power";
+ field public static final String OPSTR_MONITOR_LOCATION = "android:monitor_location";
+ field public static final String OPSTR_PICTURE_IN_PICTURE = "android:picture_in_picture";
+ field public static final String OPSTR_PROCESS_OUTGOING_CALLS = "android:process_outgoing_calls";
+ field public static final String OPSTR_READ_CALENDAR = "android:read_calendar";
+ field public static final String OPSTR_READ_CALL_LOG = "android:read_call_log";
+ field public static final String OPSTR_READ_CELL_BROADCASTS = "android:read_cell_broadcasts";
+ field public static final String OPSTR_READ_CONTACTS = "android:read_contacts";
+ field public static final String OPSTR_READ_EXTERNAL_STORAGE = "android:read_external_storage";
+ field public static final String OPSTR_READ_PHONE_NUMBERS = "android:read_phone_numbers";
+ field public static final String OPSTR_READ_PHONE_STATE = "android:read_phone_state";
+ field public static final String OPSTR_READ_SMS = "android:read_sms";
+ field public static final String OPSTR_RECEIVE_MMS = "android:receive_mms";
+ field public static final String OPSTR_RECEIVE_SMS = "android:receive_sms";
+ field public static final String OPSTR_RECEIVE_WAP_PUSH = "android:receive_wap_push";
+ field public static final String OPSTR_RECORD_AUDIO = "android:record_audio";
+ field public static final String OPSTR_SEND_SMS = "android:send_sms";
+ field public static final String OPSTR_SYSTEM_ALERT_WINDOW = "android:system_alert_window";
+ field public static final String OPSTR_USE_FINGERPRINT = "android:use_fingerprint";
+ field public static final String OPSTR_USE_SIP = "android:use_sip";
+ field public static final String OPSTR_WRITE_CALENDAR = "android:write_calendar";
+ field public static final String OPSTR_WRITE_CALL_LOG = "android:write_call_log";
+ field public static final String OPSTR_WRITE_CONTACTS = "android:write_contacts";
+ field public static final String OPSTR_WRITE_EXTERNAL_STORAGE = "android:write_external_storage";
+ field public static final String OPSTR_WRITE_SETTINGS = "android:write_settings";
+ field public static final int WATCH_FOREGROUND_CHANGES = 1; // 0x1
}
- public static abstract interface AppOpsManager.OnOpChangedListener {
- method public abstract void onOpChanged(java.lang.String, java.lang.String);
+ public static interface AppOpsManager.OnOpChangedListener {
+ method public void onOpChanged(String, String);
}
public class Application extends android.content.ContextWrapper implements android.content.ComponentCallbacks2 {
ctor public Application();
- method public static java.lang.String getProcessName();
- method public void onConfigurationChanged(android.content.res.Configuration);
- method public void onCreate();
- method public void onLowMemory();
- method public void onTerminate();
- method public void onTrimMemory(int);
+ method public static String getProcessName();
+ method @CallSuper public void onConfigurationChanged(@NonNull android.content.res.Configuration);
+ method @CallSuper public void onCreate();
+ method @CallSuper public void onLowMemory();
+ method @CallSuper public void onTerminate();
+ method @CallSuper public void onTrimMemory(int);
method public void registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks);
method public void registerOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener);
method public void unregisterActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks);
method public void unregisterOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener);
}
- public static abstract interface Application.ActivityLifecycleCallbacks {
- method public abstract void onActivityCreated(android.app.Activity, android.os.Bundle);
- method public abstract void onActivityDestroyed(android.app.Activity);
- method public abstract void onActivityPaused(android.app.Activity);
- method public abstract void onActivityResumed(android.app.Activity);
- method public abstract void onActivitySaveInstanceState(android.app.Activity, android.os.Bundle);
- method public abstract void onActivityStarted(android.app.Activity);
- method public abstract void onActivityStopped(android.app.Activity);
+ public static interface Application.ActivityLifecycleCallbacks {
+ method public void onActivityCreated(@NonNull android.app.Activity, @Nullable android.os.Bundle);
+ method public void onActivityDestroyed(@NonNull android.app.Activity);
+ method public void onActivityPaused(@NonNull android.app.Activity);
+ method public default void onActivityPostCreated(@NonNull android.app.Activity, @Nullable android.os.Bundle);
+ method public default void onActivityPostDestroyed(@NonNull android.app.Activity);
+ method public default void onActivityPostPaused(@NonNull android.app.Activity);
+ method public default void onActivityPostResumed(@NonNull android.app.Activity);
+ method public default void onActivityPostSaveInstanceState(@NonNull android.app.Activity, @NonNull android.os.Bundle);
+ method public default void onActivityPostStarted(@NonNull android.app.Activity);
+ method public default void onActivityPostStopped(@NonNull android.app.Activity);
+ method public default void onActivityPreCreated(@NonNull android.app.Activity, @Nullable android.os.Bundle);
+ method public default void onActivityPreDestroyed(@NonNull android.app.Activity);
+ method public default void onActivityPrePaused(@NonNull android.app.Activity);
+ method public default void onActivityPreResumed(@NonNull android.app.Activity);
+ method public default void onActivityPreSaveInstanceState(@NonNull android.app.Activity, @NonNull android.os.Bundle);
+ method public default void onActivityPreStarted(@NonNull android.app.Activity);
+ method public default void onActivityPreStopped(@NonNull android.app.Activity);
+ method public void onActivityResumed(@NonNull android.app.Activity);
+ method public void onActivitySaveInstanceState(@NonNull android.app.Activity, @NonNull android.os.Bundle);
+ method public void onActivityStarted(@NonNull android.app.Activity);
+ method public void onActivityStopped(@NonNull android.app.Activity);
}
- public static abstract interface Application.OnProvideAssistDataListener {
- method public abstract void onProvideAssistData(android.app.Activity, android.os.Bundle);
+ public static interface Application.OnProvideAssistDataListener {
+ method public void onProvideAssistData(android.app.Activity, android.os.Bundle);
}
public class ApplicationErrorReport implements android.os.Parcelable {
ctor public ApplicationErrorReport();
method public int describeContents();
- method public void dump(android.util.Printer, java.lang.String);
- method public static android.content.ComponentName getErrorReportReceiver(android.content.Context, java.lang.String, int);
+ method public void dump(android.util.Printer, String);
+ method public static android.content.ComponentName getErrorReportReceiver(android.content.Context, String, int);
method public void readFromParcel(android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.ApplicationErrorReport> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.ApplicationErrorReport> CREATOR;
field public static final int TYPE_ANR = 2; // 0x2
field public static final int TYPE_BATTERY = 3; // 0x3
field public static final int TYPE_CRASH = 1; // 0x1
@@ -4308,9 +4382,9 @@
field public android.app.ApplicationErrorReport.AnrInfo anrInfo;
field public android.app.ApplicationErrorReport.BatteryInfo batteryInfo;
field public android.app.ApplicationErrorReport.CrashInfo crashInfo;
- field public java.lang.String installerPackageName;
- field public java.lang.String packageName;
- field public java.lang.String processName;
+ field public String installerPackageName;
+ field public String packageName;
+ field public String processName;
field public android.app.ApplicationErrorReport.RunningServiceInfo runningServiceInfo;
field public boolean systemApp;
field public long time;
@@ -4320,233 +4394,255 @@
public static class ApplicationErrorReport.AnrInfo {
ctor public ApplicationErrorReport.AnrInfo();
ctor public ApplicationErrorReport.AnrInfo(android.os.Parcel);
- method public void dump(android.util.Printer, java.lang.String);
+ method public void dump(android.util.Printer, String);
method public void writeToParcel(android.os.Parcel, int);
- field public java.lang.String activity;
- field public java.lang.String cause;
- field public java.lang.String info;
+ field public String activity;
+ field public String cause;
+ field public String info;
}
public static class ApplicationErrorReport.BatteryInfo {
ctor public ApplicationErrorReport.BatteryInfo();
ctor public ApplicationErrorReport.BatteryInfo(android.os.Parcel);
- method public void dump(android.util.Printer, java.lang.String);
+ method public void dump(android.util.Printer, String);
method public void writeToParcel(android.os.Parcel, int);
- field public java.lang.String checkinDetails;
+ field public String checkinDetails;
field public long durationMicros;
- field public java.lang.String usageDetails;
+ field public String usageDetails;
field public int usagePercent;
}
public static class ApplicationErrorReport.CrashInfo {
ctor public ApplicationErrorReport.CrashInfo();
- ctor public ApplicationErrorReport.CrashInfo(java.lang.Throwable);
+ ctor public ApplicationErrorReport.CrashInfo(Throwable);
ctor public ApplicationErrorReport.CrashInfo(android.os.Parcel);
- method public void dump(android.util.Printer, java.lang.String);
+ method public void dump(android.util.Printer, String);
method public void writeToParcel(android.os.Parcel, int);
- field public java.lang.String exceptionClassName;
- field public java.lang.String exceptionMessage;
- field public java.lang.String stackTrace;
- field public java.lang.String throwClassName;
- field public java.lang.String throwFileName;
+ field public String exceptionClassName;
+ field public String exceptionMessage;
+ field public String stackTrace;
+ field public String throwClassName;
+ field public String throwFileName;
field public int throwLineNumber;
- field public java.lang.String throwMethodName;
+ field public String throwMethodName;
}
public static class ApplicationErrorReport.RunningServiceInfo {
ctor public ApplicationErrorReport.RunningServiceInfo();
ctor public ApplicationErrorReport.RunningServiceInfo(android.os.Parcel);
- method public void dump(android.util.Printer, java.lang.String);
+ method public void dump(android.util.Printer, String);
method public void writeToParcel(android.os.Parcel, int);
field public long durationMillis;
- field public java.lang.String serviceDetails;
+ field public String serviceDetails;
}
public final class AuthenticationRequiredException extends java.lang.SecurityException implements android.os.Parcelable {
- ctor public AuthenticationRequiredException(java.lang.Throwable, android.app.PendingIntent);
+ ctor public AuthenticationRequiredException(Throwable, android.app.PendingIntent);
method public int describeContents();
method public android.app.PendingIntent getUserAction();
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.AuthenticationRequiredException> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.AuthenticationRequiredException> CREATOR;
}
public final class AutomaticZenRule implements android.os.Parcelable {
- ctor public AutomaticZenRule(java.lang.String, android.content.ComponentName, android.net.Uri, int, boolean);
+ ctor @Deprecated public AutomaticZenRule(String, android.content.ComponentName, android.net.Uri, int, boolean);
+ ctor public AutomaticZenRule(@NonNull String, @Nullable android.content.ComponentName, @Nullable android.content.ComponentName, @NonNull android.net.Uri, @Nullable android.service.notification.ZenPolicy, int, boolean);
ctor public AutomaticZenRule(android.os.Parcel);
method public int describeContents();
method public android.net.Uri getConditionId();
+ method @Nullable public android.content.ComponentName getConfigurationActivity();
method public long getCreationTime();
method public int getInterruptionFilter();
- method public java.lang.String getName();
+ method public String getName();
method public android.content.ComponentName getOwner();
+ method public android.service.notification.ZenPolicy getZenPolicy();
method public boolean isEnabled();
method public void setConditionId(android.net.Uri);
+ method public void setConfigurationActivity(@Nullable android.content.ComponentName);
method public void setEnabled(boolean);
method public void setInterruptionFilter(int);
- method public void setName(java.lang.String);
+ method public void setName(String);
+ method public void setZenPolicy(android.service.notification.ZenPolicy);
method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator<android.app.AutomaticZenRule> CREATOR;
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.AutomaticZenRule> CREATOR;
}
public class DatePickerDialog extends android.app.AlertDialog implements android.widget.DatePicker.OnDateChangedListener android.content.DialogInterface.OnClickListener {
- ctor public DatePickerDialog(android.content.Context);
- ctor public DatePickerDialog(android.content.Context, int);
- ctor public DatePickerDialog(android.content.Context, android.app.DatePickerDialog.OnDateSetListener, int, int, int);
- ctor public DatePickerDialog(android.content.Context, int, android.app.DatePickerDialog.OnDateSetListener, int, int, int);
- method public android.widget.DatePicker getDatePicker();
- method public void onClick(android.content.DialogInterface, int);
- method public void onDateChanged(android.widget.DatePicker, int, int, int);
- method public void setOnDateSetListener(android.app.DatePickerDialog.OnDateSetListener);
+ ctor public DatePickerDialog(@NonNull android.content.Context);
+ ctor public DatePickerDialog(@NonNull android.content.Context, @StyleRes int);
+ ctor public DatePickerDialog(@NonNull android.content.Context, @Nullable android.app.DatePickerDialog.OnDateSetListener, int, int, int);
+ ctor public DatePickerDialog(@NonNull android.content.Context, @StyleRes int, @Nullable android.app.DatePickerDialog.OnDateSetListener, int, int, int);
+ method @NonNull public android.widget.DatePicker getDatePicker();
+ method public void onClick(@NonNull android.content.DialogInterface, int);
+ method public void onDateChanged(@NonNull android.widget.DatePicker, int, int, int);
+ method public void setOnDateSetListener(@Nullable android.app.DatePickerDialog.OnDateSetListener);
method public void updateDate(int, int, int);
}
- public static abstract interface DatePickerDialog.OnDateSetListener {
- method public abstract void onDateSet(android.widget.DatePicker, int, int, int);
+ public static interface DatePickerDialog.OnDateSetListener {
+ method public void onDateSet(android.widget.DatePicker, int, int, int);
}
public class Dialog implements android.content.DialogInterface android.view.KeyEvent.Callback android.view.View.OnCreateContextMenuListener android.view.Window.Callback {
- ctor public Dialog(android.content.Context);
- ctor public Dialog(android.content.Context, int);
- ctor protected Dialog(android.content.Context, boolean, android.content.DialogInterface.OnCancelListener);
- method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams);
+ ctor public Dialog(@NonNull android.content.Context);
+ ctor public Dialog(@NonNull android.content.Context, @StyleRes int);
+ ctor protected Dialog(@NonNull android.content.Context, boolean, @Nullable android.content.DialogInterface.OnCancelListener);
+ method public void addContentView(@NonNull android.view.View, @Nullable android.view.ViewGroup.LayoutParams);
method public void cancel();
method public void closeOptionsMenu();
method public void create();
method public void dismiss();
- method public boolean dispatchGenericMotionEvent(android.view.MotionEvent);
- method public boolean dispatchKeyEvent(android.view.KeyEvent);
- method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent);
- method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
- method public boolean dispatchTouchEvent(android.view.MotionEvent);
- method public boolean dispatchTrackballEvent(android.view.MotionEvent);
- method public <T extends android.view.View> T findViewById(int);
- method public android.app.ActionBar getActionBar();
- method public final android.content.Context getContext();
- method public android.view.View getCurrentFocus();
- method public android.view.LayoutInflater getLayoutInflater();
- method public final android.app.Activity getOwnerActivity();
- method public final android.view.SearchEvent getSearchEvent();
+ method public boolean dispatchGenericMotionEvent(@NonNull android.view.MotionEvent);
+ method public boolean dispatchKeyEvent(@NonNull android.view.KeyEvent);
+ method public boolean dispatchKeyShortcutEvent(@NonNull android.view.KeyEvent);
+ method public boolean dispatchPopulateAccessibilityEvent(@NonNull android.view.accessibility.AccessibilityEvent);
+ method public boolean dispatchTouchEvent(@NonNull android.view.MotionEvent);
+ method public boolean dispatchTrackballEvent(@NonNull android.view.MotionEvent);
+ method public <T extends android.view.View> T findViewById(@IdRes int);
+ method @Nullable public android.app.ActionBar getActionBar();
+ method @NonNull public final android.content.Context getContext();
+ method @Nullable public android.view.View getCurrentFocus();
+ method @NonNull public android.view.LayoutInflater getLayoutInflater();
+ method @Nullable public final android.app.Activity getOwnerActivity();
+ method @Nullable public final android.view.SearchEvent getSearchEvent();
method public final int getVolumeControlStream();
- method public android.view.Window getWindow();
+ method @Nullable public android.view.Window getWindow();
method public void hide();
method public void invalidateOptionsMenu();
method public boolean isShowing();
- method public void onActionModeFinished(android.view.ActionMode);
- method public void onActionModeStarted(android.view.ActionMode);
+ method @CallSuper public void onActionModeFinished(android.view.ActionMode);
+ method @CallSuper public void onActionModeStarted(android.view.ActionMode);
method public void onAttachedToWindow();
method public void onBackPressed();
method public void onContentChanged();
- method public boolean onContextItemSelected(android.view.MenuItem);
- method public void onContextMenuClosed(android.view.Menu);
+ method public boolean onContextItemSelected(@NonNull android.view.MenuItem);
+ method public void onContextMenuClosed(@NonNull android.view.Menu);
method protected void onCreate(android.os.Bundle);
method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
- method public boolean onCreateOptionsMenu(android.view.Menu);
- method public boolean onCreatePanelMenu(int, android.view.Menu);
+ method public boolean onCreateOptionsMenu(@NonNull android.view.Menu);
+ method public boolean onCreatePanelMenu(int, @NonNull android.view.Menu);
method public android.view.View onCreatePanelView(int);
method public void onDetachedFromWindow();
- method public boolean onGenericMotionEvent(android.view.MotionEvent);
- method public boolean onKeyDown(int, android.view.KeyEvent);
- method public boolean onKeyLongPress(int, android.view.KeyEvent);
- method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
- method public boolean onKeyShortcut(int, android.view.KeyEvent);
- method public boolean onKeyUp(int, android.view.KeyEvent);
- method public boolean onMenuItemSelected(int, android.view.MenuItem);
- method public boolean onMenuOpened(int, android.view.Menu);
- method public boolean onOptionsItemSelected(android.view.MenuItem);
- method public void onOptionsMenuClosed(android.view.Menu);
- method public void onPanelClosed(int, android.view.Menu);
- method public boolean onPrepareOptionsMenu(android.view.Menu);
- method public boolean onPreparePanel(int, android.view.View, android.view.Menu);
- method public void onRestoreInstanceState(android.os.Bundle);
- method public android.os.Bundle onSaveInstanceState();
- method public boolean onSearchRequested(android.view.SearchEvent);
+ method public boolean onGenericMotionEvent(@NonNull android.view.MotionEvent);
+ method public boolean onKeyDown(int, @NonNull android.view.KeyEvent);
+ method public boolean onKeyLongPress(int, @NonNull android.view.KeyEvent);
+ method public boolean onKeyMultiple(int, int, @NonNull android.view.KeyEvent);
+ method public boolean onKeyShortcut(int, @NonNull android.view.KeyEvent);
+ method public boolean onKeyUp(int, @NonNull android.view.KeyEvent);
+ method public boolean onMenuItemSelected(int, @NonNull android.view.MenuItem);
+ method public boolean onMenuOpened(int, @NonNull android.view.Menu);
+ method public boolean onOptionsItemSelected(@NonNull android.view.MenuItem);
+ method public void onOptionsMenuClosed(@NonNull android.view.Menu);
+ method public void onPanelClosed(int, @NonNull android.view.Menu);
+ method public boolean onPrepareOptionsMenu(@NonNull android.view.Menu);
+ method public boolean onPreparePanel(int, @Nullable android.view.View, @NonNull android.view.Menu);
+ method public void onRestoreInstanceState(@NonNull android.os.Bundle);
+ method @NonNull public android.os.Bundle onSaveInstanceState();
+ method public boolean onSearchRequested(@NonNull android.view.SearchEvent);
method public boolean onSearchRequested();
method protected void onStart();
method protected void onStop();
- method public boolean onTouchEvent(android.view.MotionEvent);
- method public boolean onTrackballEvent(android.view.MotionEvent);
+ method public boolean onTouchEvent(@NonNull android.view.MotionEvent);
+ method public boolean onTrackballEvent(@NonNull android.view.MotionEvent);
method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams);
method public void onWindowFocusChanged(boolean);
method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback, int);
- method public void openContextMenu(android.view.View);
+ method public void openContextMenu(@NonNull android.view.View);
method public void openOptionsMenu();
- method public void registerForContextMenu(android.view.View);
+ method public void registerForContextMenu(@NonNull android.view.View);
method public final boolean requestWindowFeature(int);
- method public final <T extends android.view.View> T requireViewById(int);
- method public void setCancelMessage(android.os.Message);
+ method @NonNull public final <T extends android.view.View> T requireViewById(@IdRes int);
+ method public void setCancelMessage(@Nullable android.os.Message);
method public void setCancelable(boolean);
method public void setCanceledOnTouchOutside(boolean);
- method public void setContentView(int);
- method public void setContentView(android.view.View);
- method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
- method public void setDismissMessage(android.os.Message);
- method public final void setFeatureDrawable(int, android.graphics.drawable.Drawable);
+ method public void setContentView(@LayoutRes int);
+ method public void setContentView(@NonNull android.view.View);
+ method public void setContentView(@NonNull android.view.View, @Nullable android.view.ViewGroup.LayoutParams);
+ method public void setDismissMessage(@Nullable android.os.Message);
+ method public final void setFeatureDrawable(int, @Nullable android.graphics.drawable.Drawable);
method public final void setFeatureDrawableAlpha(int, int);
- method public final void setFeatureDrawableResource(int, int);
- method public final void setFeatureDrawableUri(int, android.net.Uri);
- method public void setOnCancelListener(android.content.DialogInterface.OnCancelListener);
- method public void setOnDismissListener(android.content.DialogInterface.OnDismissListener);
- method public void setOnKeyListener(android.content.DialogInterface.OnKeyListener);
- method public void setOnShowListener(android.content.DialogInterface.OnShowListener);
- method public final void setOwnerActivity(android.app.Activity);
- method public void setTitle(java.lang.CharSequence);
- method public void setTitle(int);
+ method public final void setFeatureDrawableResource(int, @DrawableRes int);
+ method public final void setFeatureDrawableUri(int, @Nullable android.net.Uri);
+ method public void setOnCancelListener(@Nullable android.content.DialogInterface.OnCancelListener);
+ method public void setOnDismissListener(@Nullable android.content.DialogInterface.OnDismissListener);
+ method public void setOnKeyListener(@Nullable android.content.DialogInterface.OnKeyListener);
+ method public void setOnShowListener(@Nullable android.content.DialogInterface.OnShowListener);
+ method public final void setOwnerActivity(@NonNull android.app.Activity);
+ method public void setTitle(@Nullable CharSequence);
+ method public void setTitle(@StringRes int);
method public final void setVolumeControlStream(int);
method public void show();
method public void takeKeyEvents(boolean);
- method public void unregisterForContextMenu(android.view.View);
+ method public void unregisterForContextMenu(@NonNull android.view.View);
}
- public deprecated class DialogFragment extends android.app.Fragment implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
- ctor public DialogFragment();
- method public void dismiss();
- method public void dismissAllowingStateLoss();
- method public android.app.Dialog getDialog();
- method public boolean getShowsDialog();
- method public int getTheme();
- method public boolean isCancelable();
- method public void onCancel(android.content.DialogInterface);
- method public android.app.Dialog onCreateDialog(android.os.Bundle);
- method public void onDismiss(android.content.DialogInterface);
- method public void setCancelable(boolean);
- method public void setShowsDialog(boolean);
- method public void setStyle(int, int);
- method public void show(android.app.FragmentManager, java.lang.String);
- method public int show(android.app.FragmentTransaction, java.lang.String);
- field public static final int STYLE_NORMAL = 0; // 0x0
- field public static final int STYLE_NO_FRAME = 2; // 0x2
- field public static final int STYLE_NO_INPUT = 3; // 0x3
- field public static final int STYLE_NO_TITLE = 1; // 0x1
+ @Deprecated public class DialogFragment extends android.app.Fragment implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
+ ctor @Deprecated public DialogFragment();
+ method @Deprecated public void dismiss();
+ method @Deprecated public void dismissAllowingStateLoss();
+ method @Deprecated public android.app.Dialog getDialog();
+ method @Deprecated public boolean getShowsDialog();
+ method @Deprecated public int getTheme();
+ method @Deprecated public boolean isCancelable();
+ method @Deprecated public void onCancel(android.content.DialogInterface);
+ method @Deprecated public android.app.Dialog onCreateDialog(android.os.Bundle);
+ method @Deprecated public void onDismiss(android.content.DialogInterface);
+ method public android.view.LayoutInflater onGetLayoutInflater(android.os.Bundle);
+ method @Deprecated public void setCancelable(boolean);
+ method @Deprecated public void setShowsDialog(boolean);
+ method @Deprecated public void setStyle(int, int);
+ method @Deprecated public void show(android.app.FragmentManager, String);
+ method @Deprecated public int show(android.app.FragmentTransaction, String);
+ field @Deprecated public static final int STYLE_NORMAL = 0; // 0x0
+ field @Deprecated public static final int STYLE_NO_FRAME = 2; // 0x2
+ field @Deprecated public static final int STYLE_NO_INPUT = 3; // 0x3
+ field @Deprecated public static final int STYLE_NO_TITLE = 1; // 0x1
+ }
+
+ public final class DirectAction implements android.os.Parcelable {
+ method public int describeContents();
+ method @Nullable public android.os.Bundle getExtras();
+ method @NonNull public String getId();
+ method @Nullable public android.content.LocusId getLocusId();
+ method public void writeToParcel(android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.DirectAction> CREATOR;
+ }
+
+ public static final class DirectAction.Builder {
+ ctor public DirectAction.Builder(@NonNull String);
+ method @NonNull public android.app.DirectAction build();
+ method @NonNull public android.app.DirectAction.Builder setExtras(@Nullable android.os.Bundle);
+ method @NonNull public android.app.DirectAction.Builder setLocusId(@Nullable android.content.LocusId);
}
public class DownloadManager {
- method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean);
- method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean, android.net.Uri, android.net.Uri);
+ method @Deprecated public long addCompletedDownload(String, String, boolean, String, String, long, boolean);
+ method @Deprecated public long addCompletedDownload(String, String, boolean, String, String, long, boolean, android.net.Uri, android.net.Uri);
method public long enqueue(android.app.DownloadManager.Request);
- method public static java.lang.Long getMaxBytesOverMobile(android.content.Context);
- method public java.lang.String getMimeTypeForDownloadedFile(long);
- method public static java.lang.Long getRecommendedMaxBytesOverMobile(android.content.Context);
+ method public static Long getMaxBytesOverMobile(android.content.Context);
+ method public String getMimeTypeForDownloadedFile(long);
+ method public static Long getRecommendedMaxBytesOverMobile(android.content.Context);
method public android.net.Uri getUriForDownloadedFile(long);
method public android.os.ParcelFileDescriptor openDownloadedFile(long) throws java.io.FileNotFoundException;
method public android.database.Cursor query(android.app.DownloadManager.Query);
method public int remove(long...);
- field public static final java.lang.String ACTION_DOWNLOAD_COMPLETE = "android.intent.action.DOWNLOAD_COMPLETE";
- field public static final java.lang.String ACTION_NOTIFICATION_CLICKED = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED";
- field public static final java.lang.String ACTION_VIEW_DOWNLOADS = "android.intent.action.VIEW_DOWNLOADS";
- field public static final java.lang.String COLUMN_BYTES_DOWNLOADED_SO_FAR = "bytes_so_far";
- field public static final java.lang.String COLUMN_DESCRIPTION = "description";
- field public static final java.lang.String COLUMN_ID = "_id";
- field public static final java.lang.String COLUMN_LAST_MODIFIED_TIMESTAMP = "last_modified_timestamp";
- field public static final deprecated java.lang.String COLUMN_LOCAL_FILENAME = "local_filename";
- field public static final java.lang.String COLUMN_LOCAL_URI = "local_uri";
- field public static final java.lang.String COLUMN_MEDIAPROVIDER_URI = "mediaprovider_uri";
- field public static final java.lang.String COLUMN_MEDIA_TYPE = "media_type";
- field public static final java.lang.String COLUMN_REASON = "reason";
- field public static final java.lang.String COLUMN_STATUS = "status";
- field public static final java.lang.String COLUMN_TITLE = "title";
- field public static final java.lang.String COLUMN_TOTAL_SIZE_BYTES = "total_size";
- field public static final java.lang.String COLUMN_URI = "uri";
+ field public static final String ACTION_DOWNLOAD_COMPLETE = "android.intent.action.DOWNLOAD_COMPLETE";
+ field public static final String ACTION_NOTIFICATION_CLICKED = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED";
+ field public static final String ACTION_VIEW_DOWNLOADS = "android.intent.action.VIEW_DOWNLOADS";
+ field public static final String COLUMN_BYTES_DOWNLOADED_SO_FAR = "bytes_so_far";
+ field public static final String COLUMN_DESCRIPTION = "description";
+ field public static final String COLUMN_ID = "_id";
+ field public static final String COLUMN_LAST_MODIFIED_TIMESTAMP = "last_modified_timestamp";
+ field @Deprecated public static final String COLUMN_LOCAL_FILENAME = "local_filename";
+ field public static final String COLUMN_LOCAL_URI = "local_uri";
+ field public static final String COLUMN_MEDIAPROVIDER_URI = "mediaprovider_uri";
+ field public static final String COLUMN_MEDIA_TYPE = "media_type";
+ field public static final String COLUMN_REASON = "reason";
+ field public static final String COLUMN_STATUS = "status";
+ field public static final String COLUMN_TITLE = "title";
+ field public static final String COLUMN_TOTAL_SIZE_BYTES = "total_size";
+ field public static final String COLUMN_URI = "uri";
field public static final int ERROR_CANNOT_RESUME = 1008; // 0x3f0
field public static final int ERROR_DEVICE_NOT_FOUND = 1007; // 0x3ef
field public static final int ERROR_FILE_ALREADY_EXISTS = 1009; // 0x3f1
@@ -4556,9 +4652,9 @@
field public static final int ERROR_TOO_MANY_REDIRECTS = 1005; // 0x3ed
field public static final int ERROR_UNHANDLED_HTTP_CODE = 1002; // 0x3ea
field public static final int ERROR_UNKNOWN = 1000; // 0x3e8
- field public static final java.lang.String EXTRA_DOWNLOAD_ID = "extra_download_id";
- field public static final java.lang.String EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS = "extra_click_download_ids";
- field public static final java.lang.String INTENT_EXTRAS_SORT_BY_SIZE = "android.app.DownloadManager.extra_sortBySize";
+ field public static final String EXTRA_DOWNLOAD_ID = "extra_download_id";
+ field public static final String EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS = "extra_click_download_ids";
+ field public static final String INTENT_EXTRAS_SORT_BY_SIZE = "android.app.DownloadManager.extra_sortBySize";
field public static final int PAUSED_QUEUED_FOR_WIFI = 3; // 0x3
field public static final int PAUSED_UNKNOWN = 4; // 0x4
field public static final int PAUSED_WAITING_FOR_NETWORK = 2; // 0x2
@@ -4578,22 +4674,22 @@
public static class DownloadManager.Request {
ctor public DownloadManager.Request(android.net.Uri);
- method public android.app.DownloadManager.Request addRequestHeader(java.lang.String, java.lang.String);
- method public void allowScanningByMediaScanner();
+ method public android.app.DownloadManager.Request addRequestHeader(String, String);
+ method @Deprecated public void allowScanningByMediaScanner();
method public android.app.DownloadManager.Request setAllowedNetworkTypes(int);
method public android.app.DownloadManager.Request setAllowedOverMetered(boolean);
method public android.app.DownloadManager.Request setAllowedOverRoaming(boolean);
- method public android.app.DownloadManager.Request setDescription(java.lang.CharSequence);
- method public android.app.DownloadManager.Request setDestinationInExternalFilesDir(android.content.Context, java.lang.String, java.lang.String);
- method public android.app.DownloadManager.Request setDestinationInExternalPublicDir(java.lang.String, java.lang.String);
+ method public android.app.DownloadManager.Request setDescription(CharSequence);
+ method public android.app.DownloadManager.Request setDestinationInExternalFilesDir(android.content.Context, String, String);
+ method public android.app.DownloadManager.Request setDestinationInExternalPublicDir(String, String);
method public android.app.DownloadManager.Request setDestinationUri(android.net.Uri);
- method public android.app.DownloadManager.Request setMimeType(java.lang.String);
+ method public android.app.DownloadManager.Request setMimeType(String);
method public android.app.DownloadManager.Request setNotificationVisibility(int);
method public android.app.DownloadManager.Request setRequiresCharging(boolean);
method public android.app.DownloadManager.Request setRequiresDeviceIdle(boolean);
- method public deprecated android.app.DownloadManager.Request setShowRunningNotification(boolean);
- method public android.app.DownloadManager.Request setTitle(java.lang.CharSequence);
- method public android.app.DownloadManager.Request setVisibleInDownloadsUi(boolean);
+ method @Deprecated public android.app.DownloadManager.Request setShowRunningNotification(boolean);
+ method public android.app.DownloadManager.Request setTitle(CharSequence);
+ method @Deprecated public android.app.DownloadManager.Request setVisibleInDownloadsUi(boolean);
field public static final int NETWORK_MOBILE = 1; // 0x1
field public static final int NETWORK_WIFI = 2; // 0x2
field public static final int VISIBILITY_HIDDEN = 2; // 0x2
@@ -4616,314 +4712,314 @@
method public void setSelectedGroup(int);
}
- public deprecated class Fragment implements android.content.ComponentCallbacks2 android.view.View.OnCreateContextMenuListener {
- ctor public Fragment();
- method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
- method public final boolean equals(java.lang.Object);
- method public final android.app.Activity getActivity();
- method public boolean getAllowEnterTransitionOverlap();
- method public boolean getAllowReturnTransitionOverlap();
- method public final android.os.Bundle getArguments();
- method public final android.app.FragmentManager getChildFragmentManager();
- method public android.content.Context getContext();
- method public android.transition.Transition getEnterTransition();
- method public android.transition.Transition getExitTransition();
- method public final android.app.FragmentManager getFragmentManager();
- method public final java.lang.Object getHost();
- method public final int getId();
- method public final android.view.LayoutInflater getLayoutInflater();
- method public deprecated android.app.LoaderManager getLoaderManager();
- method public final android.app.Fragment getParentFragment();
- method public android.transition.Transition getReenterTransition();
- method public final android.content.res.Resources getResources();
- method public final boolean getRetainInstance();
- method public android.transition.Transition getReturnTransition();
- method public android.transition.Transition getSharedElementEnterTransition();
- method public android.transition.Transition getSharedElementReturnTransition();
- method public final java.lang.String getString(int);
- method public final java.lang.String getString(int, java.lang.Object...);
- method public final java.lang.String getTag();
- method public final android.app.Fragment getTargetFragment();
- method public final int getTargetRequestCode();
- method public final java.lang.CharSequence getText(int);
- method public boolean getUserVisibleHint();
- method public android.view.View getView();
- method public final int hashCode();
- method public static android.app.Fragment instantiate(android.content.Context, java.lang.String);
- method public static android.app.Fragment instantiate(android.content.Context, java.lang.String, android.os.Bundle);
- method public final boolean isAdded();
- method public final boolean isDetached();
- method public final boolean isHidden();
- method public final boolean isInLayout();
- method public final boolean isRemoving();
- method public final boolean isResumed();
- method public final boolean isStateSaved();
- method public final boolean isVisible();
- method public void onActivityCreated(android.os.Bundle);
- method public void onActivityResult(int, int, android.content.Intent);
- method public void onAttach(android.content.Context);
- method public deprecated void onAttach(android.app.Activity);
- method public void onAttachFragment(android.app.Fragment);
- method public void onConfigurationChanged(android.content.res.Configuration);
- method public boolean onContextItemSelected(android.view.MenuItem);
- method public void onCreate(android.os.Bundle);
- method public android.animation.Animator onCreateAnimator(int, boolean, int);
- method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
- method public void onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater);
- method public android.view.View onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle);
- method public void onDestroy();
- method public void onDestroyOptionsMenu();
- method public void onDestroyView();
- method public void onDetach();
- method public android.view.LayoutInflater onGetLayoutInflater(android.os.Bundle);
- method public void onHiddenChanged(boolean);
- method public deprecated void onInflate(android.util.AttributeSet, android.os.Bundle);
- method public void onInflate(android.content.Context, android.util.AttributeSet, android.os.Bundle);
- method public deprecated void onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle);
- method public void onLowMemory();
- method public void onMultiWindowModeChanged(boolean, android.content.res.Configuration);
- method public deprecated void onMultiWindowModeChanged(boolean);
- method public boolean onOptionsItemSelected(android.view.MenuItem);
- method public void onOptionsMenuClosed(android.view.Menu);
- method public void onPause();
- method public void onPictureInPictureModeChanged(boolean, android.content.res.Configuration);
- method public deprecated void onPictureInPictureModeChanged(boolean);
- method public void onPrepareOptionsMenu(android.view.Menu);
- method public void onRequestPermissionsResult(int, java.lang.String[], int[]);
- method public void onResume();
- method public void onSaveInstanceState(android.os.Bundle);
- method public void onStart();
- method public void onStop();
- method public void onTrimMemory(int);
- method public void onViewCreated(android.view.View, android.os.Bundle);
- method public void onViewStateRestored(android.os.Bundle);
- method public void postponeEnterTransition();
- method public void registerForContextMenu(android.view.View);
- method public final void requestPermissions(java.lang.String[], int);
- method public void setAllowEnterTransitionOverlap(boolean);
- method public void setAllowReturnTransitionOverlap(boolean);
- method public void setArguments(android.os.Bundle);
- method public void setEnterSharedElementCallback(android.app.SharedElementCallback);
- method public void setEnterTransition(android.transition.Transition);
- method public void setExitSharedElementCallback(android.app.SharedElementCallback);
- method public void setExitTransition(android.transition.Transition);
- method public void setHasOptionsMenu(boolean);
- method public void setInitialSavedState(android.app.Fragment.SavedState);
- method public void setMenuVisibility(boolean);
- method public void setReenterTransition(android.transition.Transition);
- method public void setRetainInstance(boolean);
- method public void setReturnTransition(android.transition.Transition);
- method public void setSharedElementEnterTransition(android.transition.Transition);
- method public void setSharedElementReturnTransition(android.transition.Transition);
- method public void setTargetFragment(android.app.Fragment, int);
- method public void setUserVisibleHint(boolean);
- method public boolean shouldShowRequestPermissionRationale(java.lang.String);
- method public void startActivity(android.content.Intent);
- method public void startActivity(android.content.Intent, android.os.Bundle);
- method public void startActivityForResult(android.content.Intent, int);
- method public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
- method public void startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
- method public void startPostponedEnterTransition();
- method public void unregisterForContextMenu(android.view.View);
+ @Deprecated public class Fragment implements android.content.ComponentCallbacks2 android.view.View.OnCreateContextMenuListener {
+ ctor @Deprecated public Fragment();
+ method @Deprecated public void dump(String, java.io.FileDescriptor, java.io.PrintWriter, String[]);
+ method @Deprecated public final boolean equals(Object);
+ method @Deprecated public final android.app.Activity getActivity();
+ method @Deprecated public boolean getAllowEnterTransitionOverlap();
+ method @Deprecated public boolean getAllowReturnTransitionOverlap();
+ method @Deprecated public final android.os.Bundle getArguments();
+ method @Deprecated public final android.app.FragmentManager getChildFragmentManager();
+ method @Deprecated public android.content.Context getContext();
+ method @Deprecated public android.transition.Transition getEnterTransition();
+ method @Deprecated public android.transition.Transition getExitTransition();
+ method @Deprecated public final android.app.FragmentManager getFragmentManager();
+ method @Deprecated @Nullable public final Object getHost();
+ method @Deprecated public final int getId();
+ method @Deprecated public final android.view.LayoutInflater getLayoutInflater();
+ method @Deprecated public android.app.LoaderManager getLoaderManager();
+ method @Deprecated public final android.app.Fragment getParentFragment();
+ method @Deprecated public android.transition.Transition getReenterTransition();
+ method @Deprecated public final android.content.res.Resources getResources();
+ method @Deprecated public final boolean getRetainInstance();
+ method @Deprecated public android.transition.Transition getReturnTransition();
+ method @Deprecated public android.transition.Transition getSharedElementEnterTransition();
+ method @Deprecated public android.transition.Transition getSharedElementReturnTransition();
+ method @Deprecated public final String getString(@StringRes int);
+ method @Deprecated public final String getString(@StringRes int, java.lang.Object...);
+ method @Deprecated public final String getTag();
+ method @Deprecated public final android.app.Fragment getTargetFragment();
+ method @Deprecated public final int getTargetRequestCode();
+ method @Deprecated public final CharSequence getText(@StringRes int);
+ method @Deprecated public boolean getUserVisibleHint();
+ method @Deprecated @Nullable public android.view.View getView();
+ method @Deprecated public final int hashCode();
+ method @Deprecated public static android.app.Fragment instantiate(android.content.Context, String);
+ method @Deprecated public static android.app.Fragment instantiate(android.content.Context, String, @Nullable android.os.Bundle);
+ method @Deprecated public final boolean isAdded();
+ method @Deprecated public final boolean isDetached();
+ method @Deprecated public final boolean isHidden();
+ method @Deprecated public final boolean isInLayout();
+ method @Deprecated public final boolean isRemoving();
+ method @Deprecated public final boolean isResumed();
+ method @Deprecated public final boolean isStateSaved();
+ method @Deprecated public final boolean isVisible();
+ method @Deprecated @CallSuper public void onActivityCreated(@Nullable android.os.Bundle);
+ method @Deprecated public void onActivityResult(int, int, android.content.Intent);
+ method @Deprecated @CallSuper public void onAttach(android.content.Context);
+ method @Deprecated @CallSuper public void onAttach(android.app.Activity);
+ method @Deprecated public void onAttachFragment(android.app.Fragment);
+ method @Deprecated @CallSuper public void onConfigurationChanged(android.content.res.Configuration);
+ method @Deprecated public boolean onContextItemSelected(android.view.MenuItem);
+ method @Deprecated @CallSuper public void onCreate(@Nullable android.os.Bundle);
+ method @Deprecated public android.animation.Animator onCreateAnimator(int, boolean, int);
+ method @Deprecated public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
+ method @Deprecated public void onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater);
+ method @Deprecated @Nullable public android.view.View onCreateView(android.view.LayoutInflater, @Nullable android.view.ViewGroup, android.os.Bundle);
+ method @Deprecated @CallSuper public void onDestroy();
+ method @Deprecated public void onDestroyOptionsMenu();
+ method @Deprecated @CallSuper public void onDestroyView();
+ method @Deprecated @CallSuper public void onDetach();
+ method @Deprecated public android.view.LayoutInflater onGetLayoutInflater(android.os.Bundle);
+ method @Deprecated public void onHiddenChanged(boolean);
+ method @Deprecated @CallSuper public void onInflate(android.util.AttributeSet, android.os.Bundle);
+ method @Deprecated @CallSuper public void onInflate(android.content.Context, android.util.AttributeSet, android.os.Bundle);
+ method @Deprecated @CallSuper public void onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle);
+ method @Deprecated @CallSuper public void onLowMemory();
+ method @Deprecated public void onMultiWindowModeChanged(boolean, android.content.res.Configuration);
+ method @Deprecated public void onMultiWindowModeChanged(boolean);
+ method @Deprecated public boolean onOptionsItemSelected(android.view.MenuItem);
+ method @Deprecated public void onOptionsMenuClosed(android.view.Menu);
+ method @Deprecated @CallSuper public void onPause();
+ method @Deprecated public void onPictureInPictureModeChanged(boolean, android.content.res.Configuration);
+ method @Deprecated public void onPictureInPictureModeChanged(boolean);
+ method @Deprecated public void onPrepareOptionsMenu(android.view.Menu);
+ method @Deprecated public void onRequestPermissionsResult(int, @NonNull String[], @NonNull int[]);
+ method @Deprecated @CallSuper public void onResume();
+ method @Deprecated public void onSaveInstanceState(android.os.Bundle);
+ method @Deprecated @CallSuper public void onStart();
+ method @Deprecated @CallSuper public void onStop();
+ method @Deprecated @CallSuper public void onTrimMemory(int);
+ method @Deprecated public void onViewCreated(android.view.View, @Nullable android.os.Bundle);
+ method @Deprecated @CallSuper public void onViewStateRestored(android.os.Bundle);
+ method @Deprecated public void postponeEnterTransition();
+ method @Deprecated public void registerForContextMenu(android.view.View);
+ method @Deprecated public final void requestPermissions(@NonNull String[], int);
+ method @Deprecated public void setAllowEnterTransitionOverlap(boolean);
+ method @Deprecated public void setAllowReturnTransitionOverlap(boolean);
+ method @Deprecated public void setArguments(android.os.Bundle);
+ method @Deprecated public void setEnterSharedElementCallback(android.app.SharedElementCallback);
+ method @Deprecated public void setEnterTransition(android.transition.Transition);
+ method @Deprecated public void setExitSharedElementCallback(android.app.SharedElementCallback);
+ method @Deprecated public void setExitTransition(android.transition.Transition);
+ method @Deprecated public void setHasOptionsMenu(boolean);
+ method @Deprecated public void setInitialSavedState(android.app.Fragment.SavedState);
+ method @Deprecated public void setMenuVisibility(boolean);
+ method @Deprecated public void setReenterTransition(android.transition.Transition);
+ method @Deprecated public void setRetainInstance(boolean);
+ method @Deprecated public void setReturnTransition(android.transition.Transition);
+ method @Deprecated public void setSharedElementEnterTransition(android.transition.Transition);
+ method @Deprecated public void setSharedElementReturnTransition(android.transition.Transition);
+ method @Deprecated public void setTargetFragment(android.app.Fragment, int);
+ method @Deprecated public void setUserVisibleHint(boolean);
+ method @Deprecated public boolean shouldShowRequestPermissionRationale(@NonNull String);
+ method @Deprecated public void startActivity(android.content.Intent);
+ method @Deprecated public void startActivity(android.content.Intent, android.os.Bundle);
+ method @Deprecated public void startActivityForResult(android.content.Intent, int);
+ method @Deprecated public void startActivityForResult(android.content.Intent, int, android.os.Bundle);
+ method @Deprecated public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
+ method @Deprecated public void startPostponedEnterTransition();
+ method @Deprecated public void unregisterForContextMenu(android.view.View);
}
- public static deprecated class Fragment.InstantiationException extends android.util.AndroidRuntimeException {
- ctor public Fragment.InstantiationException(java.lang.String, java.lang.Exception);
+ @Deprecated public static class Fragment.InstantiationException extends android.util.AndroidRuntimeException {
+ ctor @Deprecated public Fragment.InstantiationException(String, Exception);
}
- public static deprecated class Fragment.SavedState implements android.os.Parcelable {
- method public int describeContents();
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.ClassLoaderCreator<android.app.Fragment.SavedState> CREATOR;
+ @Deprecated public static class Fragment.SavedState implements android.os.Parcelable {
+ method @Deprecated public int describeContents();
+ method @Deprecated public void writeToParcel(android.os.Parcel, int);
+ field @Deprecated public static final android.os.Parcelable.ClassLoaderCreator<android.app.Fragment.SavedState> CREATOR;
}
- public deprecated class FragmentBreadCrumbs extends android.view.ViewGroup implements android.app.FragmentManager.OnBackStackChangedListener {
- ctor public FragmentBreadCrumbs(android.content.Context);
- ctor public FragmentBreadCrumbs(android.content.Context, android.util.AttributeSet);
- ctor public FragmentBreadCrumbs(android.content.Context, android.util.AttributeSet, int);
- method public void onBackStackChanged();
- method public void setActivity(android.app.Activity);
- method public void setMaxVisible(int);