Commit Graph

12738 Commits

Author SHA1 Message Date
TreeHugger Robot
cacd69515f Merge "Switch activity relaunch to lifecycler" 2018-02-08 23:58:15 +00:00
TreeHugger Robot
40279e5407 Merge changes I6993325b,Icb5114fe
* changes:
  Frameworks: Annotate trivial @GuardedBy in services/core
  Frameworks: Annotate trivial @GuardedBy in core/java
2018-02-08 23:32:03 +00:00
TreeHugger Robot
fcd3c57e19 Merge "Don't attempt to preload fonts in isolated processes." 2018-02-08 22:51:25 +00:00
TreeHugger Robot
f9420f4ddd Merge "Track notification clicked events in UsageStats" 2018-02-08 22:16:09 +00:00
TreeHugger Robot
9ea3c99a95 Merge "Statsd notifies listener with pendingintent." 2018-02-08 18:50:00 +00:00
Jiuyu Sun
b6276fe5a3 Merge "Revert "Public EuiccManager APIs."" 2018-02-08 17:34:30 +00:00
Pavel Grafov
c9b9e10e73 Merge "Run and log BoringSSL self-test for NIAP compliance." 2018-02-08 17:22:12 +00:00
Amith Yamasani
7ec8941167 Track notification clicked events in UsageStats
Expose some of the new events as SystemApi.

Make some of the timeouts configurable in AppStandbyController.

Make NOTIFICATION_SEEN event upgrade app to WORKING_SET for
12 hours. This is not perfect though and will require further
tweaking as it may result in the app becoming elevated higher
for much longer than necessary.

Change-Id: I62401cfabddf51b6f80b9bba8a358285b8cf9a51
Fixes: 72741441
Fixes: 72067231
Fixes: 72537465
Fixes: 72536347
Test: atest CtsUsageStatsTestCases:UsageStatsTests
2018-02-08 09:09:31 -08:00
Selim Cinek
df155c750b Merge "Removed the ripple for actions with remote inputs" 2018-02-08 16:59:54 +00:00
Jiuyu Sun
d3bb4aed78 Revert "Public EuiccManager APIs."
This reverts commit af6a5fffdc.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Id3296a91e5c3ad624a6a03f6532b859524a518bf
2018-02-08 16:38:26 +00:00
Andreas Gampe
3f24e69dbe Frameworks: Annotate trivial @GuardedBy in core/java
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Icb5114fea2ff2385e1cc7511121026099e05c0ee
2018-02-08 02:19:42 -08:00
Andrii Kulian
b372da6ef8 Switch activity relaunch to lifecycler
This is needed to be able to relaunch an activity and eventually
bring it to stopped state while it is not visible. Before this
relaunch request put activity in resumed state in the end. With
lifecycler both relaunch and request to move to stopped state can
be done in a single transaction to client.

Also fixed extra relaunch request to activity which was sent
before it was even started. It happened because we were waiting
for another activity to pause before actually scheduling the
launch, and in activity-paused callback we were ensuring config
first. This led to configuration update for not-yet launched
activity and relaunch message was sent first.

Bug: 64610483
Test: android.app.servertransaction tests
Change-Id: Ib89c20cd0fdff209319d4819023c3cdd641a72c7
2018-02-08 00:05:09 -08:00
Makoto Onuki
baae493184 Merge "Revert "Retry: JobScheduler to use UID active state for job exemption"" 2018-02-08 02:31:18 +00:00
Makoto Onuki
2f0b0310ee Revert "Retry: JobScheduler to use UID active state for job exemption"
This reverts commit 3f7be62d31.

Reason for revert: I failed to unrevert it.

Change-Id: I086634236e140d3fe2f46dfff605fde548ab34f4
2018-02-08 02:30:56 +00:00
David Chen
661f791a25 Statsd notifies listener with pendingintent.
Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.

Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
2018-02-07 16:16:23 -08:00
Jiuyu Sun
7fdd2bf7c1 Merge "Public EuiccManager APIs." 2018-02-07 23:55:28 +00:00
Makoto Onuki
b16f567576 Merge "Retry: JobScheduler to use UID active state for job exemption" 2018-02-07 23:23:37 +00:00
Etan Cohen
7210eaeba1 Merge "[RTT] Remove the legacy RTT service" 2018-02-07 22:50:16 +00:00
Emilie Roberts
3b60d0221c Merge "Close Dialog when ESC Pressed" 2018-02-07 22:03:38 +00:00
Etan Cohen
9accbba1b7 [RTT] Remove the legacy RTT service
Remove the legacy RTT service. RTT requests are already directed to
the new API by a previous CL.

Bug: 65108579
Test: unit tests
Test: WifiRttManagerTest:test_regular_scan_then_rtt_ranging_stress
Change-Id: I436e8bcd2f4e2ba6056870d887eea141fbebae85
2018-02-07 12:36:05 -08:00
Makoto Onuki
3f7be62d31 Retry: JobScheduler to use UID active state for job exemption
This is a second try for I134ac3d84a26309dab56ab6cbb271de626acdf7d.

Apparently alarms are firing even before PHASE_SYSTEM_SERVICES_READY, so add
more null checks.

Test: Boot on taimen.
Test: atest CtsAlarmManagerTestCases
Test: atest CtsJobSchedulerTestCases
Test: atest CtsBatterySavingTestCases
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java
Change-Id: I4b2a5af04e4d78c996e73da0621047da7a7bff39
2018-02-07 11:38:11 -08:00
Holly Jiuyu Sun
af6a5fffdc Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: Id7895f9b35ce9d4fb6fae42ba89ca9b29dbfa74c
2018-02-07 11:09:27 -08:00
Pavel Grafov
b745540445 Run and log BoringSSL self-test for NIAP compliance.
Bug: 70886042
Test: manual, using "adb shell su system logcat -b security"
Change-Id: I46f243838e2fb432995c7c89e4279d36a4788678
2018-02-07 18:59:43 +00:00
Artem Iglikov
159fdccde5 Merge "Revert "JobScheduler to use UID active state for job exemption"" 2018-02-07 15:04:05 +00:00
Artem Iglikov
0b053fecb6 Revert "JobScheduler to use UID active state for job exemption"
This reverts commit 6132e7bb1b.

Reason for revert: crashes master

Bug: 73049495
Change-Id: Idfd9a284163d26970b7cb89dea475d7c6abe0193
2018-02-07 09:47:51 +00:00
Selim Cinek
ffcc7cfc96 Removed the ripple for actions with remote inputs
Bug: 69168591
Test: click on inline reply, observe no ripple on action
Change-Id: I8ad9e419d8475dc632df16f03d8ca1b6317803d2
2018-02-06 17:43:51 -08:00
Makoto Onuki
4437a22f2d Merge "JobScheduler to use UID active state for job exemption" 2018-02-07 01:09:12 +00:00
Selim Cinek
a352b7a9f3 Merge "Implemented support for inline images" 2018-02-06 23:15:00 +00:00
Makoto Onuki
6132e7bb1b JobScheduler to use UID active state for job exemption
JobScheduler used to use procstate foreground state to decide whether
to exempt jobs, but it should use UID's active state instead, so that
if apps in the temp-whitelist schedule jobs, they run immediately.

Test: Boot
Test: atest CtsAlarmManagerTestCases
Test: atest CtsJobSchedulerTestCases
Test: atest CtsBatterySavingTestCases
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/AppStateTrackerTest.java

Change-Id: I134ac3d84a26309dab56ab6cbb271de626acdf7d
2018-02-06 13:36:59 -08:00
Adam Lesinski
cffb3604ae Merge changes from topic "assetmanager2"
* changes:
  libandroidfw: Improve performance of AssetManager2
  libandroidfw: Add ApplyStyle and SetConfiguration benchmark
  Make idiomatic use of ApkAssets and AssetManager
  libandroidfw: Make sure to set the 'app as lib' flag
  Replace AssetManager with AssetManager2 implementation
2018-02-06 19:52:36 +00:00
Selim Cinek
7199ed910e Implemented support for inline images
Messaging Style always had API support to
display images, but they were never shown.
We are now displaying images inline

Bug: 63708826
Test: send messages with an image
Change-Id: I50c835b19f4846cb2cbfb17e9805eacffd9ec6b3
2018-02-06 10:33:16 -08:00
Emilie Roberts
c1c572ef92 Close Dialog when ESC Pressed
Listens for ESC key and calls onBackPressed() to close the
dialog.

Bug: 71907807
Test: atest cts.DialogTest
Test: Manual testing on Marlin, P (master)
Change-Id: I850cc9889869fa3b7d83bfab55e1f4d63035e162
2018-02-06 18:25:49 +00:00
Vladislav Kuzkokov
999ea9fb7e Merge "Make printing policy a restriction." 2018-02-06 17:11:07 +00:00
Julia Reynolds
348f19e6a3 Merge "Grant uri access to notification listeners." 2018-02-06 13:46:31 +00:00
Adam Lesinski
633085456e Make idiomatic use of ApkAssets and AssetManager
Move away from using deprecated addAssetPath methods
and cache the instances of ApkAssets created.

Test: CTS passes
Change-Id: Ie95cd5a9e205a35806e7b142df5af02aa90d83ca
2018-02-05 18:38:57 -08:00
Patrick Baumann
0da8537cf6 Require only ACTION_VIEW for web instant apps
When generic intent resolution support was added to instant apps, it
added the requirement that web instant app resolution also require the
BROWSABLE category. This change relaxes that requirement.

Test: manual - sent intent without browsable and observed resolution
Change-Id: I7d4d891484f538b46d37f2c8e7c040b370b46b9e
Fixes: 72835413
2018-02-05 23:21:47 +00:00
Vladislav Kuzkokov
622b9f9212 Make printing policy a restriction.
Use existing API instead of creating new method.

Bug: 64140119
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPrintingPolicy

Change-Id: I9ff94f4d73824e7bf9aedbb64811ad60fccf9779
2018-02-05 22:30:05 +01:00
Julia Reynolds
e0d711f435 Grant uri access to notification listeners.
Bug: 9069730
Bug: 63708826
Test: runtest systemui-notification
Change-Id: I87e9dffde35e1afc5e23137df09e0c093d656e23
2018-02-05 17:17:01 +00:00
Julia Reynolds
30b82786c1 Merge "Rename broadcast constants" 2018-02-05 17:07:13 +00:00
TreeHugger Robot
5ce2d49b2f Merge "Introduce "adb shell dpm force-security-logs"" 2018-02-05 15:16:23 +00:00
Julia Reynolds
44ff7c9585 Rename broadcast constants
Test: runtest systemui-notification, cts verifier
Change-Id: I41812e7fa0ae532fbdff5c5ba88887d1b1187b79
Fixes: 72762612
2018-02-05 15:05:00 +00:00
TreeHugger Robot
1bb9f29909 Merge "Autofill compatibility mode." 2018-02-05 09:55:29 +00:00
Svetoslav Ganov
24c90450fe Autofill compatibility mode.
Autofill helps users fill credentials, addresses, payment methods,
emails, etc without manually typing. When focus lands on a fillable
element the platform captures a snapshot of the screen content and
sends it to an autofill service for analysis and suggestions. The
screen snapshot is a structured representation of the screen content.
If this content is composed of standard widgets, autofill works
out-of-the-box. However, some apps do their own rendering and
the content in this case looks like a single view to the platform
while it may have semantic structure. For example, a view may render
a login page with two input test fields.

The platform exposes APIs for apps to report virtual view structure
allowing autofill services to handle apps that have virtual content.
As opposed to apps using standard widgets, this case requires the app
developer to implement the new APIs which may require a fair amount
of code and could be seen as a processes that could take some time.
The most prominent typs of apps that fall into this category are
browsers.

Until most apps rendering virtual content and specifically browsers
don't implement the virutal APIs, autofill providers need to fall-
back to using the accessibliity APIs to provide autofill support
for these apps. This requires developers to work against two sets
of APIs - autofill and accessibility - which is incovenient and error
prone. Also, users need to enable two plugins - autofill and
accessibility which is confusing. Additionally, the privacy and
perfomance impact of using the accessibility APIs cannot be addressed
while autofill providers need to use thes APis.

This change adds an autofill compatibility mode that would allow
autofill services to work with apps that don't implement the
virtual structure autofill APIs. The key idea is to locally enable
accessibility for the target package and remap accessibility to
autofill APIs and vise versa. This way an autofill provider codes
against a single set of APIs, the users enable a single plugin,
the privacy/performance implications of using the accessibility
APIs are addressed, the target app only takes a performance hit
since accessibility is enabled locally which is still more efficient
compared to the performance hit it would incur if accessibility is
enabled globally.

To enable compatibility mode an autofill service declares in its
metadata which packages it is interested in and also what is
the max version code of the package for which to enable compat
mode. Targeted versioning allows targeting only older versions of
the package that are known to not support autofill while newer
versions that are known to support autofill would work in normal
mode.

Since compatibility mode should be used only as a fallback we
have a white list setting with the packages for which this mode
can be requested. This allows applying policy to target only
apps that are known to not support autofill.

Test:
     cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
     cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:72811034

Change-Id: I11f1580ced0f8b4300a10b3a5174a1758a5702a0
2018-02-02 19:34:26 -08:00
Jeff Sharkey
ad357d1839 Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.

This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.

Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
2018-02-03 02:11:45 +00:00
Jason Monk
632def142d Switch SliceManager IContentProvider to ContentProviderClient
Also fix up some docs.

Test: cts + unit tests
Change-Id: I25ebbcb3fd2cef223a2cd43fba57c06a183e1d31
2018-02-02 10:33:23 -05:00
Jason Monk
b715b04763 Add backup/restore for slices access
Test: various "adb shell bmgr" commands to verify behavior
Change-Id: Ic4439e0e17516462acdb8d28fe49095209a2ed6f
Fixes: 68751119
2018-02-02 10:33:19 -05:00
Pavel Grafov
5bb5a6219d Introduce "adb shell dpm force-security-logs"
This command fetches the most recent batch of the logs
and makes them available to the DPC. Primary purpose is
to make security logging testable in CTS without having
to either wait for 2 hours or relying on implementation
details.

To prevent the user from abusing the command and
annoying the DPC, it is throttled if run more than once
per 10 seconds. Waiting happens in Dpm command.

Test: adb shell dpm force-security-logs
Bug: 70886042
Bug: 62251154
Change-Id: Ic5acd5a3e5c3b060881385c472df2b972961b626
2018-02-02 14:20:41 +00:00
Jeff Sharkey
044111b8b3 Merge "Move more folks to FileUtils.copy()." 2018-02-02 03:14:39 +00:00
TreeHugger Robot
0c8a7247c8 Merge "Switch order of onSaveInstanceState and onStop" 2018-02-01 23:26:21 +00:00
Jeff Sharkey
45c97df89d Move more folks to FileUtils.copy().
Also extend API to accept a "count" argument of exactly how many
bytes to copy, and return the actual number of copied bytes.

Improve docs.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978
Change-Id: I8d255e4f97462838c02a8ecb6d2d221188c4eff0
2018-02-01 16:01:55 -07:00