Commit Graph

460 Commits

Author SHA1 Message Date
Jonathan Nguyen
85a22d00e9 Replace class with empty string for AppUsageEventOccurred Atom
Bug: 196052707
Test: atest CtsStatsdAtomHostTestCases:UidAtomTests#testAppForegroundBackground
Change-Id: Ib916c6698024070000975031c0ba401f7b41ad4c
2021-08-19 15:00:11 -07:00
TreeHugger Robot
3624ed78fd Merge "Enforce permissions check in getLastTimeAnyComponentUsed" into sc-dev am: dbdd7012bc am: 29f69e43bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15084728

Change-Id: Ib176042519dd83be639f7fb5ee87c83297123c0f
2021-06-24 06:51:19 +00:00
Zhen Zhang
bdac90593f Enforce permissions check in getLastTimeAnyComponentUsed
Enforce the permission check for both INTERACT_ACROSS_USERS and
PACKAGE_USAGE_STATS permissions.

Bug: 191382775
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Change-Id: I1371070478306005b2b4a59a1bc794bc368ae0c4
2021-06-23 16:34:50 -07:00
Alexander Dorokhine
91ff2270dc Merge "Unhide the storage attribution API with system visibility." into sc-dev am: 48df6c6055
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14414648

Change-Id: I996a30abfa6a51d5e732e1a8849af3fae532578a
2021-05-11 18:11:01 +00:00
Alexander Dorokhine
610afe52c4 Unhide the storage attribution API with system visibility.
Bug: 179160886
Test: StorageStatsManagerLocalTest
Change-Id: I3a8994e215baff123df65d89d2d71b9e12de2af5
2021-05-10 15:59:31 -07:00
TreeHugger Robot
970d36e647 Merge "Handle STOPPED to PAUSED Usage events" into sc-dev am: 80bd76c77a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14256468

Change-Id: I67a56cded5421384f5abb83f9f50825a7c58ff32
2021-04-29 23:02:47 +00:00
TreeHugger Robot
80bd76c77a Merge "Handle STOPPED to PAUSED Usage events" into sc-dev 2021-04-29 23:02:08 +00:00
Varun Shah
e106890957 Merge "Use direct-callback alarms in AppTimeLimitController." into sc-dev am: 3cb4aa35a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140806

Change-Id: I0e59aff3ced22cc4367ac9709cc32a8da911ec95
2021-04-22 19:37:55 +00:00
Varun Shah
3288a170f7 Use direct-callback alarms in AppTimeLimitController.
Update SessionUsageGroups to use direct-callback alarms.

Bug: 181983817
Test: atest AppTimeLimitControllerTests
Change-Id: I73a755cb9a893952cef33c0d7cc1b2c0bf2a1318
2021-04-21 16:36:04 -07:00
Michael Wachenschwanz
289f167929 Handle STOPPED to PAUSED Usage events
UsageStatsService wrongly assumed a ACTIVITY_PAUSED event must be
preceded by a ACTIVITY_RESUMED event, but there are some scenarios where
it is possibly to go directly from STOPPED to PAUSED.

Fixes: 182007710
Test: manual (start a pip activity, turn off the screen, and turn it
back on. UsageStats logs should not report unexpected events.)
Test: atest android.app.usage.cts.UsageStatsTest

Change-Id: I609ecb574d8401ab597aa61ba7c3b9d1f4e66827
2021-04-20 16:31:15 -07:00
Suprabh Shukla
1698c0705e Merge "Suspend dialog improvememts" into sc-dev am: 9da117df72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14150368

Change-Id: Icda2d764a05d9ec22cf7622a731cd94040e559c0
2021-04-14 00:08:56 +00:00
Suprabh Shukla
9da117df72 Merge "Suspend dialog improvememts" into sc-dev 2021-04-13 23:57:38 +00:00
TreeHugger Robot
4eab6ca7cf Merge "Use elapsed-time in AppTimeLimitController." into sc-dev am: 1ddf97e511
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14144546

Change-Id: I6c789b38875363e7accbefe013e0ff850036e816
2021-04-13 19:27:45 +00:00
Suprabh Shukla
346118543b Suspend dialog improvememts
Finishing the suspend dialog when the package for which it was shown
gets unsuspended for any reason.

Also, attributing any interaction with this dialog to the suspending
package, as the system is showing the dialog on its behalf.

Test: Manual, from an unrooted shell:
adb shell pm suspend com.android.chrome
Tap to start chrome and wait for the dialog to appear. Then:
adb shell pm unsuspend com.android.chrome
The dialog should disappear. Further,
adb shell dumpsys usagestats
should show USER_INTERACTION for com.android.shell.

Bug: 169137795
Fixes: 180336589
Change-Id: I70b6f23e2994d8802335e35932ed09209754697c
2021-04-12 19:10:31 -07:00
Varun Shah
911ef52179 Use elapsed-time in AppTimeLimitController.
Bug: 181983817
Test: atest AppTimeLimitControllerTests
Change-Id: Ia0f20475ebd54039a1a4fd3206d730a8d5649765
2021-04-09 14:46:43 -07:00
Zhen Zhang
03c15bed9d Merge "Persist user-agnostic lastTimeAnyComponentUsed in disk" into sc-dev am: bf5667bec6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13980062

Change-Id: If340d748111b71b4c45e4e401d6c18e1fd1af2f7
2021-03-31 23:01:22 +00:00
Zhen Zhang
131f53fdf4 Persist user-agnostic lastTimeAnyComponentUsed in disk
Persist the user-agnostic lastTimeAnyComponentUsed usage stats in disk.

Bug: 183462940
Test: atest UsageStatsServiceTest
Test: atest UserStatsPersistenceTest
Test: atest CtsUsageStatsTestCases:UsageStatsTest

Change-Id: Ibe946f8e9fd9fa7d9ba546da67a6040c00e0f9ea
2021-03-31 11:27:26 -07:00
Zhen Zhang
e6fe3ee1d5 Merge "Create package-level last time usage stats for app hibernation" into sc-dev am: eed249828f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13933089

Change-Id: I0ba03547e92c28ee32d7938beca4f30b287f807c
2021-03-31 09:20:05 +00:00
Zhen Zhang
b8b107372a Create package-level last time usage stats for app hibernation
Create a user-agnostic package-level last time used usage stats for app
hibernation. Usage is updated when USER_INTERACTION or
APP_COMPONENT_USED event reported. Also moved checkAndGetTimeLocked and
convertToSystemTimeLocked methods up to UsageStatsService class and
refactored usages.

Bug: 183142974
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest UsageStatsServiceTest
Test: atest UserUsageStatsServiceTest

Change-Id: I93d8653bb92b98af8f6b57156eb1139fbd7e562a
2021-03-30 16:16:08 -07:00
Zhen Zhang
bb4922a46d Merge "Create component used metrics in UsageStats" into sc-dev am: abb8a88e85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13819021

Change-Id: I7534778ed762b81e80b7fd90dd50bf2c225258c9
2021-03-16 06:08:17 +00:00
Zhen Zhang
23f7206dbc Create component used metrics in UsageStats
Created a new metrics called mLastTimeComponentUsed in UsageStats.
It is persisted and loaded as other metrics.

Bug: 175829712
Test: core/tests/coretests/src/android/app/usage/UsageStatsTest
Test: cts/UsageStatsTest
Test: UsageStatsDatabaseTest
Test: UsageStatsServiceTest
Test: UsageStatsPersistenceTest
Change-Id: I10cf5c40cf5955246a6a04e96ac0352b4ed29acd
2021-03-15 14:24:08 -07:00
Mady Mellor
61edf3a56b Merge changes from topic "mm_setSuppress" into sc-dev am: e15c6dd81a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13609283

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52864a9ceecad3703c221d78bb24bdf6ed6fc517
2021-03-08 21:56:46 +00:00
Mady Mellor
e15c6dd81a Merge changes from topic "mm_setSuppress" into sc-dev
* changes:
  SysUI changes for setSuppressBubble
  Track locusId visibility in ShellTaskOrganizer
  Add locus id to ActivityRecord / TaskInfo
  Bubble API: suppress bubble
2021-03-08 21:27:36 +00:00
Mady Mellor
c9871c4de9 SysUI changes for setSuppressBubble
1) We need a way to listen for locusId, this is done via
   a new listener on ShellTaskOrganizer that is informed
   for all task info changes.
2) When locusId for focused activity changes, check for
   a bubble in data that has a matching locusId & has
   API set
3) Add suppress/unsuppress in the state change flow and
   update the views

TODO in later CL:
- animate the view being hidden / shown; handle flyout

Test: atest ShellTaskOrganizerTests BubbleDataTest BubbleXmlHelperTest (also CTS CL)
Bug: 170267239
Change-Id: I5c9bd15fa8b5b326e146efdc40916454ca1c73f6
2021-03-05 11:28:01 -08:00
Rajeev Kumar
0d18624078 Merge changes I0bd9becd,I1f2967dc into sc-dev am: 2c293a43a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13604966

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I626d62a5775a0d69fed5fab99b5986f2a5f28037
2021-03-04 04:45:21 +00:00
Kevin Han
157db238a6 Add new component usage event (1/2)
Add a new usage event to UsageStats when a component in a package is
used (content provider binding, explicit broadcast, activity resume)
and it is considered to be important usage.

The follow-up CL will handle the service binding case as it is a little
complicated due to job bindings.

Bug: 175829712
Test: adb shell dumpsys usagestats <package-name>
Test: atest UserUsageStatsServiceTest
Change-Id: I1f2967dcf5999a8f0affea94bce4c0873a04e022
2021-03-03 17:15:23 -08:00
Rupert Lane
cfd021a5ee Merge "Rename Build.IS_CONTAINER to IS_ARC" 2021-02-26 00:16:28 +00:00
Rupert Lane
45ad354f50 Rename Build.IS_CONTAINER to IS_ARC
As ARC is moving from a container to a VM based solution, change the
build method to detect this.

Bug: 139490365
Test: Check that VM works after pushing to device: run play store,
install app.

Change-Id: Ic91a7e5c9a36242d2c905cecffeec72acba8ff45
(cherry picked from commit 2f78de6d0e1428d959f97ea0dd0e3c9c28b6e3fb)
2021-02-25 02:32:43 +00:00
Amith Yamasani
51fbb49435 Merge "Make UsageStats query API UserHandle-aware" into sc-dev 2021-02-09 19:19:06 +00:00
Amith Yamasani
d4de97915b Make UsageStats query API UserHandle-aware
Allow queryUsageStats to take in the context's userId. This
allows apps like Settings to query usage stats across
profiles.

Bug: 146921442
Test: atest CtsUsageStatsTestCases:UsageStatsTests
Change-Id: Ia6c90c1a31887efa8d5446c1b1b11e75cb9ab83e
2021-02-07 21:45:43 -08:00
Tim Murray
abffa29b65 UsageStatsService: rewrite locking to avoid contention post-unlock
Various ActivityManager actions require calls to
UsageStatsService.reportEventOrAddToQueue(), but that function can
block for hundreds of milliseconds while UsageStatsService is
initialized during post-unlock. However, the only important part of
reportEventOrAddToQueue is the check to see if a user has been
unlocked, at which point the action is enqueued on a Handler.

Move mUserUnlockedStates to a CopyOnWriteArraySet, which should be
updated very infrequently, and allow the common case of "the user is
unlocked and an event should be added to the queue" to run
concurrently with other UsageStatsService operations.

Test: atest android.app.usage.cts.UsageStatsTest
Test: atest android.app.usage.UsageStatsTest
Test: atest UsageStatsDatabaseTest
Bug: 161866124

Change-Id: I11743d78f20db5e5a9471544ae5a1c0ab492202d
2021-02-01 18:34:20 +00:00
Varun Shah
b47c463107 Merge "Fixed to prevent usagestats file corruption when writing" am: 98fc96fc65 am: acb36aadda am: 9d58180bfa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1550659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idd140356f26f89fa8b182946cde729f2fb0df490
2021-01-30 00:53:53 +00:00
Varun Shah
d89f6bf37a Ensure certain new UsageEvents have a String mapping.
Bug: n/a
Test: m
Change-Id: I7aa9f0fcb7799f36e16351e44db35faeb46aa083
2021-01-22 21:56:37 +00:00
Saumya Pathak
d2486196e6 Adding StorageStats API to get external cache size
Test: atest StorageHostTest and also manually using StorageTestApp
to use the API and display the cache size.

Bug: 175016452
Change-Id: Iff0503c1643ee5fc501037e413aa4b5461ca3388
2021-01-18 13:28:29 +00:00
Varun Shah
8cf09bc2a5 Reduce UsageStats logspam.
When there are parsing errors while deobfuscating usage stats, it can
produce a lot of error logs. Condense and reduce the logging to a
minimal amount.

Also, keep track of the recently removed package tokens and dump them
to help debug these parsing errors.

Bug: 177610601
Test: adb shell dumpsys usagestats mappings 0
Change-Id: I860ee4b24d2ff2df88e536edca81920256257198
2021-01-16 14:32:44 -08:00
Takashi Nagaya
f740b56f0e Fixed to prevent usagestats file corruption when writing
Currently, usagestats file may be currupted when writing
fails. Because AtomicFile#failWrite(fos) is always called
with argument null. Modify argument of this method so that
it is not null when writing fails.

Bug: 177501256
Change-Id: I1bb64a9af7941ab80abe3f98ad5b8ecf6d1b46d6
2021-01-14 20:57:09 +09:00
TreeHugger Robot
027e0e0deb Merge "Handle mismatched task root on Activity resume and stop" 2020-12-14 22:35:00 +00:00
Kweku Adams
f177a8df86 Create a UsageEventListener.
Creating the UsageEventListener to generalize conveying new usage events
so that multiple components can be notified.

Bug: 142281756
Bug: 171305774
Test: atest AppIdleHostTest
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest FrameworksMockingServicesTests:UsageStatsServiceTest
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: I176c476257600f0f4299a10f02b5c61332007b1c
2020-11-23 10:56:43 -08:00
Michael Wachenschwanz
fd912c0623 Handle mismatched task root on Activity resume and stop
It is possible for UsageStats to recieve activity resume and stop events
for the same activity, that have different task roots. Change UsageStats
to report usage start/stop to AppTimeLimitController using only the
package name on Activity pause.

Fixes: 169970833
Test: atest android.app.usage.cts.UsageStatsTest
Change-Id: Ie0ff4a18bf2001f72f637cc1687b7bd0a5afa85e
2020-11-06 19:01:13 -08:00
Eran Messeri
4634589e41 Refactoring: Use explicit methods for checking DO/PO
Do not use USES_POLICY_PROFILE_OWNER / USES_POLICY_DEVICE_OWNER.
Instead, use explicit methods for checking if the caller is
the Device Owner or Profile Owner.

USES_POLICY_PROFILE_OWNER is confusing since internally in the
DevicePolicyManagerService, it implied a Device Owner is also a
Profile Owner, which is not always what the caller expected.

This is the first phase of the refactoring, removing external calles'
dependency on these constants. The next phase will remove them
internally completely in favour of an implementation that
accesses mOwners directly.

There are no functional changes in this CL.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I57c8465d190a3b4b130d57fd622cc93eaeb9c717
2020-10-06 10:34:23 +01:00
TreeHugger Robot
e7c003f511 Merge "Handle Activity Resume to Stop case for AppUsage logging" into rvc-qpr-dev am: 1c38963be0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12663453

Change-Id: I64541b44d167f241c54c0147b4a5a86feba76ba7
2020-09-26 00:05:42 +00:00
Michael Wachenschwanz
138ee976e7 Handle Activity Resume to Stop case for AppUsage logging
Bug: 159165822
Test: atest UidAtomTests
Test: atest android.app.usage.cts.UsageStatsTest
Change-Id: I11cb12d248dd7fe2fb1a97af8cf30d6988a7697b
2020-09-22 23:39:32 +00:00
Bill Rassieur
02664711e9 Revert "Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b338052..."
Revert "Snap for 6792834 from 5b681187dce32555f398c1b823b82be3a4..."

Revert "Snap for 6792834 from ff268453a3067874ebba3646e8e9fdbc04..."

Revert "Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328de6e34..."

Revert "Snap for 6792834 from 38626f86b924625d27d752950ce04045e6..."

Revert "Snap for 6792834 from a2cb05379b86f00033bd19912e1d6031f6..."

Revert "Snap for 6792834 from f1e69b45bde30a055d37260012df8e951b..."

Revert "Snap for 6792834 from 9215e252c9daaad53a18582afe5478eb6c..."

Revert "Snap for 6792834 from c9d246d88c86368fddcaa9f58d6eec740f..."

Revert "Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1f42331..."

Revert "Snap for 6792834 from d6d5105b22925ff168be784af9fb044fdd..."

Revert "Snap for 6792834 from e8dc6bf8735df45be9eb7867921243d83d..."

Revert "Snap for 6792834 from de2e193ad770855a0cdc7b96d91a13929b..."

Revert "Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8857dc7..."

Revert "Snap for 6792834 from 1529174442dc31e0036c58fba7a90184ee..."

Revert "Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d953019..."

Revert "Snap for 6792834 from 1a8f386df1be8e4692c00dda348f4addfb..."

Revert "Snap for 6792834 from d5d749da0ba5e53684535fae5eb76c085f..."

Revert "Snap for 6792834 from bc7dc6f5c75789d25879762854a071bd1b..."

Revert "Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df331300..."

Revert "Snap for 6792834 from bdbd076341f75ed0416f4cda0a98fc6f54..."

Revert "Snap for 6792834 from 201eaa68fcc0781df6f7713901fd5a0862..."

Revert "Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d5db563..."

Revert "Snap for 6792834 from 82eecc9b3c895d356fca70f4b8def94600..."

Revert "Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d33be247..."

Revert "Snap for 6792834 from 4b73f247850059a4312525662991d73359..."

Revert submission 12462888-release-request-aa3875fd-ef4c-4f66-9a1c-b0b05058d091-for-git_main-busytown-release-6792834

Reason for revert: Bad snap due to branch misconfig.

Reverted Changes:
I950c3960b:Snap for 6792834 from de2e193ad770855a0cdc7b96d91a...
Ie6452b91a:Snap for 6792834 from c9d246d88c86368fddcaa9f58d6e...
I6b98cb766:Snap for 6792834 from 7fcd3459496d859d2d03dcd23d9d...
Ie5e19aaef:Snap for 6792834 from edbf3411d2c91f38a1a5d93b9e5b...
I35385da96:Snap for 6792834 from 4b73f247850059a4312525662991...
I1a59949e5:Snap for 6792834 from d5031fd6172a4ee4a774ca7ad3df...
I2c40ffbc2:Snap for 6792834 from f0ebc39aedd8f83938f5053e87b1...
I24c147f50:Snap for 6792834 from ff268453a3067874ebba3646e8e9...
Iabb2fe4c1:Snap for 6792834 from 5e0116a4a17307df9c303b1ea4f8...
I92bfbb5d5:Snap for 6792834 from 0ad493cce4f8f187dc37671b45d5...
I2e92b2d5d:Snap for 6792834 from f1e69b45bde30a055d37260012df...
I0fdb356fa:Snap for 6792834 from a2cb05379b86f00033bd19912e1d...
I9b19f9bdc:Snap for 6792834 from 95c6fcdbcd91cf6e409f8e50f8d3...
Ie88e387a6:Snap for 6792834 from 9215e252c9daaad53a18582afe54...
Idc1ae35dd:Snap for 6792834 from 201eaa68fcc0781df6f7713901fd...
Ib16deadd9:Snap for 6792834 from 1a8f386df1be8e4692c00dda348f...
I744f889d3:Snap for 6792834 from d5d749da0ba5e53684535fae5eb7...
Ib6e060e44:Snap for 6792834 from bdbd076341f75ed0416f4cda0a98...
Iab587ff78:Snap for 6792834 from e8dc6bf8735df45be9eb78679212...
Ia1f4ef82f:Snap for 6792834 from 14f7794f2150fc246f5c5003dc4d...
Ief930c2b5:Snap for 6792834 from 5b681187dce32555f398c1b823b8...
Ia71445b6a:Snap for 6792834 from 38626f86b924625d27d752950ce0...
Ia95c82cfc:Snap for 6792834 from 1529174442dc31e0036c58fba7a9...
If1e1b5e35:Snap for 6792834 from bc7dc6f5c75789d25879762854a0...
I98959e228:Snap for 6792834 from 1e7f83c953b7571dceabd5d7f6a2...
I321c4cb8b:Snap for 6792834 from d6d5105b22925ff168be784af9fb...
I3ed2d46ee:Snap for 6792834 from 035f3eaa19b160a5f89cf5ba1328...
Id4a7f102c:Snap for 6792834 from 82eecc9b3c895d356fca70f4b8de...

Change-Id: I4b944b89f3c581fbd67f5952d9ec413d02756abc
2020-08-27 02:20:22 +00:00
Jackal Guo
1d4d446109 Merge "Rename pmInternal#getPackageUidInternal (2/4)" 2020-08-21 04:51:31 +00:00
Jackal Guo
816efd1cc0 Rename pmInternal#getPackageUidInternal (2/4)
This method was added to operate as an internal variant of the
public getPackageUid method since pmInternal#getPackageUid already
exist. However, pmInternal#getPackageUid method just called to the
public interface, and enforcing permissions and visibility checks.

Since we don't expect any UID/permission checks in a local service,
any callers to this method requiring permission checks should be
migrated onto the PackageManager public method. Remove the original
pmInternal#getPackageUid and rename #getPackageUidInternal to take
its place.

Bug: 148235092
Test: Build pass and boot
Change-Id: Iebf51ab7f35710dea2b9c34c64138277c44cf30a
2020-08-18 14:15:43 +08:00
Felipe Leme
7a907dbe46 Refactored user switch workflow to decouple UserInfo from TargetUser.
UserController calls SystemServiceManager on some stages of the user
switch lifecycle, and SystemServiceManager calls the respective
callbacks in the SystemService objects it manage.

Prior to Android 11, these callbacks would take a @UserIdInt userid,
but now they take a TargetUser (which in turns contains a Userinfo).
So, currently, UserController calls SystemServiceManager passing the
userid, and SystemServiceManager gets the UserInfo from
UserManagerService. That works fine most of the time, but there might
be some race conditions when a user is removed that can crash the
system when such user is stopped (because UserManagerService doesn't
have its UserInfo anymore).

This CL fixes this issue by refactoring the user switch workflow so:

- TargetUser doesn't hold a reference to the UserInfo anymore, but
  offer the methods needed by SystemService implementations.
- SystemServiceManager keeps track of the TargetUser objects used in
  the callbacks.

Test: manual verification

Fixes: 159831354

Change-Id: If68ab1b5e247c7389c8cac16432d8b8809507e86
2020-08-13 16:56:34 -07:00
Varun Shah
1c691f5bd2 Don't create unnecessary objects.
Only create a new LinkedList if one doesn't exist already for the user.

Bug: n/a
Test: atest UsageStatsTest
2020-08-06 22:22:25 +00:00
Felipe Leme
46a0354076 Merge "Removed @Deprecated SystemService callback methods that take a userId." 2020-08-03 15:23:25 +00:00
Felipe Leme
837f8c1e8a Removed @Deprecated SystemService callback methods that take a userId.
This is just a plain refactoring: the removed methods in the changed
classes were called by default by the new methods in the superclass
(SystemService).

Test: m
Test: atest NotificationManagerServiceTest BackupManagerServiceRoboTest

Fixes: 161943081

Exempt-From-Owner-Approval: refactoring without side-effects

Change-Id: Ifd8df592eb4494cc0922b7e0b2ff20187b8a8b3e
2020-08-03 07:24:26 +00:00
Treehugger Robot
1268ff29c8 Merge "Update language to comply with Android's inclusive language guidance" am: 0521eb758a am: 8d384c548c am: 12b1eaba8f am: eeac3d7223 am: a722891f7d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384138

Change-Id: Ice2736fb026b24279868d25d296640404ad4a6d5
2020-08-01 01:33:40 +00:00