Commit Graph

435 Commits

Author SHA1 Message Date
Jeff Sharkey
d23b5379c0 Enable Error Prone to detect obscure bugs.
We've been writing many new framework-specific Error Prone checkers
to help detect obscure platform bugs, and this change starts enabling
those checkers for more packages across the platform.

Bug: 155703208
Test: manual
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: I1db3412b0be40f6f78c68331ae01756887192071
2020-10-23 16:55:30 -06: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
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
Treehugger Robot
12b1eaba8f Merge "Update language to comply with Android's inclusive language guidance" am: 0521eb758a am: 8d384c548c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384138

Change-Id: I706670b4342df343b0a4ec49260b3601d37aa95e
2020-08-01 00:01:23 +00:00
Michael Wachenschwanz
134766b33f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

  #inclusivefixit

Bug: 162536543
Change-Id: I478e3aca39be71f6e2df339a7b9702b2a76c9d29
2020-07-31 21:11:45 +00:00
Kweku Adams
2c75eb86a1 Moving AppStandbyController to the module background thread.
Move AppStandbyController's handler to use the JS mainline module's
background thread looper to decouple it from the rest of the system and
from BackgroundThread.

Bug: 160873128
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTes
Change-Id: Ic64ccf6b4437060cb4ea83b1c5c6053421081ef8
2020-07-13 11:56:44 -07:00
Michael Wachenschwanz
793da64d37 Move AppStandbyController calls out of UsageStats lock
Move reportEvent, flushToDisk, and dumping out of the UsageStats lock.

Fixes: 158361735
Test: atest com.android.server.usage.AppStandbyControllerTests
Test: atest android.app.usage.UsageStatsTest
Test: manual ("adb shell dumpsys usagestats", with multiple users)
Change-Id: I9f5c2adcb3ef71e82b969b35e7129e715fbfa00d
2020-06-19 10:44:49 -07:00
Michael Wachenschwanz
709758d448 Small Fix to App Usage logging
Relocated MOVE_TO_FOREGROUND so that it will get logged for  Activity
Paused to Activity Resumed transitions.
Also moved some calls into PackageManager outside of the UsageStats lock

Bug: 159165822
Test: builds and flashes
Change-Id: I8e9e96ae1fc3b77535514df2422ce3b7935d850f
2020-06-17 16:05:53 -07:00
Jonathan Nguyen
0a1a911a5e Merge "Add app usage logging for statsd" into rvc-dev 2020-05-14 17:35:28 +00:00
TreeHugger Robot
3931dd2013 Merge "Delay updating of usage stats package mappings." into rvc-dev 2020-05-12 20:56:14 +00:00
Varun Shah
a7f9c762cb Delay updating of usage stats package mappings.
Do not update package mappings for the system user when the user is
first unlocked. Instead, schedule a job to be executed after 24 to 48
hours from when the system user is unlocked. This makes the service
initialization phase for the system user a little quicker since their
data is not likely to be stale. Additionally, this also ensures that
restored data is not pruned by mistake if there is a device restart
before restore is completed. The updating of the mappings occurs
normally for other users, on user service initialization.

Bug: 155209652
Test: manually ensure job is skipped for system user
Test: atest android.app.usage.cts.UsageStatsTest
Change-Id: I2c03a1a05246d6b454569c4569813e90bede3693
2020-05-12 16:45:58 +00:00
TreeHugger Robot
0a78a5ad9d Merge "Fix DPM check logic for AppUsageLimitObserver (un)registering" into rvc-dev 2020-05-12 05:26:36 +00:00
Michael Wachenschwanz
cfe8c66a7a Fix DPM check logic for AppUsageLimitObserver (un)registering
In the case that the DevicePolicyManagerInternal Local service does not
exist on device, the permission check for
(un)registerAppUsageLimitObserver should not be skipped.

Test: atest android.app.usage.cts.UsageStatsTest (must be on a device
with <unavailable-feature name="android.software.device_admin" /> in
it's features xml)
Fixes: 155360727

Change-Id: I8a88e03a7636956d27f531cf989bda1a32799f07
2020-05-11 16:23:43 -07:00
Varun Shah
b1d32ee75a Merge "Persist Locus Id Event to UsageStatsProto." into rvc-dev 2020-05-09 08:58:13 +00:00
Jonathan Nguyen
28f7ecf533 Add app usage logging for statsd
Test: manually tested on local flame
Bug: 156041159
Change-Id: I0513be4524b3ceb1c4840bf7f83048f7c1f55019
2020-05-08 12:30:02 -07:00
Varun Shah
7ce78c23df Persist Locus Id Event to UsageStatsProto.
Currently, we are only using UsageStatsProto for backup and restore
purposes but to ensure it is in sync with UsageStatsProtoV2, adding the
recently added LOCUS_ID event. This enables us to easily fall back to
the earlier proto version if there are issues with V2. This also allows
us to backup all events data if we decide to do that in the future
before updating the B&R restore logic to use V2.

Bug: 155935953
Test: atest UsageStatsDatabaseTest
Change-Id: I792f20a0b44d13f1ed17c4dbebe5555044afa165
2020-05-07 21:34:09 -07:00
Varun Shah
75aeabdd8a Merge "Persist UsageStats before backup." into rvc-dev 2020-05-07 20:58:40 +00:00
Varun Shah
fb7b3208df Persist UsageStats before backup.
This fixes a bug where in-memory usage stats were not being backed up,
potentially causing a loss of up to 20 minutes of data when restoring.

Fixes: 155930164
Test: atest UsageStatsDatabaseTest
Test: atest android.app.usage.cts.UsageStatsTest
Change-Id: I454f64e7de3f7a6046c408859998a3e51d5d338d
2020-05-07 03:38:39 +00:00
Jeff Sharkey
559130df3f Merge "Add custom Error Prone check for SDK comparisons." into rvc-dev 2020-05-04 23:10:06 +00:00
Jeff Sharkey
4d1d7b56cd Add custom Error Prone check for SDK comparisons.
Over the years we've had several obscure bugs related to how SDK level
comparisons are performed, specifically during the window of time
where we've started distributing the "frankenbuild" to developers.

Consider the case where a framework developer shipping release "R"
wants to only grant a specific behavior to modern apps; they could
write this in two different ways:

1. if (targetSdkVersion > Build.VERSION_CODES.Q) {
2. if (targetSdkVersion >= Build.VERSION_CODES.R) {

The safer of these two options is (2), which will ensure that
developers only get the behavior when *both* the app and the
platform concur on the specific SDK level having shipped.

Consider the breakage that would happen with option (1) if we
started shipping APKs that are based on the final R SDK, but are
then installed on earlier preview releases which still consider R
to be CUR_DEVELOPMENT; they'd risk crashing due to behaviors that
were never part of the official R SDK.

Bug: 64412239
Test: ./build/soong/soong_ui.bash --make-mode services RUN_ERROR_PRONE=true
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: Ia20181f8602451ac9a719ea488d148e160708592
2020-05-04 23:09:48 +00:00
Varun Shah
b44e22c8d9 Update how UsageStats timestamps are written to disk.
When writing UsageStats timestamps to disk in proto, we offset the time
by the begin time to save storage space. However, there was logic which
reset default timestamp values of 0 to begin time for those stats.

This CL standardizes how timestamps are written to disk in proto for
UsageStats and updates the parsers. Since backup and restore use
database version 4, UsageStatsProto is also updated in addition to
UsageStatsProtoV2.

Bug: 155149300
Test: atest UsageStatsDatabaseTest
Test: atest android.app.usage.cts.UsageStatsTest
Change-Id: I624e4d56c91762b56eb1c3be67cd8df033fcac95
2020-05-01 11:08:20 -07:00
Michael Wachenschwanz
dcc388ab44 Merge "Add permission check to UsageStatsManager#isAppInactive" into rvc-dev 2020-04-20 15:15:35 +00:00
Michael Wachenschwanz
d2b132fac4 Add permission check to UsageStatsManager#isAppInactive
UsageStatsManager#isAppInactive provides usage information that is
usually gated by the PACKAGE_USAGE_STATS permission in similar API.
This updates isAppInactive to also check for the PACKAGE_USAGE_STATS
permission.

Test: atest android.app.usage.cts android.app.usage.cts.UsageStatsTest#testIsAppInactive
Fixes: 148991455

Change-Id: I8ff8eb5d2e887bc164095f38d374e3992808fe79
2020-04-06 16:02:33 -07:00
TreeHugger Robot
35afbf3271 Merge "Update UsageStatsSerivce#KEEP_LEGACY_DIR." into rvc-dev 2020-03-14 01:32:52 +00:00
Varun Shah
11b34ce0c7 Update UsageStatsDatabase#KEEP_BACKUP_DIR.
Delete the backup usage stats directory on a successful upgrade to v5.
This was kept as true such that a revert to the previous version  would
be possible if needed.

Also indicate that an upgrade was performed such that relevant data is
pruned on dogfood builds.

Bug: 139937606
Test: manual: dir is deleted on migration.
Change-Id: I60285dc812a045bc82dd68a6e7ae87c2d3563adc
2020-03-13 21:51:07 +00:00
Varun Shah
7dbf65f032 Update UsageStatsSerivce#KEEP_LEGACY_DIR.
Delete legacy usage stats directory on a successful migration to CE.
This was kept as true such that a revert to the legacy would be possible
if needed.

Bug: 138323140
Test: manual: dir is deleted on migration.
Change-Id: I727df5d9139bfa1601cd02d979732f0d912bd29d
2020-03-04 23:24:01 +00:00
Sudheer Shanka
77f2a2c3dd Merge "Update BlobStoreMS to augment storage stats with blobs data." 2020-02-21 19:28:09 +00:00
TreeHugger Robot
5025c2ab69 Merge "Disable storage crates functionalities" 2020-02-20 05:00:47 +00:00
Sudheer Shanka
e9232d6d6f Update BlobStoreMS to augment storage stats with blobs data.
- Any pending sessions data is attributed to the apps
  which contributed them.
- Any commited blobs data is attributed to the app which
  has a lease on it. If multiple apps have lease on a blob, don't
  attribute the blob to those apps for now.
- Remove StorageStatsAugmenter.augmentStatsForUser as it
  is not used for anything currently.
- Fix an issue in how we override existing committers and leasees.

Bug: 148694869
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: atest tests/tests/os/src/android/os/storage/cts/StorageStatsManagerTest.java
Test: atest hostsidetests/appsecurity/src/android/appsecurity/cts/StorageHostTest.java
Test: manual
Change-Id: Ia4af0a2549c75db66741f2d1979de95d2d150bc8
2020-02-19 14:45:12 -08:00
Sudheer Shanka
b497dd4045 Allow usagestats for multiple pkgs to be dumped.
+ Skip dumping database summaries when dumping data for specific pkgs.

Bug: 145420790
Test: manual
Change-Id: If4ac1008ffc73ad4b3227c0a407323b43547a6b8
2020-02-18 18:59:59 +00:00
Varun Shah
0cbb6b63ee Obfuscate visibility of notification-related events.
UsageStats will return obfuscated NOTIFICATION_SEEN or
NOTIFICATION_INTERRUPTION events to callers of #queryEvents
and #queryEventsForUser if they don't hold the MANAGE_NOTIFICATIONS
permission.

Additionaly, refactor the query API in UsageStats to take in flags as
defined in UsageEvents to make future obfuscation/visibility parameters
cleaner.

Also, add the MANAGE_NOTIFICATIONS permission to shell for CTS test.

Bug: 144724524
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest com.android.server.people.data.UsageStatsQueryHelperTest
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerUsageTest
Change-Id: I118de7e589ac8dd5924d3740c70903fa484b79b5
2020-02-13 12:01:13 -08:00
Yuliya Kamatkova
4d5b0be481 Merge "Restrict visibility of LOCUS_ID_SET events." 2020-02-13 01:05:09 +00:00
Yuliya Kamatkova
fea62a512b Restrict visibility of LOCUS_ID_SET events.
UsageStats will not return LOCUS_ID_SET events to callers
of #queryEvents and #queryEventsForUser if they don't have visibility.

Bug: 148821246
Test: manual, atest tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest
Change-Id: Ic904a97e66775ef63bc8b84e67e8f430b2a4121b
2020-02-12 11:20:22 -08:00
Felka Chang
1980c9a893 Disable storage crates functionalities
The Storage Crates functionalities is disabled by default. In order to
make the android system more secure, the crate function should throw
exception to tell the caller that the crate function is disabled until
it addes more tests such as benchmark and memory regression tests.

Bug: 148179319
Fixes: 149366046
Test: atest \
         CtsOsTestCases:android.os.storage.cts.StorageCrateTest \
         CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest \
         CtsOsTestCases:android.os.storage.cts.CrateInfoTest
Test: adb root ;\
      adb shell setprop fw.storage_crates 1 ;\
      atest \
        CtsOsTestCases:android.os.storage.cts.StorageCrateTest \
        CtsOsTestCases:android.os.storage.cts.StorageStatsManagerTest \
        CtsOsTestCases:android.os.storage.cts.CrateInfoTest
Change-Id: I7bfbdcbde5a90ecad7ef690a9d9a62e5ed0ad5eb
2020-02-12 17:15:26 +08:00
Varun Shah
96000b20cd Fix UsageStats dump NPEs.
Update the dump method to handle locked users properly.

Fixes: 149019903
Test: manual (adb shell dumpsys usagestats)
Change-Id: I86e7cfe01bb485f2125c84e6f1013e20b5ac9ba4
2020-02-11 11:22:56 -08:00
Danning Chen
001eb8f4d9 Update the method signature for queryEventsForUser()
Change-Id: I9ed16e6164493915dba48366249c61dc49214e5a
Test: atest com.android.server.people.data.DataManagerTest
Bug: 148627336
2020-01-31 09:40:30 -08:00
Varun Shah
01f6f26b54 Restrict visibility of SHORTCUT_INVOCATION events.
UsageStats will not return SHORTCUT_INVOCATION events to callers
of #queryEvents and #queryEventsForUser if they don't have visibility,
as defined by ShortcutService#hasShortcutHostPermission.

Also, add ACCESS_SHORTCUT permission to shell for CTS test and add the
ShortcutManagerUsageTest to postsubmit.

Bug: 145549490
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerUsageTest
Change-Id: I2a69f061c35c31035a5d0381ab2f42029ec4fffc
2020-01-29 11:28:22 -08:00
Yuliya Kamatkova
56f7c7f37c Merge "Add Activity#setLocusContext API. Plumb LocusID to the System Server. Add locus update event to the Usage Stats. Test: Build and run on a test device with a test app. Bug: 147594233, 147100454" 2020-01-24 21:10:54 +00:00
Yuliya Kamatkova
48c38076ef Add Activity#setLocusContext API. Plumb LocusID to the System Server.
Add locus update event to the Usage Stats.
Test: Build and run on a test device with a test app.
Bug: 147594233, 147100454

Change-Id: I1e058ac87244d47719606d8dcfaea2df4bff43d2
Signed-off-by: Yuliya Kamatkova <yuliyak@google.com>
2020-01-24 11:19:10 -08:00
Sudheer Shanka
31961ce780 Update references of "DONT_DELETE_DATA" to "DELETE_KEEP_DATA".
The flag PackageManager.DONT_DELETE_DATA was renamed to DELETE_KEEP_DATA
long ago in commit 7767eac.

Bug: 28343859
Test: n/a
Change-Id: I9e4079ec394f92a3e293df7b80b627e2b6130827
2020-01-22 20:56:31 -08:00
Sudheer Shanka
e479c958b5 Merge "Add internal APIs for system services to augment storage stats." 2020-01-16 23:15:58 +00:00
Sudheer Shanka
18d3798328 Add internal APIs for system services to augment storage stats.
Bug: 142808097
Test: n/a (tests will be added along with the client impl)
Change-Id: Iba2330d67a29ccfab95ce65daf85312beff5ecf3
2020-01-16 23:12:30 +00:00
Danning Chen
6a5982f300 Add a new method queryEventsForUser() to UsageStatsManagerInternal for People Service to call
Change-Id: I4baf755a3dc1af421ea755ed2f4cfe3440741290
Test: Build and run on a test device
Bug: 146522621
2020-01-14 16:21:57 -08:00