Commit Graph

631 Commits

Author SHA1 Message Date
TreeHugger Robot
881b688f68 Merge "Fix CTS tests" into rvc-dev 2020-02-28 14:50:41 +00:00
Santiago Seifert
51e12d6c29 Fix CTS tests
Broken since behavioral parameters were added.

Test: CTS.
Bug: 150321580
Bug: 147308781
Bug: 149906115
Change-Id: I8629a78e547cba3552bcc73c0dd55b9317611156
2020-02-28 12:54:19 +00:00
TreeHugger Robot
36a845dee4 Merge "Make libstatssocket shared" into rvc-dev 2020-02-28 08:56:00 +00:00
TreeHugger Robot
169a29772c Merge "Create standby bucket changed atom." into rvc-dev 2020-02-28 02:40:46 +00:00
TreeHugger Robot
71796e31de Merge "Mark updatable APEXes" into rvc-dev 2020-02-28 02:05:04 +00:00
TreeHugger Robot
98668696f1 Merge "Add UsageStats CTS tests to AppStandbyController test mapping." into rvc-dev 2020-02-28 01:16:52 +00:00
TreeHugger Robot
3201a3aab3 Merge "Reduce individual quota alarms set." into rvc-dev 2020-02-27 23:58:48 +00:00
TreeHugger Robot
680c708af1 Merge "Add java_api_finder statsd" into rvc-dev 2020-02-27 23:04:17 +00:00
Kweku Adams
1275213242 Create standby bucket changed atom.
We'll use the data from the atom events to further optimize our quotas.

Bug: 135417506
Bug: 143495340
Bug: 149869487
Test: Use statsd_testdrive to test WakeupAlarmOccurred and
AppStandbyBucketChanged are both logged properly

Change-Id: Id05304175dea804d83f6056bf4da2e049496d87d
2020-02-27 13:33:56 -08:00
Tej Singh
eb7d8f4675 Make libstatssocket shared
Also make private versions of the libraries available to link statically
for tests. We should try to figure out a better long term solution.

Test: m
Test: bit statsd_test:*
Test: atest LibStatsPullTests
Test: bit libstatssocket_test:*
Test: atest GtsStatsdHostTestCases
Bug: 149340100

Change-Id: I05b91efab2a657aec75d436575aff4373f86ed3f
2020-02-27 11:38:41 -08:00
Kweku Adams
35d05acc8c Reduce individual quota alarms set.
Switch QuotaController to track all of the pending in quota alarms
internally and only set one alarm for the whole group.

Bug: 150156067
Test: atest CountQuotaTrackerTest
Test: atest CtsJobSchedulerTestCases
Test: atest QuotaControllerTest
Change-Id: Ie415ed0c4f224ac8c37110962009c310e6a6a051
2020-02-27 10:06:50 -08:00
Kweku Adams
c661bbe780 Merge "Fix JobThrottling tests, take 2." into rvc-dev 2020-02-27 15:44:46 +00:00
TreeHugger Robot
4d702dfc29 Merge "Mark RESTRICTED bucket stop reasons." into rvc-dev 2020-02-27 11:31:31 +00:00
Howard Ro
30ab9fe94c Add java_api_finder statsd
java_api_finder will find all the APIs used by statsd which is expected
to help understand all the APIs used by statsd as a part of the mainline
API requirement.

Test: make
Bug: 145566559
Change-Id: Ifa5004837ea01c1b2a3e23594ce4a4b58b5c66d1
2020-02-26 23:34:17 -08:00
Jiyong Park
55daa202ba Merge "stubs inheriting from framework-module-stubs-defaults-* now works" into rvc-dev 2020-02-27 03:23:52 +00:00
TreeHugger Robot
13ecf63ba4 Merge "Add API constraints to ScheduledJobStateChanged atom" into rvc-dev 2020-02-27 02:57:01 +00:00
Jeffrey Huang
cb50e94e7a Merge "Move libstatssocket to shared." into rvc-dev 2020-02-27 01:00:01 +00:00
Jeffrey Huang
21f7e6a3f6 Move libstatssocket to shared.
This fixes the boot loop when zygote tries
to log to statsd during boot time.

Linking libstatssocket statically from two different places
causes translation errors resulting in multiple instances of the
same struct being created. This meant that the struct is no longer
shared across the same process for opening/closing of the socket.

Bug: 149889582
Test: Phone boots
Change-Id: Ibfa25c0fe7874ba08157a5ec43601c5cf8305723
2020-02-26 11:51:26 -08:00
Muhammad Qureshi
0a2c6864e7 Merge "Alternative to @hide FLAG_RECEIVER_INCLUDE_BACKGROUND" into rvc-dev 2020-02-26 17:18:50 +00:00
Evan Severson
3df3b53b8b Merge "Persist the one-time permission flag if set" into rvc-dev 2020-02-26 00:46:50 +00:00
Kweku Adams
338ce0b7ca Mark RESTRICTED bucket stop reasons.
Try to mark when a job is being stopped because it's in the RESTRICTED
bucket. Even though the job's requested constraints may become
unsatisfied around the same time as dynamic constraints, this just
assumes that any unsatisfied dynamic constraints are the reason the job
is being stopped.

Bug: 149873527
Test: Android builds
Change-Id: I7ad8b9930805e02e0dc8ff7b050b4f0590ebe831
2020-02-25 14:50:03 -08:00
Muhammad Qureshi
97670d4492 Alternative to @hide FLAG_RECEIVER_INCLUDE_BACKGROUND
Implementing an alternative to sending broadcast with @hide flag
FLAG_RECEIVER_INCLUDE_BACKGROUND. Instead of using the flag, find the
list of registered broadcast receivers and send them directed broadcasts
to wake them up.

This follows the logic in ag/10055770

Bug: 149090705
Test: m
Test: fastboot flashall
Test: ensure broadcast is received by inspecting logcat
Change-Id: I978cd6481401eb68b26f482e19e412657a0da13c
2020-02-25 14:15:04 -08:00
Santiago Seifert
98127bca05 Make MediaParser match ExoPlayer's sniffing order
Bug: 148940600
Test: CTS.
Change-Id: I7c867f476e1e0b9ef1d7fc9d6779b56b739f5a01
2020-02-25 16:37:10 +00:00
Evan Severson
087b5773f7 Persist the one-time permission flag if set
This flag will now be used to show different ui if the permission has
been previously set as one-time

Test: Reboot and verify ui is consistent
Bug: 144389816
Change-Id: I86fb595b79819a604aaed613d9edf30c883d1440
2020-02-25 15:54:08 +00:00
Jiyong Park
b4f8a85245 stubs inheriting from framework-module-stubs-defaults-* now works
This change fixes a problem that droidstub modules inheriting from
framework-module-stubs-defaults-* don't emit any source code. The
problem was happening because

1) --show-annotation was with incorrect format; it had trailing
"," in the parameter list and
2) the class SystemApi was not available to metalava, which made
prevented it from processing any API annotated with @SystemApi.

Fixing the problem by forcibly adding framework annotations to the
sources of the default modules.

Bug: 1241127
Test: `m ike-stubs` and check its output
Change-Id: Icbbbddb4fb68055f27aa314983a9c556e51f037a
2020-02-25 17:18:38 +09:00
Kweku Adams
87a4cd5b8a Fix JobThrottling tests, take 2.
1. Reset execution quotas between tests so earlier run tests don't
affect later ones.
2. Ensure uidActive overrides even the NEVER bucket. Also log a wtf if
we ever get into this situation.

Bug: 138253466
Bug: 149931359
Test: atest android.jobscheduler.cts.JobThrottlingTest
Change-Id: I1caf92fe8dda3c661ef68ca56c32fcd709e26856
2020-02-24 18:41:47 -08:00
Michael Wachenschwanz
1103ff27a8 Fix exempt vs unexempt scheduled sync standby bucket logic
Fix for bug in AppStandbyController that would treat all scheduled
syncs for user 0 as unexempted syncs and syncs for not user 0 as
exempted syncs, regardless of the actual exemption status.

Fixes: 150016258
Test: atest AppStandbyControllerTests

Change-Id: Ie9e63c2954d0abe2a28469ea95ba6995a5c8696d
(cherry picked from commit 3ffa92f62c)
2020-02-24 20:42:57 +00:00
Kweku Adams
55b588b13b Add UsageStats CTS tests to AppStandbyController test mapping.
Some UsageStats tests directly test AppStandbyController behavior and
other tests are affected by changes in AppStandbyController. Adding the
UsageStats CTS tests to AppStandbyController's pre and post-submit test
suite should help make sure there are no regressions when we make
changes.

Bug: 146453470
Test: cd into directory and run `atest`
Change-Id: If2109a0a49b1a32460fde965288363e20792c7e1
2020-02-24 20:09:43 +00:00
Suprabh Shukla
1b5778d119 Add API constraints to ScheduledJobStateChanged atom
This helps us know if jobs with a particular constraint are being
starved or otherwise dysfunctional due to a bug.

Test: make statsd_testdrive &&
./out/host/linux-x86/bin/statsd_testdrive 8

Sample output:
    atom {
      scheduled_job_state_changed {
        attribution_node {
          uid: 10224
          tag: ""
        }
        job_name: "android.jobscheduler.cts.jobtestapp/.TestJobService"
        state: SCHEDULED
        stop_reason: STOP_REASON_CANCELLED
        standby_bucket: RESTRICTED
        job_id: 691
        has_charging_constraint: true
        has_battery_not_low_constraint: true
        has_storage_not_low_constraint: false
        has_timing_delay_constraint: false
        has_deadline_constraint: true
        has_idle_constraint: true
        has_connectivity_constraint: true
        has_content_trigger_constraint: false
      }

Bug: 138239687
Change-Id: I175e5a0f5cc2cb3be447ccb58142006946092e75
2020-02-24 19:09:46 +00:00
Jiyong Park
8201bdfab0 Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Change-Id: Idb55300a60a261c7bb6359439ed220ff51fcf06c
2020-02-24 21:10:56 +09:00
Anton Hansson
a1fb6f5b1d Remove FrameworksCoreTests dep on framework-all
Make it use framework-statsd directly rather than framework-all.
Note that this is a problem on its own: the problematic tests
should be separated from the monolith tests and moved into the statsd
dir.

Also clamp down on framework-all visibility to avoid anyone else
addinga dependency on this problematic library.

Bug: 149928788
Bug: 149906971
Test: m
Exempt-From-Owner-Approval: clean cp
Change-Id: Ic819b90911220032130c3f8a01b612edd7fa3ecc
Merged-In: Ic819b90911220032130c3f8a01b612edd7fa3ecc
(cherry picked from commit 7c2f73b4ac)
2020-02-22 11:01:41 +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
cd5082de9d Merge "Catch IllegalStateException in StatsManager" 2020-02-21 01:16:39 +00:00
Automerger Merge Worker
459366b0fd Merge "Remove ld.config.txt from sdkext APEX" am: e5301db423 am: c4c8161fc7 am: f9288a19ba
Change-Id: I610879ab3109a6ca7a5289ef336d34189095e3c9
2020-02-21 00:35:20 +00:00
Jeffrey Huang
201c631992 Catch IllegalStateException in StatsManager
StatsManagerService throws IllegalStateException
when statsd is not available. This causes GMSCore to crash.

Bug: 149914783
Test: Manual, verify play store no longer crashes
Change-Id: I45cd679600ccfdb7977ecfd4437b62f56034fed2
2020-02-20 15:23:29 -08:00
Santiago Seifert
141cb3bdb4 Merge "Add behavioral parameters to MediaParser" 2020-02-20 19:08:09 +00:00
Sudheer Shanka
11d8a6ef87 Merge "Update BlobStoreMS to use LongSparseArray.removeIf(Predicate)." 2020-02-20 17:29:07 +00:00
TreeHugger Robot
2e8b3e21fa Merge "Remove redundant/deprecated method." 2020-02-20 15:57:34 +00:00
Santiago Seifert
561ffc3008 Add behavioral parameters to MediaParser
Test: CTS.
Bug: 132153067
Change-Id: Ic1c3fe32382e298fa14d81c7a3b5d1f9271f30ee
2020-02-20 15:17:31 +00:00
Santiago Seifert
946a892a79 Merge "Consolidate API naming to use Parser everywhere" 2020-02-20 10:59:19 +00:00
Howard Ro
7008dbe5e4 Merge "Revert^2 "Migrate Statsd to the apex"" 2020-02-20 08:00:53 +00:00
Kiyoung Kim
11085bb11c Remove ld.config.txt from sdkext APEX
Dynamic linker will use generated linker configuration in general. As
ld.config.txt file in the APEX module will not be used, we can remove
this to avoid confusion.

Bug: 149887007
Test: m -j passed
Test: Boot succeeded from cuttlefish and walleye
Change-Id: I10466863faed3463c69aaec7649f1a5f25b62f17
2020-02-20 16:08:32 +09:00
Sudheer Shanka
4acba54d92 Update BlobStoreMS to use LongSparseArray.removeIf(Predicate).
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/blob/BlobStoreManagerServiceTest.java
Change-Id: I5c8bf7f86cbdb9b3a11608cacee280b323a0027f
2020-02-19 21:47:12 -08:00
Howard Ro
adc510fd78 Revert^2 "Migrate Statsd to the apex"
24bfb40916

Change-Id: I4bda9b6eb759c32b9167ad9d58bdd3d10ff29411
2020-02-20 04:57:00 +00:00
Howard Ro
00306fce6a Merge "Revert "Migrate Statsd to the apex"" 2020-02-20 04:22:02 +00:00
Howard Ro
24bfb40916 Revert "Migrate Statsd to the apex"
Revert "Update statsd binary path for apex"

Revert submission 10356003-statsd_apex

Reason for revert: https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=build_test&lkgb=6221366&fkbb=6221428
Reverted Changes:
Ic84e77269:Update init.rc for statsd setup
I6f3fab4b4:Update statsd binary path for apex
Ib4ea98aed:Migrate Statsd to the apex

Change-Id: I089d5b9bbbdc363e27e79e4addd4eec1e4339c48
2020-02-20 04:19:41 +00:00
TreeHugger Robot
cf85ce242c Merge "Narrowing the set of Media URI exemptions for jobs" 2020-02-20 03:46:33 +00:00
TreeHugger Robot
d71f157eb6 Merge "Add libstatspull and libstatssocket to the apex" 2020-02-20 02:35:47 +00:00
Howard Ro
ff5581d498 Merge "Migrate Statsd to the apex" 2020-02-20 01:53:20 +00:00
Suprabh Shukla
057b8da1a1 Narrowing the set of Media URI exemptions for jobs
Only jobs watching for changes to EXTERNAL_CONTENT_URI for Images and
Vidoes will get exemption for jobs.
MediaScanner will scan and insert an entry under each of these URIs
for respective file types.

Test: atest com.android.server.job.controllers.JobStatusTest

Bug: 148887841
Change-Id: I6f9a07d2c0f06c002929056891187f22a6e87e21
2020-02-19 17:52:25 -08:00