Commit Graph

1040 Commits

Author SHA1 Message Date
Baligh Uddin
7b98fca2f0 Migrate apex/permission to packages/modules/Permission
BUG: 167963264
Test: TH
Merged-In: I31f2b4512164bb043d78d503f4f38accedc49f8d
Change-Id: I2a54a479c9462473d3c9d30da7d336e5a7c72131
2021-05-02 14:02:05 +00:00
Kweku Adams
2a1b3c7408 Merge "Cache network capabilities." into rvc-qpr-dev 2020-11-11 23:56:30 +00:00
Santiago Seifert
46adc9ae96 Only log first input reader length
It's not feasible to reliably differentiate a different
segment parsing from a seek.

Bug: 158742256
Test: atest CtsMediaParserTestCases
Test: atest CtsMediaParserHostTestCases
Change-Id: I7d62f1c2b9334bf601f38ce915b0fafdc76fbec1
Merged-In: I7d62f1c2b9334bf601f38ce915b0fafdc76fbec1
(cherry picked from commit 2eee34d286)
2020-11-09 16:33:08 +00:00
Santiago Seifert
f347c9537c Add MediaMetrics support to MediaParser
Includes:
- Java changes to collect the metrics.
- JNI changes to plumb metrics to the MediaMetrics service.
- statsd atoms.proto changes for data transmission.

Bug: 158742256
Test: atest CtsMediaParserTestCases
Test: atest CtsMediaParserHostTestCases
Test: Manually using dumpsys.
Change-Id: If51ee018da3056231910cd9c18f1b938a5c0e343
Merged-In: If51ee018da3056231910cd9c18f1b938a5c0e343
2020-10-31 11:27:18 +00:00
Kweku Adams
03c773ee52 Cache network capabilities.
Cache network capabilities to reduce the number of calls
ConnectivityController makes to ConnectivityManager.

Bug: 164460449
Bug: 166702583
Test: atest com.android.server.job.controllers.ConnectivityControllerTest
Test: atest CtsJobSchedulerTestCases
Change-Id: I501e5153d7bffd2494aec484c74b9e1b6252aeeb
(cherry picked from commit 6f9ab02900)
2020-10-22 16:05:15 +00:00
Sudheer Shanka
1c50961559 Disable use of RevocableFileDescriptor for blob reads.
We are using RevocableFileDescriptor as a precaution
to make sure when blobs get deleted, apps are not
holding onto those fds and preventing disk space from
getting freed but this might not be much
of a concern since non-system apps cannot be
persistent (so they eventually gets killed) and apps
can already fill up disk space if they want and given
that we are seeing issues with fuse reads, disabling
the use of RevocableFileDescriptor for blob reads.

Bug: 162662834
Test: atest --test-mapping apex/blobstore
Change-Id: I13a504fac154e2a3cacfb37e83a9cfec4ae80b63
2020-09-25 04:42:08 +00:00
Michael Wachenschwanz
0eb48db94c Prevent default wellbeing app from falling below WORKING_SET bucket
Bug: 166301584
Test: atest AppStandbyControllerTests
Change-Id: I5ef67308cabbe43801103e888165d488f4888ab9
(cherry picked from commit 9df9e30727)
2020-09-22 23:38:00 +00:00
Sudheer Shanka
239e5815b4 Postpone updating idle states to after the boot.
Bug: 161712793
Test: atest ./hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: Ic22e1e7bf3356d523a37ca41a234aefc5d738ec5
Merged-In: Ic22e1e7bf3356d523a37ca41a234aefc5d738ec5
(cherry picked from commit 88338ff080)
2020-07-21 20:25:40 +00:00
Sudheer Shanka
67eaf157db Check app idle states and inform listeners on power-save-wl change.
Bug: 161477606
Test: atest ./hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I0bb436f4c45b135c8e9c873c9073ef4a505192f7
2020-07-16 23:48:32 -07:00
TreeHugger Robot
9994c816a8 Merge "Don't count proxied jobs toward scheduling limit." into rvc-dev 2020-07-13 18:06:15 +00:00
Kweku Adams
c6b55f33ac Don't count proxied jobs toward scheduling limit.
1. Some API calls (such as SyncManager calls) can result in multiple job
schedule calls. Given that underlying implementation detail, we don't
count jobs scheduled via proxy towards the source app's schedule limit.
Calls using scheduleAsPackage for itself will still count.
2. Limit the number of times we log that a specific app has exceeded the
limit to once per minute.
3. Update the error message and documentation to help developers
identify what to do when they encounter the issue.

Bug: 160796417
Test: atest JobSchedulerServiceTest
Test: atest JobSchedulingTest
Change-Id: Ia682aa889ec2a26d373d0309e8c0324570f7d816
Merged-In: Ia682aa889ec2a26d373d0309e8c0324570f7d816
2020-07-10 23:58:27 +00:00
Anton Hansson
d346b43c1f Make module stubs publicly visible
Previously they were limited to frameworks/base so that they could be
combined into the "main" android stubs. However, limiting their
visibility is inflexible and unnecessary, and due to limitations in the
build system also makes it impossible to create rules for prebuilts of
these module stubs that set `prefer: false`.

This CL makes it possible to disable the prebuilts, which multiple
downstream branches would like to do.

Bug: 159902351
Test: m nothing (with prefer: false on prebuilts)
Change-Id: Id0eee4bf4e78f5dfddf6ad569e49719fefde658e
2020-07-02 16:41:45 +01:00
TreeHugger Robot
7feac4ed47 Merge "Fix flaky media key event related CTS tests" into rvc-dev 2020-07-02 01:57:04 +00:00
Jaewan Kim
5a6696991f Fix flaky media key event related CTS tests
Media key events had been incorrectly dispatched to the
MediaSession2, which is closed from the app side, but
MediaSessionService didn't get the notification for it.

It may happen if MediaController2 from the MediaSession2 was
connecting and also MediaSession2 was closing. This fix ensures
that closing session is always propagated to the controller in
onConnect().

Test: Run following tests 10 times (previously flaky ~50%)
   $ atest CtsMediaTestCases:android.media.cts.MediaSessionTest
Bug: 159865360
Change-Id: If16f8c665214614961f28f9406225af19fdad1a8
2020-07-02 10:32:00 +09:00
Sudheer Shanka
7434322aef Merge "Add limits on BlobHandle label and lease expiry strings." into rvc-dev 2020-06-29 21:39:20 +00:00
Sudheer Shanka
94b852f9a6 Add limits on BlobHandle label and lease expiry strings.
Fixes: 157221032
Test: atest --test-mapping apex/blobstore
Change-Id: Ic8eac1d956b60fbcd171c2705d5a151c7d5baf87
2020-06-29 10:36:38 -07:00
Sudheer Shanka
74ddcfb06b Update commit/lease failure reasons for atoms logging.
Bug: 144155167
Bug: 159754450
Test: atest --test-mapping apex/blobstore
Change-Id: I2f511e00084f5b28db60a83c3237536181f5eb35
2020-06-26 15:26:41 -07:00
TreeHugger Robot
fd910278e9 Merge "Postpone headless app caching to after boot." into rvc-dev 2020-06-26 18:39:01 +00:00
Santiago Seifert
71e9ac7846 Reset mExtractorInput on end of file
Bug: 159982438
Test: atest CtsMediaParserTestCases
Change-Id: If2fcd33b7363bf33d0a7d30a5feacf7603ec375f
2020-06-26 14:13:25 +01:00
Sudheer Shanka
70f5e3e88b Merge "Ensure expired leases are ignored and deleted." into rvc-dev 2020-06-25 19:16:03 +00:00
Howard Ro
1caf7459e3 Merge "Fix package name for LibStatsPullTests" into rvc-dev 2020-06-25 18:04:38 +00:00
Sudheer Shanka
997750d9ee Ensure expired leases are ignored and deleted.
Also, fix the lease validity check.

Fixes: 159873312
Test: atest --test-mapping apex/blobstore
Change-Id: I174794c6db9e155d08fae884c247d189e077289b
2020-06-25 09:28:22 -07:00
Jeffrey Huang
9740023631 Fix package name for LibStatsPullTests
The previous package name was wrong. When the kWhiteListedAtoms was
removed, the breadcrumb atom was no longer being logged properly due to
the incorrect package name.

Bug: 159768218
Test: atest LibStatsPullTests
Change-Id: I2277d205d66ef0cdc4954990db0cd783d5d5401e
2020-06-24 19:40:32 -07:00
Sudheer Shanka
d06ebaeeed Merge "Revoke any open fds when deleting a session/blob." into rvc-dev 2020-06-25 01:08:29 +00:00
TreeHugger Robot
73113a6997 Merge "Add the "enable emsg" flag" into rvc-dev 2020-06-24 23:11:27 +00:00
TreeHugger Robot
ce0cc66945 Merge "Add subsample offset to the exposed MediaFormat" into rvc-dev 2020-06-24 23:01:56 +00:00
Sudheer Shanka
9ed7249ffe Revoke any open fds when deleting a session/blob.
Fixes: 159832638
Test: atest --test-mapping apex/blobstore
Change-Id: I97d97ec2874ace574d6d64c4793a6b374949725e
2020-06-24 15:36:52 -07:00
Sudheer Shanka
c9f2fdc0ba Merge "Add a limit on no. of active sessions, committed/leased blobs." into rvc-dev 2020-06-24 22:07:59 +00:00
Santiago Seifert
ad7f868f52 Add the "enable emsg" flag
Just in case we need it in a future integration.

Bug: 154120292
Test: Manual.
Change-Id: I53e0db4188359edfb6fd3a641c23e78c5991a6eb
2020-06-24 21:48:55 +01:00
Santiago Seifert
59e7273da1 Add subsample offset to the exposed MediaFormat
Bug: 154120292
Bug: 149906115
Test: Manual.
Change-Id: I15ea89dfb1b3adbc7738a07b66315a64721668ff
2020-06-24 21:21:39 +01:00
Santiago Seifert
b52102743a Make the output CryptoInfo.iv non-null
Bug: 154120292
Bug: 149906115
Test: Manually.
Test: atest CtsMediaParserTestCases
Change-Id: Icca0c5806f3c38afc22597c612b224fa6d37ca65
2020-06-24 18:37:38 +01:00
Santiago Seifert
4aa539485d Add parameter for sideloaded caption formats
Bug: 154120292
Bug: 149906115
Test: Manually.
Test: atest CtsMediaParserTestCases
Change-Id: I5dd3117884965786731ac2e475b34e4a9ce36d47
2020-06-24 13:01:43 +01:00
Sudheer Shanka
07717c9017 Add a limit on no. of active sessions, committed/leased blobs.
Bug: 159754450
Test: atest --test-mapping apex/blobstore
Change-Id: Ib8a78b8dcf396e452081c8526fb8a9efd9dde039
2020-06-24 03:58:48 -07:00
Kweku Adams
f29545d114 Postpone headless app caching to after boot.
Moving the headless app cache loading to the background thread still
affects boot time. Moving the loading to after boot has completed means
that it will no longer impact boot time.

Bug: 159057406
Bug: 159434503
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest FrameworksServicesTests:AppIdleHistoryTests
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Test: Confirm SystemServerTiming_OnBootPhase_500_com.android.server.BinderCallsStatsService$LifeCycle timing decreases
Change-Id: Ib79939ed15f9886d4fea02f7eda172b8cc82b674
2020-06-23 10:49:36 -07:00
Wayne Ma
7ce578a359 Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev 2020-06-22 08:38:54 +00:00
waynema
41e5aac60f Add framework-statsd dependency and make framework-statsd visible to
Tethering package.

Tethering needs StatsEvent and StatsLog which are in
framework-statsd.stubs.module_lib to write metrics.

Bug: 153942334

Test: make
Change-Id: I8ba142a9b3678de36e6c4880a64e992e00680f38
2020-06-22 06:57:51 +00:00
Sudheer Shanka
a019160bb0 Merge "Delay deleting the blob after the last lease is released." into rvc-dev 2020-06-21 23:01:42 +00:00
Michael Wachenschwanz
5d544ddff0 Merge "Move AppStandbyController calls out of UsageStats lock" into rvc-dev 2020-06-20 06:07:00 +00:00
Amith Yamasani
df604649ef Merge "Speed up NetworkPolicy thread during user creation" into rvc-dev 2020-06-20 04:12:16 +00:00
Sudheer Shanka
fbda8d7078 Delay deleting the blob after the last lease is released.
Bug: 159485704
Test: atest --test-mapping apex/blobstore
Change-Id: Iab153ae00107ee35705d7c17a3e51e7308e2e823
2020-06-19 15:49:15 -07:00
TreeHugger Robot
e9db363b54 Merge "Allow exposing ChunkIndex as MediaFormat" into rvc-dev 2020-06-19 18:06:59 +00: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
Santiago Seifert
d58414732a Allow exposing ChunkIndex as MediaFormat
Adds a parameter for exposing chunk indices as MediaFormats.
The parameter is disabled by default.

Bug: 149906115
Bug: 154120292
Test: atest CtsMediaParserTestCases
Change-Id: I2b64cab71edf0496c1ea730b4833fa2f4dbb6aad
2020-06-19 17:27:06 +01:00
Sudheer Shanka
14849cfbd4 Merge "Make usage of revocable fds for reads configurable." into rvc-dev 2020-06-19 02:23:13 +00:00
Sudheer Shanka
d6f4794eed Make usage of revocable fds for reads configurable.
Bug: 159374701
Test: atest --test-mapping apex/blobstore
Change-Id: If449197938fe457726bb5ec18663cfd7a500eb93
2020-06-18 16:46:36 -07:00
Amith Yamasani
62b19914af Speed up NetworkPolicy thread during user creation
Network Policy Manager makes a ton of calls to
UsageStats.isAppIdle, which in turn tries to get
the network scorer and results in a lot of calls to
PackageManager. Caching the network scorer reduces a
lot of the lock contention with PackageManager.

Also, caching calls to check for an app's internet
permission.

Handler for USER_ADDED broadcast reduced in wallclock
duration from 2+ seconds to 114ms.

Bug: 156582823
Test: atest UserLifecycleTests#createAndStartUser
Test: atest AppStandbyTests
Change-Id: I369f9c129ca8a13016e00b1bec2776111fa04513
2020-06-18 16:43:25 -07:00
TreeHugger Robot
8a4ea8bb12 Merge "Cache power whitelisted apps." into rvc-dev 2020-06-17 22:59:55 +00:00
TreeHugger Robot
dc539b6561 Merge "Retrieve direct boot aware activities." into rvc-dev 2020-06-17 22:59:16 +00:00
Sudheer Shanka
c712786944 Merge "Include blob sizes in blob_store service dump." into rvc-dev 2020-06-17 22:58:46 +00:00
Jeffrey Huang
5c8ac36d78 Merge "Add FrameworkStatsdTest to mts" into rvc-dev 2020-06-17 21:11:47 +00:00