78 Commits

Author SHA1 Message Date
Keun young Park
f992cb3101 add cancellation to background dexopt
- Completely refactored BackgroundDexOptimizationService to make it work
  under PackageManagerService : BackgroundDexOptJobService is added for
  JobService.
- Merged all post boot update code with idle opt code.
- added dump through adb shell dumpsys package dexopt
- cancel background dexopt when idle job is stopped.

Bug: 179094324
Bug: 156537504

TODO: add unit test as separate CL

Test: run idle job, stop it repeatedly and check cancellation
  $ adb shell cmd jobscheduler run android [800|801]
  $ adb shell cmd jobscheduler timeout android
  $ adb shell cmd jobscheduler run android [800|801]
  $ adb shell pm bg-dexopt-job
ex) $ adb shell cmd jobscheduler run android 801; sleep 1; adb shell cmd jobscheduler timeout android
ex) adb shell pm bg-dexopt-job, in a separate termainal: adb shell pm cancel-bg-dexopt-job
  $ adb shell dumpsys package dexopt

Change-Id: Ifa706fe44b0be76d393608646ea9e98169ea8916
2021-10-14 11:33:20 -07:00
Bob Badour
e539dba818 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  apct-tests/perftests/autofill/Android.bp
  apct-tests/perftests/blobstore/Android.bp
  apct-tests/perftests/core/Android.bp
  apct-tests/perftests/core/apps/overlay/Android.bp
  apct-tests/perftests/core/apps/reources_manager/Android.bp
  apct-tests/perftests/core/jni/Android.bp
  apct-tests/perftests/multiuser/Android.bp
  apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
  apct-tests/perftests/packagemanager/Android.bp
  apct-tests/perftests/packagemanager/apps/query-all/Android.bp
  apct-tests/perftests/textclassifier/Android.bp
  apct-tests/perftests/utils/Android.bp
  apct-tests/perftests/windowmanager/Android.bp
  apex/Android.bp
  apex/blobstore/framework/Android.bp
  apex/blobstore/service/Android.bp
  apex/jobscheduler/framework/Android.bp
  apex/jobscheduler/service/Android.bp
  apex/media/Android.bp
  apex/media/aidl/Android.bp
  apex/media/framework/Android.bp
  cmds/am/Android.bp
  cmds/app_process/Android.bp
  cmds/appops/Android.bp
  cmds/appwidget/Android.bp
  cmds/backup/Android.bp
  cmds/bmgr/Android.bp
  cmds/bootanimation/Android.bp
  cmds/bu/Android.bp
  cmds/content/Android.bp
  cmds/dpm/Android.bp
  cmds/hid/Android.bp
  cmds/hid/jni/Android.bp
  cmds/idmap2/Android.bp
  cmds/ime/Android.bp
  cmds/incident/Android.bp
  cmds/incident_helper/Android.bp
  cmds/incidentd/Android.bp
  cmds/input/Android.bp
  cmds/interrupter/Android.bp
  cmds/locksettings/Android.bp
  cmds/pm/Android.bp
  cmds/requestsync/Android.bp
  cmds/screencap/Android.bp
  cmds/sm/Android.bp
  cmds/svc/Android.bp
  cmds/telecom/Android.bp
  cmds/uiautomator/Android.bp
  cmds/uiautomator/cmds/uiautomator/Android.bp
  cmds/uiautomator/instrumentation/Android.bp
  cmds/uiautomator/library/Android.bp
  cmds/vr/Android.bp
  cmds/wm/Android.bp
  config/Android.bp
  core/java/android/service/wallpaper/Android.bp
  core/jni/Android.bp
  core/sysprop/Android.bp
  core/tests/BroadcastRadioTests/Android.bp
  core/tests/ConnectivityManagerTest/Android.bp
  core/tests/PackageInstallerSessions/Android.bp
  core/tests/PlatformCompatFramework/Android.bp
  core/tests/bandwidthtests/Android.bp
  core/tests/benchmarks/Android.bp
  core/tests/bluetoothtests/Android.bp
  core/tests/bugreports/Android.bp
  core/tests/coretests/Android.bp
  core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestService/Android.bp
  core/tests/coretests/BstatsTestApp/Android.bp
  core/tests/coretests/DisabledTestApp/Android.bp
  core/tests/coretests/EnabledTestApp/Android.bp
  core/tests/coretests/aidl/Android.bp
  core/tests/coretests/apks/Android.bp
  core/tests/coretests/apks/install/Android.bp
  core/tests/coretests/apks/install_bad_dex/Android.bp
  core/tests/coretests/apks/install_complete_package_info/Android.bp
  core/tests/coretests/apks/install_decl_perm/Android.bp
  core/tests/coretests/apks/install_jni_lib/Android.bp
  core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
  core/tests/coretests/apks/install_loc_auto/Android.bp
  core/tests/coretests/apks/install_loc_internal/Android.bp
  core/tests/coretests/apks/install_loc_sdcard/Android.bp
  core/tests/coretests/apks/install_loc_unspecified/Android.bp
  core/tests/coretests/apks/install_use_perm_good/Android.bp
  core/tests/coretests/apks/install_uses_feature/Android.bp
  core/tests/coretests/apks/install_verifier_bad/Android.bp
  core/tests/coretests/apks/install_verifier_good/Android.bp
  core/tests/coretests/apks/keyset/Android.bp
  core/tests/coretests/apks/locales/Android.bp
  core/tests/coretests/apks/overlay_config/Android.bp
  core/tests/coretests/apks/version/Android.bp
  core/tests/coretests/apks/version_nosys/Android.bp
  core/tests/featureflagtests/Android.bp
  core/tests/hdmitests/Android.bp
  core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
  core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
  core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
  core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
  core/tests/mockingcoretests/Android.bp
  core/tests/notificationtests/Android.bp
  core/tests/overlaytests/device/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
  core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
  core/tests/overlaytests/host/Android.bp
  core/tests/overlaytests/remount/Android.bp
  core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
  core/tests/overlaytests/remount/test-apps/Target/Android.bp
  core/tests/packagemanagertests/Android.bp
  core/tests/privacytests/Android.bp
  core/tests/screenshothelpertests/Android.bp
  core/tests/systemproperties/Android.bp
  core/tests/utillib/Android.bp
  core/tests/utiltests/Android.bp
  core/tests/utiltests/jni/Android.bp
  core/tests/uwbtests/Android.bp
  core/xsd/Android.bp
  core/xsd/vts/Android.bp
  data/etc/Android.bp
  data/etc/car/Android.bp
  data/fonts/Android.bp
  data/keyboards/Android.mk
  drm/jni/Android.bp
  errorprone/Android.bp
  graphics/proto/Android.bp
  keystore/Android.bp
  keystore/tests/Android.bp
  libs/WindowManager/Jetpack/Android.bp
  libs/WindowManager/Shell/Android.bp
  libs/WindowManager/Shell/tests/Android.bp
  libs/androidfw/Android.bp
  libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
  libs/hostgraphics/Android.bp
  libs/incident/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/protoutil/Android.bp
  libs/services/Android.bp
  libs/storage/Android.bp
  libs/usb/tests/AccessoryChat/Android.bp
  libs/usb/tests/AccessoryChat/accessorychat/Android.bp
  location/lib/Android.bp
  location/tests/Android.bp
  location/tests/locationtests/Android.bp
  lowpan/tests/Android.bp
  media/Android.bp
  media/java/Android.bp
  media/java/android/media/tv/tunerresourcemanager/Android.bp
  media/jni/Android.bp
  media/jni/audioeffect/Android.bp
  media/jni/soundpool/Android.bp
  media/jni/soundpool/tests/Android.bp
  media/lib/remotedisplay/Android.bp
  media/lib/signer/Android.bp
  media/lib/tvremote/Android.bp
  media/lib/tvremote/tests/Android.bp
  media/mca/filterfw/Android.bp
  media/mca/filterfw/native/Android.bp
  media/mca/filterpacks/Android.bp
  media/mca/samples/CameraEffectsRecordingSample/Android.bp
  media/mca/tests/Android.bp
  media/native/midi/Android.bp
  media/packages/BluetoothMidiService/Android.bp
  media/packages/BluetoothMidiService/tests/unit/Android.bp
  media/tests/AudioPolicyTest/Android.bp
  media/tests/CameraBrowser/Android.bp
  media/tests/EffectsTest/Android.bp
  media/tests/MediaDump/Android.bp
  media/tests/MediaFrameworkTest/Android.bp
  media/tests/MediaRouter/Android.bp
  media/tests/MtpTests/Android.bp
  media/tests/ScoAudioTest/Android.bp
  media/tests/SoundPoolTest/Android.bp
  media/tests/TunerTest/Android.bp
  media/tests/audiotests/Android.bp
  media/tests/players/Android.bp
  mime/Android.bp
  native/android/Android.bp
  native/graphics/jni/Android.bp
  native/webview/loader/Android.bp
  nfc-extras/Android.bp
  nfc-extras/tests/Android.bp
  packages/AppPredictionLib/Android.bp
  packages/BackupEncryption/Android.bp
  packages/BackupEncryption/test/robolectric-integration/Android.bp
  packages/BackupEncryption/test/robolectric/Android.bp
  packages/BackupEncryption/test/unittest/Android.bp
  packages/BackupRestoreConfirmation/Android.bp
  packages/CarSystemUI/Android.bp
  packages/CarrierDefaultApp/Android.bp
  packages/CarrierDefaultApp/tests/unit/Android.bp
  packages/CompanionDeviceManager/Android.bp
  packages/Connectivity/framework/Android.bp
  packages/Connectivity/service/Android.bp
  packages/CtsShim/Android.bp
  packages/CtsShim/build/Android.bp
  packages/CtsShim/build/jni/Android.bp
  packages/DynamicSystemInstallationService/Android.bp
  packages/DynamicSystemInstallationService/tests/Android.bp
  packages/EasterEgg/Android.bp
  packages/EncryptedLocalTransport/Android.bp
  packages/ExtShared/Android.bp
  packages/ExternalStorageProvider/Android.bp
  packages/ExternalStorageProvider/tests/Android.bp
  packages/FakeOemFeatures/Android.bp
  packages/FusedLocation/Android.bp
  packages/InputDevices/Android.bp
  packages/LocalTransport/Android.bp
  packages/PackageInstaller/Android.bp
  packages/PrintRecommendationService/Android.bp
  packages/PrintSpooler/Android.bp
  packages/PrintSpooler/jni/Android.bp
  packages/PrintSpooler/tests/outofprocess/Android.bp
  packages/SettingsLib/ActionBarShadow/Android.bp
  packages/SettingsLib/ActionButtonsPreference/Android.bp
  packages/SettingsLib/AdaptiveIcon/Android.bp
  packages/SettingsLib/Android.bp
  packages/SettingsLib/AppPreference/Android.bp
  packages/SettingsLib/BarChartPreference/Android.bp
  packages/SettingsLib/DisplayDensityUtils/Android.bp
  packages/SettingsLib/EntityHeaderWidgets/Android.bp
  packages/SettingsLib/HelpUtils/Android.bp
  packages/SettingsLib/LayoutPreference/Android.bp
  packages/SettingsLib/ProgressBar/Android.bp
  packages/SettingsLib/RadioButtonPreference/Android.bp
  packages/SettingsLib/RestrictedLockUtils/Android.bp
  packages/SettingsLib/SchedulesProvider/Android.bp
  packages/SettingsLib/SearchProvider/Android.bp
  packages/SettingsLib/SearchWidget/Android.bp
  packages/SettingsLib/SettingsSpinner/Android.bp
  packages/SettingsLib/SettingsTheme/Android.bp
  packages/SettingsLib/Tile/Android.bp
  packages/SettingsLib/Utils/Android.bp
  packages/SettingsLib/search/Android.bp
  packages/SettingsLib/tests/integ/Android.bp
  packages/SettingsLib/tests/robotests/Android.bp
  packages/SettingsProvider/Android.bp
  packages/SharedStorageBackup/Android.bp
  packages/Shell/Android.bp
  packages/Shell/tests/Android.bp
  packages/SimAppDialog/Android.bp
  packages/SoundPicker/Android.bp
  packages/StatementService/Android.bp
  packages/SystemUI/Android.bp
  packages/SystemUI/plugin/Android.bp
  packages/SystemUI/plugin/ExamplePlugin/Android.bp
  packages/SystemUI/plugin_core/Android.bp
  packages/SystemUI/shared/Android.bp
  packages/VpnDialogs/Android.bp
  packages/WAPPushManager/Android.bp
  packages/WAPPushManager/tests/Android.bp
  packages/WallpaperBackup/Android.bp
  packages/WallpaperCropper/Android.bp
  packages/overlays/Android.mk
  packages/overlays/tests/Android.bp
  packages/services/PacProcessor/Android.bp
  packages/services/PacProcessor/jni/Android.bp
  packages/services/Proxy/Android.bp
  proto/Android.bp
  rs/jni/Android.mk
  samples/demo/haptic-assessment/Android.bp
  sax/tests/saxtests/Android.bp
  services/Android.bp
  services/accessibility/Android.bp
  services/appprediction/Android.bp
  services/appwidget/Android.bp
  services/autofill/Android.bp
  services/backup/Android.bp
  services/backup/backuplib/Android.bp
  services/companion/Android.bp
  services/contentcapture/Android.bp
  services/contentsuggestions/Android.bp
  services/core/Android.bp
  services/core/java/com/android/server/vcn/Android.bp
  services/core/jni/Android.bp
  services/core/xsd/Android.bp
  services/core/xsd/vts/Android.bp
  services/coverage/Android.bp
  services/devicepolicy/Android.bp
  services/incremental/Android.bp
  services/midi/Android.bp
  services/net/Android.bp
  services/people/Android.bp
  services/print/Android.bp
  services/profcollect/Android.bp
  services/restrictions/Android.bp
  services/robotests/Android.bp
  services/robotests/backup/Android.bp
  services/systemcaptions/Android.bp
  services/tests/PackageManagerComponentOverrideTests/Android.bp
  services/tests/PackageManagerServiceTests/host/Android.bp
  services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
  services/tests/mockingservicestests/Android.bp
  services/tests/rescueparty/Android.bp
  services/tests/servicestests/Android.bp
  services/tests/servicestests/aidl/Android.bp
  services/tests/servicestests/apks/Android.bp
  services/tests/servicestests/apks/install-split-base/Android.bp
  services/tests/servicestests/apks/install-split-feature-a/Android.bp
  services/tests/servicestests/apks/install_intent_filters/Android.bp
  services/tests/servicestests/apks/install_uses_sdk/Android.bp
  services/tests/servicestests/test-apps/ConnTestApp/Android.bp
  services/tests/servicestests/test-apps/JobTestApp/Android.bp
  services/tests/servicestests/test-apps/PackageParserApp/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
  services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
  services/tests/shortcutmanagerutils/Android.bp
  services/tests/uiservicestests/Android.bp
  services/tests/wmtests/Android.bp
  services/usage/Android.bp
  services/usb/Android.bp
  services/voiceinteraction/Android.bp
  services/wifi/Android.bp
  startop/apps/test/Android.bp
  startop/iorap/Android.bp
  startop/iorap/functional_tests/Android.bp
  startop/iorap/stress/Android.bp
  startop/iorap/tests/Android.bp
  startop/view_compiler/Android.bp
  startop/view_compiler/dex_builder_test/Android.bp
  test-base/hiddenapi/Android.bp
  test-mock/Android.bp
  test-runner/tests/Android.bp
  tests/AccessibilityEventsLogger/Android.bp
  tests/AccessoryDisplay/common/Android.bp
  tests/AccessoryDisplay/sink/Android.bp
  tests/AccessoryDisplay/source/Android.bp
  tests/ActivityManagerPerfTests/stub-app/Android.bp
  tests/ActivityManagerPerfTests/test-app/Android.bp
  tests/ActivityManagerPerfTests/tests/Android.bp
  tests/ActivityManagerPerfTests/utils/Android.bp
  tests/ActivityTests/Android.bp
  tests/ActivityViewTest/Android.bp
  tests/AmSlam/Android.bp
  tests/ApkVerityTest/Android.bp
  tests/ApkVerityTest/ApkVerityTestApp/Android.bp
  tests/ApkVerityTest/block_device_writer/Android.bp
  tests/AppLaunch/Android.bp
  tests/AppLaunchWear/Android.bp
  tests/AppResourcesLoaders/Android.bp
  tests/AppResourcesLoaders/Overlay/Android.bp
  tests/Assist/Android.bp
  tests/AutoVerify/app1/Android.bp
  tests/AutoVerify/app2/Android.bp
  tests/AutoVerify/app3/Android.bp
  tests/AutoVerify/app4/Android.bp
  tests/BackgroundDexOptServiceIntegrationTests/Android.bp
  tests/BandwidthTests/Android.bp
  tests/BatteryWaster/Android.bp
  tests/BiDiTests/Android.bp
  tests/BlobStoreTestUtils/Android.bp
  tests/BootImageProfileTest/Android.bp
  tests/BrowserPowerTest/Android.bp
  tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
  tests/CameraPrewarmTest/Android.bp
  tests/Codegen/Android.bp
  tests/Compatibility/Android.bp
  tests/CoreTests/android/Android.bp
  tests/DataIdleTest/Android.bp
  tests/DozeTest/Android.bp
  tests/DpiTest/Android.bp
  tests/DynamicCodeLoggerIntegrationTests/Android.mk
  tests/FeatureSplit/base/Android.bp
  tests/FeatureSplit/feature1/Android.bp
  tests/FeatureSplit/feature2/Android.bp
  tests/FixVibrateSetting/Android.bp
  tests/FlickerTests/Android.bp
  tests/FlickerTests/test-apps/Android.bp
  tests/FlickerTests/test-apps/flickerapp/Android.bp
  tests/FrameworkPerf/Android.bp
  tests/GamePerformance/Android.bp
  tests/GridLayoutTest/Android.bp
  tests/HierarchyViewerTest/Android.bp
  tests/HugeBackup/Android.bp
  tests/HwAccelerationTest/Android.bp
  tests/Internal/Android.bp
  tests/JankBench/Android.bp
  tests/JobSchedulerPerfTests/Android.bp
  tests/JobSchedulerTestApp/Android.bp
  tests/LargeAssetTest/Android.bp
  tests/LegacyAssistant/Android.bp
  tests/LocalizationTest/Android.bp
  tests/LocationTracker/Android.bp
  tests/LotsOfApps/Android.bp
  tests/LowStorageTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
  tests/MemoryUsage/Android.bp
  tests/MirrorSurfaceTest/Android.bp
  tests/NativeProcessesMemoryTest/Android.bp
  tests/NetworkSecurityConfigTest/Android.bp
  tests/NullHomeTest/Android.bp
  tests/OdmApps/Android.bp
  tests/OdmApps/app/Android.bp
  tests/OdmApps/priv-app/Android.bp
  tests/OneMedia/Android.bp
  tests/PackageWatchdog/Android.bp
  tests/PlatformCompatGating/Android.bp
  tests/PlatformCompatGating/test-rules/Android.bp
  tests/ProtoInputStreamTests/Android.bp
  tests/RemoteDisplayProvider/Android.bp
  tests/RenderThreadTest/Android.bp
  tests/RollbackTest/Android.bp
  tests/SerialChat/Android.bp
  tests/ServiceCrashTest/Android.bp
  tests/SharedLibrary/client/Android.bp
  tests/SharedLibrary/lib/Android.bp
  tests/ShowWhenLockedApp/Android.bp
  tests/SmokeTest/Android.bp
  tests/SmokeTest/tests/Android.bp
  tests/SmokeTestApps/Android.bp
  tests/SoundTriggerTestApp/Android.bp
  tests/Split/Android.bp
  tests/StagedInstallTest/Android.bp
  tests/StatusBar/Android.bp
  tests/SurfaceComposition/Android.bp
  tests/SurfaceControlViewHostTest/Android.bp
  tests/SystemMemoryTest/device/Android.bp
  tests/SystemMemoryTest/host/Android.bp
  tests/SystemUIDemoModeController/Android.bp
  tests/TaskOrganizerTest/Android.bp
  tests/TelephonyCommonTests/Android.bp
  tests/TouchLatency/Android.bp
  tests/TransformTest/Android.bp
  tests/TtsTests/Android.bp
  tests/UiBench/Android.bp
  tests/UsageReportingTest/Android.bp
  tests/UsageStatsPerfTests/Android.bp
  tests/UsageStatsTest/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
  tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
  tests/UsbManagerTests/Android.bp
  tests/UsbManagerTests/lib/Android.bp
  tests/UsbTests/Android.bp
  tests/UsesFeature2Test/Android.bp
  tests/VectorDrawableTest/Android.bp
  tests/VoiceEnrollment/Android.bp
  tests/VoiceInteraction/Android.bp
  tests/WallpaperTest/Android.bp
  tests/WindowAnimationJank/Android.bp
  tests/WindowInsetsTests/Android.bp
  tests/appwidgets/AppWidgetHostTest/Android.bp
  tests/appwidgets/AppWidgetProviderTest/Android.bp
  tests/backup/Android.mk
  tests/benchmarks/Android.bp
  tests/libs-permissions/Android.bp
  tests/net/Android.bp
  tests/net/common/Android.bp
  tests/net/deflake/Android.bp
  tests/net/integration/Android.bp
  tests/net/jni/Android.bp
  tests/net/smoketest/Android.bp
  tests/notification/Android.bp
  tests/permission/Android.bp
  tests/privapp-permissions/Android.bp
  tests/testables/Android.bp
  tests/testables/tests/Android.bp
  tests/utils/StubIME/Android.bp
  tests/utils/hostutils/Android.bp
  tests/utils/testutils/Android.bp
  tests/vcn/Android.bp
  tools/aapt/Android.bp
  tools/aapt2/Android.bp
  tools/aapt2/integration-tests/AutoVersionTest/Android.bp
  tools/aapt2/integration-tests/BasicTest/Android.bp
  tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
  tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
  tools/aapt2/integration-tests/SymlinkTest/Android.bp
  tools/bit/Android.bp
  tools/codegen/Android.bp
  tools/dump-coverage/Android.bp
  tools/incident_report/Android.bp
  tools/incident_section_gen/Android.bp
  tools/lock_agent/Android.bp
  tools/locked_region_code_injection/Android.bp
  tools/obbtool/Android.bp
  tools/powermodel/Android.bp
  tools/preload-check/Android.bp
  tools/preload-check/device/Android.bp
  tools/preload/loadclass/Android.bp
  tools/processors/staledataclass/Android.bp
  tools/processors/view_inspector/Android.bp
  tools/protologtool/Android.bp
  tools/sdkparcelables/Android.bp
  tools/split-select/Android.bp
  tools/streaming_proto/Android.bp
  tools/validatekeymaps/Android.bp
  wifi/java/Android.bp
  wifi/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  libs/hwui/Android.bp
  native/webview/plat_support/Android.bp
  obex/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  core/java/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  test-base/Android.bp
  test-runner/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
  core/res/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  libs/usb/Android.bp
  libs/usb/tests/accessorytest/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  tools/preload/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  api/Android.bp
  boot/Android.bp
  cmds/device_config/Android.bp
  cmds/settings/Android.bp
  core/api/Android.bp
  core/tests/coretests/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
  core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
  libs/tracingproxy/Android.bp
  services/startop/Android.bp
  test-legacy/Android.mk
  tests/ApkVerityTest/testdata/Android.bp
  tests/TransitionTests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ib9737d8fb5ef5b90a2c14fe71f1a571079edcf02
2021-02-18 17:40:40 +00:00
Adam Bookatz
c8eaa82d5c Merge "Cleanup some SystemService.onUser...() comments" 2020-12-10 10:03:34 +00:00
Adam Bookatz
4f2d2e84a4 Cleanup some SystemService.onUser...() comments
These functions were recently renamed, so this cl
updates a few comments referencing the old names.

Also removes an unused method.

Test: compiles (just comments and removing unused method)
Change-Id: Iaaf8fd4927c4ccf38fffb304c67ef139e626fdcf
2020-12-09 23:53:23 +00:00
yawanng
da5dcf7b72 iorap: Terminate iorapd process when both tracing and prefetching are off.
Purge spam log when iorapd process is not alive.
Turn off the Iorap Service when both tracing and prefetching are not
alive.

Bug: 174588448
Test: set the flags via mendel and check the log
Change-Id: I8d4e0c869dec5e7dc5016622b154aef46e1d4f02
2020-12-04 07:26:59 +00:00
yawanng
11b592be87 iorap: Stop compilation when the device is not idle.
System service sends each package name to iorap during idle time
for compilation and only sends the next one after the current one is done.
When the device is not idle, stop sending the following packages.

Bug: 171438036
Test: Run 'adb shell cmd jobscheduler run -f android 283673059'
and 'adb shell cmd jobscheduler timeout android 283673059' and check the
log.

Change-Id: I39e6cf83a55ce8b4e8c3c7984391fad6dd86a4e7
2020-12-03 23:59:14 +00:00
Alexander Dorokhine
4697f76edd Migrate away from deprecated Truth APIs.
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.

Bug: 168765701
Test: m checkbuild
Change-Id: I26ab5ab82bb939bbd9553c05387ac8641eb468b4
2020-10-02 23:42:38 -07:00
Treehugger Robot
be80f658c7 Merge "IorapForwardingService: Suppress error log" am: c20242f7e6 am: 3e1b131387 am: 2206e69609 am: a0421d89ba am: 1c30e174e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1396951

Change-Id: I1f96d88783f735f345f4a3f8a5b7fd141db677bb
2020-08-20 00:08:32 +00:00
Treehugger Robot
2206e69609 Merge "IorapForwardingService: Suppress error log" am: c20242f7e6 am: 3e1b131387
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1396951

Change-Id: Iab8643f7f4c73e27b492e62128135403bb565d7e
2020-08-19 22:58:14 +00:00
yawanng
aeec6c8ff5 IorapForwardingService: Suppress error log
Bug: 160381575
Test: make
Change-Id: Iee7506205edc2863c76d0dae0568297565def3df
2020-08-19 19:50:09 +00:00
yawanng
edd2c90631 EventSequenceValidator: Only record the debug log in debugging level.
The stack trace log may confuse other developers and mistakenly points
to IORap as the bug cause.

cherry-pick from ef5e1a6dbee8c7b2db4f150ea9463a8523a207ec

Bug: 161145462
Test: Make and check the logcat.
Merged-In: I3cb24cace060cff381ab3c5770ff6c1c948a2d89
Change-Id: I3cb24cace060cff381ab3c5770ff6c1c948a2d89
2020-07-19 11:55:16 -07:00
yawanng
ef5e1a6dbe EventSequenceValidator: Only record the debug log in debugging level.
The stack trace log may confuse other developers and mistakenly points
to IORap as the bug cause.

Bug: 161145462
Test: Make and check the logcat.
Change-Id: I3cb24cace060cff381ab3c5770ff6c1c948a2d89
2020-07-15 02:22:20 +00:00
yawanng
dce293b64a DO NOT MERGE: EventSequenceValidator: downgrade the log level.
This class is for sanity check only, downgrade the log level.

Bug: 159947779
Test: Make and check the logcat.
Change-Id: I0c9c125c0208849252db4992dfd4860750a104f8
2020-06-26 16:37:57 +00:00
TreeHugger Robot
947c442662 Merge "Revert "iorap-functional-test: Add iorap-functional-test to presubmit."" into rvc-dev am: 78423e42b9 am: b789762fc3 am: 5dbc6573db am: 510410424a
Change-Id: Ia2dd2bcb5348d1c08780f6fbfe558c3b4d6b874a
2020-04-30 21:36:15 +00:00
TreeHugger Robot
78423e42b9 Merge "Revert "iorap-functional-test: Add iorap-functional-test to presubmit."" into rvc-dev 2020-04-30 20:51:20 +00:00
Yan Wang
99ac28c18c Revert "iorap-functional-test: Add iorap-functional-test to presubmit."
This reverts commit e4533f0e3e163812acc9fa292367a937100a4ee7.

Reason for revert: The tests are very flaky. It prevents the new CLs. It's not flaky when using acloud. Temporarily turn it off before submitting ag/11056503

Bug: 155424393
Change-Id: I5d5ecc3162d6a89a1e86e3dfab91a4af05d9d2d1
2020-04-30 20:51:08 +00:00
TreeHugger Robot
d5caaa7e76 Merge "iorap-functional-test: Add iorap-functional-test to presubmit." into rvc-dev am: 3bc73c27c8 am: e3424037dc am: 43722d8b4c am: af89a064d5
Change-Id: I8f1c52ae284878a1819d9c426affdd5d96635b6a
2020-04-24 01:13:12 +00:00
TreeHugger Robot
3bc73c27c8 Merge "iorap-functional-test: Add iorap-functional-test to presubmit." into rvc-dev 2020-04-24 00:40:55 +00:00
TreeHugger Robot
4d7429ff8b Merge "iorap-functional-test: Add leading 0 to timestamp." into rvc-dev am: 23e062deb5 am: b85aecc8d5 am: 443535c709 am: cdd1d07ca1 am: 4a1e025abd
Change-Id: I675acf89886ef8c2921d4ff51be16f23c54a2a58
2020-04-16 00:48:09 +00:00
TreeHugger Robot
23e062deb5 Merge "iorap-functional-test: Add leading 0 to timestamp." into rvc-dev 2020-04-15 21:34:13 +00:00
TreeHugger Robot
59c9aa5db7 Merge "iorap-functional-test: Import test apks from filegroup." into rvc-dev am: de761b0951 am: 860e178af3 am: 33d08f17ba am: a67cec37f8
Change-Id: I6ea71f0fba1e684443b74f0ada9ac061480b1a18
2020-04-15 16:48:33 +00:00
Yan Wang
12b070b58a iorap-functional-test: Add leading 0 to timestamp.
For example: 100001ms should be 100.001s instead of 100.1s

Bug: 154036462
Test: atest iorap-functional-tests
Change-Id: I9502358539019573af106d9dcec2681ea406598b
2020-04-14 19:52:28 -07:00
TreeHugger Robot
de761b0951 Merge "iorap-functional-test: Import test apks from filegroup." into rvc-dev 2020-04-15 00:20:58 +00:00
Yan Wang
e4533f0e3e iorap-functional-test: Add iorap-functional-test to presubmit.
Bug: 153901665
Test: treehugger
Change-Id: I86c65f0c546fe0aeff16df57c65ad42046fdaf6b
2020-04-14 22:19:59 +00:00
Automerger Merge Worker
2356e35c3c Merge "Merge "startop: Forward the package update event from dexopt service to iorapd." into rvc-dev am: 1dcd8f4116 am: 0c36700457" into rvc-d1-dev-plus-aosp am: e546610e0c am: 140451f1c6
Change-Id: I1c129ac7abbf018a17cfda1302f2208fa3d1e45e
2020-04-14 02:34:45 +00:00
Yan Wang
150c151ca7 startop: Forward the package update event from dexopt service to iorapd.
Bug: 150640692
Test: adb shell cmd package bg-dexopt-job com.google.android.GoogleCamera

Change-Id: Ic51091eb06a460571edfa584437cb18cf31ce815
2020-04-13 14:57:30 -07:00
Yan Wang
fec19c298f iorap-functional-test: Import test apks from filegroup.
Branch ub-ctsshim-dev doesn't include these apks in other dir and
causes dangling symlink.

Bug: 153458255
Test: make
Change-Id: I9efdfe620d06356d6e6f84faf5334382465c681f
2020-04-13 11:16:30 -07:00
TreeHugger Robot
d9359f5a70 Merge "dexopt: Add listeners when packages are updated by bg-dexopt" into rvc-dev am: 9b2931e973 am: 42e6558150 am: 75524ea5c3 am: 7355d61a82
Change-Id: I18259b3671f702e70f1119bbbbc19553d0e12e59
2020-04-08 20:11:40 +00:00
TreeHugger Robot
9b2931e973 Merge "dexopt: Add listeners when packages are updated by bg-dexopt" into rvc-dev 2020-04-08 19:48:41 +00:00
TreeHugger Robot
77e890265d Merge "iorap_functional_test: Add iorap function test." into rvc-dev am: d3e541eb03 am: 77bf81a749 am: 54b18d3205 am: 293e8625a5
Change-Id: I94ac5e811d5263ebafaf2ba25291066fe8e0a97f
2020-04-04 06:46:31 +00:00
Yan Wang
57494106e6 resolve merge conflicts of df559175e0a0a1e47799724ef75affb428695faa to master
Change-Id: I417c1c8d3c043b5af5895d15196940eee5d02612
2020-04-03 16:48:12 -07:00
Yan Wang
57179c5fb1 iorap_functional_test: Add iorap function test.
Changes:
* Check logcat instead of db to confirm each step.
* Include version invalidation.

Bug: 152443508
Bug: 148936893
Test: atest iorap-functional-tests on cuttlefish.
Change-Id: I27e8fc8705889a04cb6f38295b64a25c1aceb742
2020-04-03 15:36:20 -07:00
Igor Murashkin
87776bdcf0 dexopt: Add listeners when packages are updated by bg-dexopt
The plan is to use it for iorap to purge its traces when a package
is updated.

Bug: 150640692
Test: adb shell cmd package bg-dexopt-job com.google.android.GoogleCamera
Change-Id: I45f4dacc1630c4afd7cf2321371a04f79ef18d9e
2020-04-02 13:56:14 -07:00
Yan Wang
b4b806dd7a Merge "startop: Fix a string format bug in EventSequenceValidator." into rvc-dev 2020-04-01 18:47:30 +00:00
Yan Wang
b5d1353a69 startop: Fix a string format bug in EventSequenceValidator.
Bug: 152725990
Test: Make and run check the log.
Change-Id: Ib56a8f7acadec073946353f8b0a8a4677099b3b2
2020-03-31 13:56:29 -07:00
TreeHugger Robot
8853671d58 Merge changes from topic "iorap-perfmaster-fix" into rvc-dev am: 5c0b30caab am: 5f08fe7d36 am: 9342766da2 am: 9d2ad1cf31
Change-Id: I26a294168333a22a4ab6f7428c070c34b2cc07cf
2020-03-28 03:08:32 +00:00
Igor Murashkin
327c3507bc iorap: Log a message when we reconnect to iorapd after binder death.
Bug: 152322429
Test: stop iorapd && start iorapd
Change-Id: Ie68844f4854b295b195f5e4f71143b18a0170b41
2020-03-27 14:32:46 -07:00
Yan Wang
fd2c39855a DO NOT MERGE: startop: Downgrade EventSequenceValidator to warning.
Downgrade EventSequenceValidator into warnings for rvc-dev since the C++ side
will already handle bad state transitions from ActivityMetricsLogger.

Only for rvc-dev because we'll want to properly fix this for S.

Bug: 152322073
Test: build
Change-Id: Idf7a68436c2d60b123e0e6e58dc098b62aa11e80
2020-03-24 17:44:49 -07:00
Automerger Merge Worker
750824e47f Merge "iorap: Increase timeout from 66sec to 30min for iorap-functional-tests" into rvc-dev am: e45165523b am: 36679d497a am: a16e3ee83f am: 756fc0cec0
Change-Id: I6ab9785d867233a5536d8506c4ca0d69778b6384
2020-02-28 20:45:41 +00:00
Yan Wang
be178769ad iorap: Increase the JobScheduledEvent#TYPE_MAX to 1.
Fixes system_server crashes at the end of a job (in #onStopJob)
by correcting the MAX type number.


Bug: 148191073
Test: make
Change-Id: I12b0c65a0b3ad7ab3277a94f51fa2e71d323f862
(cherry picked from commit aa1ac9309416519dab21a17b8632645860e1431b)
2020-02-28 18:08:46 +00:00
Yan Wang
6411a3353d startop: Fix a bug in iorap functional test.
The prefetching work runs on another process.
Grep everything to workaround it.

Bug: 137403231
Test: atest iorap-functional-tests
Change-Id: Iac1796cb22f0db83ac5ebd78cb40e5cc5ac3a930
(cherry picked from commit 7d76f014eb92661f4fb8fdb949ac000ffdce3c65)
2020-02-28 18:08:24 +00:00
Igor Murashkin
a52f95e589 iorap: Increase timeout from 66sec to 30min for iorap-functional-tests
inode2filename is a bit slower now so it takes a while for the compiler
to finish. Increase timeout to compensate.

Bug: 150462358
Test: atest iorap-functional-tests
Change-Id: If1e017ad3c2c441b96dceadd91eb340fdf24302c
2020-02-28 10:01:59 -08:00
Yan Wang
7d76f014eb startop: Fix a bug in iorap functional test.
The prefetching work runs on another process.
Grep everything to workaround it.

Test: atest iorap-functional-tests
Change-Id: Iac1796cb22f0db83ac5ebd78cb40e5cc5ac3a930
2020-02-25 10:28:57 -08:00
Yan Wang
aa1ac93094 iorap: Increase the JobScheduledEvent#TYPE_MAX to 1.
Fixes system_server crashes at the end of a job (in #onStopJob)
by correcting the MAX type number.


Bug: 148191073
Test: make
Change-Id: I12b0c65a0b3ad7ab3277a94f51fa2e71d323f862
2020-02-24 22:23:36 +00:00
TreeHugger Robot
8eb3cbe1ba Merge "Fix functional test for startop." 2020-02-13 22:02:43 +00:00
Yan Wang
86a4934a3f Fix functional test for startop.
* Enable perfetto tracing and readahead for testing.
* Extend time limit for JUnit test to 5min.

Bug: 148936893
Test: run atest iorap-functional-tests on Forrest
Change-Id: Iad2b2201abf7736a9c86e4e5f7c1579eb78b2e23
2020-02-12 22:10:14 +00:00
TreeHugger Robot
524ec05bc6 Merge "startop: Add iorap.stress.memory tool to test system with less RAM" 2020-02-12 02:42:39 +00:00
TreeHugger Robot
7ef11494ea Merge "iorap: Disable iorap integration test temporarily." 2020-02-12 00:55:32 +00:00
Igor Murashkin
62416783e0 iorap: Disable iorap integration test temporarily.
It is broken because selinux is broken in cf_x86,
see bug b/149098310.

Disable it until the above bug is resolved or we come up
with a workaround.

Bug: 148765584
Change-Id: If0ac0f6dd04b1aad693405643f133361ad65f4fc
2020-02-11 15:29:33 -08:00
Yan Wang
c11581007b Revert "startop: Add iorap functional test to presubmit test."
This reverts commit 7cda47a2d1c9a50fee547645ead90559fadc7450.

Reason for revert: This test failed frequently for some reason. Disable it to investigate the reason.

Change-Id: I7c9da14396010f4ddf728e5626b8827d471219a8
2020-02-04 23:36:17 +00:00