Mirrors the design of TimeUnit and ChronoUnit which many developers
are already familiar with, making it easy to pick up and use.
Yes, this is an enum.
Bug: 70915728
Test: bit FrameworksCoreTests:android.util.DataUnitTest
Change-Id: Id0cfdac5c81ed89c3c9ece23c964acba4a4f8471
In general, using Mutable inside of structures
or as API arguments is a code smell. However, it
is the most syntactically clean way of fetching
something out of a lambda or inner class.
Using this, one can do:
Mutable<Result> res = new Mutable<>();
hidlObject.foo((...) -> {
res.value = ...;
});
There is an alternative:
Result a[] = new Result[1];
hidlObject.foo((...) -> {
a[0] = ...;
});
However, this alternative syntax is relatively messy.
Bug: N/A
Test: boot, use w/ wifi
Change-Id: Ibff13c653cc17bd25ddbb0534ba21ef485bff7aa
We've finished all the underlying work to support adoptable storage
on FBE devices, so remove the code that was disabling it by default.
Introduce feature flag to make it easier to detect devices that
support adoptable storage.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 29923055, 25861755, 33252673, 37289651
Change-Id: I3630d690c9e66c7e41e316a4263ea2eb1e752ad3
Two changes:
1. Verify caller package matches with calling UID before checking
is it default launcher.
2. If IntentSender is specified, only caller with MANAGED_USERS
can call through it.
Test: run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.QuietModeHostsideTest
Bug: 70212757
Change-Id: Iac118d988eb05097a56f343552c0b8845cf96749
2/ Handle Subscription for alert.
3/ Support no_report_metric
Bug: 69522276
Test: all statsd unit tests passed.
Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
In current implementations the WiFi MC statistcs are calculating by
aggregating the per uid statistics accross all UIDs. This does not
result in the correct values in case of time overlapping acquisitions of
MC wakelocks by same or different UIDs
This commit creates a separate Timer instance that tracks the actual
time spent with MC Enabled.
Bug: 69854369
Test: Manual Test
Change-Id: I78533f48300bc9faccc374d684698dae647bde5d
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
To help investigate potential BinderProxy leaks, attempt to log a
histogram of BinderProxy descriptors to the logcat before asserting.
Bug: 71353150
Test: m
Change-Id: I47313814160678369b15e7dc5851d8096c286b9d
We define it as the UID that initiated the work, and not the UID
performing the work.
Test: WorkSourceTest.
Bug: 62390666
Change-Id: I1583e3f24b492e3f11a1281215c066fedf489b5f
Settings application shows internal storage size using API getTotalBytes in StorageStatsManager.
This API calls getPrimaryStorageSize() in StorageManager.
getPrimaryStorageSize() returns /data parition size calculated API roundStorageSize() in FileUtils.
Using this API, total primary storage size returns 8GB if 16GB emmc size device has /data partition size below 8GB.
So we should modify getting of primary storage size close to real emmc size.
getPrimaryStorageSize() will be calculated sum of /data and /system partition size.
Test: Check primary storage size in Settings application
Change-Id: I3ad33534b1c55d09afbb0e9be1c408c02c442842
Signed-off-by: hj.seo <hj.seo@lge.com>
Log WorkChains associated with a given WorkSource to statsd whenever
a wakelock is acquired / released or changes.
Test: WorkSourceTest, manual.
Bug: 62390666
Change-Id: I1720ba8b1778d38067398caac7cf92c4d375f816
Together with checking isObservableEventType this will result in a11y events
not being generated for packages that are excluded form a11y-service(s)
package whitelist
Test: cts-tradefed run singleCommand cts -d --module CtsAccessibilityServiceTestCases
Change-Id: Id65607aaccc7af7d870d009d609917ff3c6d0712
WorkSource objects now hold references to zero or more WorkChain
objects, each of which represent a "chain" of attribution.
This change also changes most WorkSource APIs to be able to
deal with WorkChains. Several APIs do not necessarily make sense with
WorkChains and have been left unmodified :
- boolean diff(WorkSource): Does not account for WorkChains for now.
This is a public API so we shouln't change it unless we decide to
make WorkChains public.
- setReturningDiffs(WorkSource): Used internally only, will be removed
in a future change.
- addReturningNewbs(WorkSource): Used for testing only, fill be removed
in a future change.
In addition, two new (hidden) APIs have been added to add and query
WorkChains. These APIs have only been added to facilitate testing. They
will most likely change when we add non-test users.
Co-Authored-By: Yang Lu <yanglu@google.com>
Test: WorkSourceTest
Bug: 62390666
Change-Id: Iff361eb98e079c7b2146c092dc27a3618a813c94
Test: Quick Settings -> Toggle work mode
Test: Settings -> Work profile settings -> Toggle work mode
Test: Turn off work mode -> Settings -> Turn on work mode in the suggestion
Test: Turn on work mode through tapping on work app
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.QuietModeHostsideTest
BUG: 70212757
Change-Id: I335c3ab2306a3eb794cd35a3a7b0d184dc31f85e
BatteryStatsImpl will track this data by reading from
/proc/uid/<uid>/time_in_state whenever process state changes
and will include this data as part of batterystats dump.
Bug: 66953194
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: atest hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
Change-Id: Ibb3e07f518aaf7eea2a00bb95b95dc5f7e09552e
When an app is on the top of the activity stack but the screen
is not on, this doesn't really count as a top app in the normal
sense. In particular, we'd really like to apply the normal
restrictions we have on background and cached apps: no network
access, no ability to use wake locks, etc. (In other words, in
this state the app's activity is stopped, so from its perspective
it is no different than the user leaving it to go to another app.)
To do this, we change the order of the TOP_SLEEPING proc state
out from the range of foreground states down to between the
cached and background states.
Test: ActivityManagerProcessStateTest
Bug: 70808931
Change-Id: I994caba8c27553a452de75efa358be0e683d046f
listen to android.intent.action.DROPBOX_ENTRY_ADDED and look up
incident tag then upload the report.
Bug: 69860192
Test: N/A
Change-Id: I7f60ad631e8b3243e209aba9408f18bf0bfd4750