Commit Graph

5080 Commits

Author SHA1 Message Date
Susi Kharraz-Post
b5de2782de Merge "Add logging for profile switching for sharesheet" 2019-02-22 18:00:34 +00:00
Susi Kharraz-Post
0446fab756 Add logging for profile switching for sharesheet
We want to know which profile people share from and if users are
switching from work to personal profile when sharing and vice versa.
This adds the current profile to the sharesheet and also logs when the
profile is switched.

Bug: 124503277
Test: Added new unit tests for ChooserActivity and IntentForwardActivity
Change-Id: Ideb83682bf3395258ff457988f4a3e9f519a844c
2019-02-22 08:47:16 -05:00
TreeHugger Robot
add90457d5 Merge "Language detection fixes." 2019-02-22 11:20:28 +00:00
Felipe Leme
9873510af3 Merge "Refactored Autofill properties that are optimized on application level." 2019-02-22 01:02:46 +00:00
Sherry Huang
a2c5d1a7f3 Merge "Implement USB-C overheat warning" 2019-02-21 23:09:08 +00:00
Felipe Leme
a4f39cd150 Refactored Autofill properties that are optimized on application level.
Prior to this CL we were just caching whether the service supported compatibility mode for the app,
but now we're also caching the logging level and whether the app is whitelisted for augmented
autofill - although right now the augmented autofill info is not used, it will allow us to trigger
it in the scenarios where autofill is disabled for the app.

Bug: 123099842
Bug: 123100824
Test: atest CtsAutoFillServiceTestCases:AugmentedLoginActivityTest \
            CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest
      atest CtsAutoFillServiceTestCases # sanity check, although still flaky

Change-Id: Iaf8ea6634ca94e5e61131890ec17c96c2fbb329a
2019-02-21 10:44:39 -08:00
Abodunrinwa Toki
25f7fdc19a Language detection fixes.
- Load foreign language detection score threshold from model
- Pass resource config language to native code instead of Locale.getDefault()
- Avoid nullpointer exception in ExtrasUtils
- Don't set action_intents extras if empty

Bug: 124791964
Bug: 124794807
Test: atest core/tests/coretests/src/android/view/textclassifier
Change-Id: I2593d7cb4d364d8bf26239ed59b7212f79ddc350
2019-02-21 14:59:00 +00:00
Sherry Huang
ce02ed3a46 Implement USB-C overheat warning
When device USB-C port is susceptible to short circuits and
overheating, pop up a warning dialog and keep showing until
user clicks OK button or see care steps.

Test: manually set the emulated temperature to trigger warning
Test: atest SystemUITests

Change-Id: I4f6080187196a9716f12a9817dc10d3265dc202b
Bug: 110134720
Bug: 116866524
Bug: 77790357
Bug: 117178820
2019-02-21 22:00:47 +08:00
TreeHugger Robot
3ffadce8b9 Merge "Optimized Content Capture workflow by caching some state at the application level." 2019-02-21 05:34:34 +00:00
Jeff Sharkey
f862750207 Merge "Flesh out CR.getTypeDrawable() with more details." 2019-02-21 04:39:53 +00:00
Felipe Leme
326f15a392 Optimized Content Capture workflow by caching some state at the application level.
Content Capture for an activity and/or package is only available when the Content Capture service
explicitly whitelists it. As the whitelist is kept at system-server level, it's better to fetch that
info when the application is started and cache it locally, so we can optimize the
ContentCaptureManager APIs to return quickly when it's disabled.

This CL also caches other values such as the buffer parameters.

Test: atest CtsContentCaptureServiceTestCases

Bug: 120494182
Bug: 121202151

Change-Id: I9d5211bca496ffa85ba9efc2a7bb32411834b787
2019-02-20 18:44:05 -08:00
TreeHugger Robot
6944910037 Merge "Add CompositionSamplingListener" 2019-02-20 23:44:26 +00:00
Jeff Sharkey
806bece3be Flesh out CR.getTypeDrawable() with more details.
Providing icons for MIME types is generally useful, but we also
need to provide a label and content description.  This interface
can be extended internally to surface details about special MIME
types, such as "image/vnd.google.panorama360+jpg".

Bug: 122887179, 120791890
Test: atest android.content.cts.ContentResolverTest
Change-Id: Ibe655896315b9a9662dfdace3ee8ffacf1302eb8
2019-02-20 18:26:16 +00:00
TreeHugger Robot
f7612ac846 Merge "Changes on the ContentCaptureContext APIs." 2019-02-20 15:51:59 +00:00
Adrian Roos
9b963d3ce4 Add CompositionSamplingListener
Adds a facility to sample the median luma in a region
of the SurfaceComposer's result.

Test: atest CompositionSamplingListenerTest
Bug: 124305231
Change-Id: I78eececa9aef420f488a860f4e6891d4af84d27f
2019-02-20 15:16:36 +01:00
TreeHugger Robot
fb9dcf288e Merge "Sharesheet - Support sharing from downloads" 2019-02-20 04:14:55 +00:00
TreeHugger Robot
c6ab749ef1 Merge "Switching off ART verifications for debuggable apps (dev option-controlled)." 2019-02-20 03:55:40 +00:00
Yiwei Zhang
32981ff4d4 Merge "Game Driver: Add a Settings.Global property for sphal libraries" 2019-02-19 19:03:05 +00:00
Matt Pietal
f38e9d25ae Sharesheet - Support sharing from downloads
Don't assume that all shared files have a DISPLAY_NAME index.
Downloads provide a different title index, so check the cursor
index for -1 values. Also make sure to close the cursor when done.

Bug: 124448157
Test: atest ChooserActivityTest, manually test sharing a download
Change-Id: I0beda6b72fb74c65fc4665c8234f147667925784
2019-02-19 09:44:18 -05:00
Adam Vartanian
3deb23fead Merge "Fix authority parsing test" am: 8ce3609e58 am: becdd58df5
am: 598b2497b3

Change-Id: Ic32fceebd7936b779efed954dcd0745b1207f7ff
2019-02-19 02:04:16 -08:00
Adam Vartanian
598b2497b3 Merge "Fix authority parsing test" am: 8ce3609e58
am: becdd58df5

Change-Id: I41d4997661cf011e9589aedac9de301b1becb441
2019-02-19 01:54:53 -08:00
Adam Vartanian
becdd58df5 Merge "Fix authority parsing test"
am: 8ce3609e58

Change-Id: I8554fddceb326c52b85b34a483b3e3791abf2cdc
2019-02-19 01:44:45 -08:00
Adam Vartanian
f240cb8091 Fix authority parsing test
The test has been failing because http://r.android.com/793302 changed
how the port separator was found, only scanning ASCII digits until it
hits a colon, and previously it would scan for the colon and then
percent-decode the rest of it.  The new behavior actually better
matches the WHATWG URL parsing algorithm [1], which specifies that
ports only include ASCII digits.  It does mean that some edge cases
that previously parsed as host "foo", port 42 will now parse as
host "foo:42", no port, but those URLs wouldn't be accepted by
browsers so they should be exceedingly rare.

The behavior per the WHATWG spec would be to fail to parse in the case
of a percent-encoded character in the port section, but this class is
specifically documented to accept garbage, so lumping the mis-encoded
port as part of the hostname (which will result in a hostname that's
invalid and impossible to resolve) seems like the best option.

[1] https://url.spec.whatwg.org/#port-state

Fixes: 124360078
Test: atest android.net.UriTest
Change-Id: I1c788cb7703c821ae74b542b74d89e10cba5a546
2019-02-19 09:27:24 +00:00
Felipe Leme
044c63b367 Changes on the ContentCaptureContext APIs.
- Replaced URI by a generic ID
  (which is a new class LocusId, and required)
- Createad a new Intent.ACTION_VIEW_LOCUS action
  (and Intent.EXTRA_LOCUS_ID extra)
- Removed ContentCaptureContext.getAction()
  (so the only "supported" action is ACTION_VIEW_LOCUS)
- Made the ContentCaptureContext getters public
  (getId(), getExtras())

Test: m update-api
Test: atest CtsContentCaptureServiceTestCases \
      CtsContentTestCases:LocusIdTest \
      FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest

Bug: 123577059
Fixes: 124266664

Change-Id: Id4c28f056eb7a24dd083303ffdea7cf662cefac2
2019-02-15 20:44:35 -08:00
Jeff Sharkey
a13887fa63 Replace ContentInterface with wrapping.
After much discussion, we can't safely introduce ContentInterface,
so instead offer ContentResolver.wrap() methods.

Bug: 120974438
Test: manual
Change-Id: I0b399192a19948a8986146efa916375022c38b59
2019-02-15 19:45:18 -07:00
Yiwei Zhang
03f3ff20bf Game Driver: Add a Settings.Global property for sphal libraries
This change add the GAME_DRIVER_SPHAL_LIBRARIES property to save the
list of sphal libraries assessible to Game Driver.

Bug: 124448366
Test: Build, flash and boot.
Change-Id: I7cb06df80f19d87f5fd13d7df3c991ceb5bdfb06
2019-02-14 17:38:24 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Felipe Leme
0552f41c4e Merge "Add new ContentCapture APIs to let apps change the ContentCaptureContext." 2019-02-14 15:26:27 +00:00
Alex Buynytskyy
5d5921ee2c Switching off ART verifications for debuggable apps (dev option-controlled).
This is complementary to switching off install-time checks for
debuggable apps and improves launch times for dex-heavy apps.
It's ON by default and controlled via developer option.

Bug: 124403695
Test: manual

Change-Id: Icafba38e8af71ef785088577ebf674bc13e26666
2019-02-13 17:20:41 -08:00
TreeHugger Robot
61dac1aa50 Merge "Revert "Revert "Switch clock face while docked.""" 2019-02-13 22:45:48 +00:00
Robert Snoeberger
b300a4ee45 Revert "Revert "Switch clock face while docked.""
This reverts commit 708e739811.

Reason for revert: The issue motivating the revert was an earlier presubmit failure for my change.

Change-Id: Icdb7f4dddc5bbee8ce1f54bb8cee550ef0a4639e
Bug: 124252294
2019-02-13 20:15:12 +00:00
Misha Wagner
dc5beb50c8 Merge "Add KernelCpuThreadReader minimium CPU usage threshold" 2019-02-13 10:31:15 +00:00
TreeHugger Robot
dc3e98eabb Merge "Revert "Switch clock face while docked."" 2019-02-13 06:00:56 +00:00
Lucas Dupin
708e739811 Revert "Switch clock face while docked."
This reverts commit 0ac3cdfa3f.

Reason for revert: Causes presubmit error
Fixes: 124252294

Change-Id: I881b24a60dd3a98afb807264d1e4318127a8c91b
2019-02-13 00:25:38 +00:00
Tim Van Patten
760fca89da Merge "ANGLE In Use Dialog Box" 2019-02-12 23:48:00 +00:00
TreeHugger Robot
44426e2142 Merge "Switch clock face while docked." 2019-02-12 23:17:43 +00:00
Ng Zhi An
1033db8ddf Do not load xml metadata for unchanged packages in RegisteredServicesCache
RegisteredServicesCache caches services in an xml, so the system doesn't
have to scan all the apks. Whenever a package is changed
(add/remove/replaced), the broadcast receiver in RegisteredServicesCache
will refresh this cache by quering all matching services and reading
their
xml metadata. There is extra work done here, because only the changed
package
will have services added/removed.

The edge case is after a cache is invalidated, we want to query package
manager for everything, regardless of what changedUids is (we could
have arrived here if invalidateCache is called, and then a package
change event fires, before a getAllServices is called to rescan
everything).

Add a new test to verify that the optimization takes care of the case
when the cache is invalidated.

Bug: 117755076
Bug: 122912184
Test: atest RegisteredServicesCache
Test: dumpsys content # check sync adapters
Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
(cherry picked from commit dc66ef5ed3)
2019-02-12 23:15:52 +00:00
Matt Pietal
af5c88b87e Merge "Sharesheet - file preview support" 2019-02-12 21:09:46 +00:00
Tim Van Patten
ddc4391170 ANGLE In Use Dialog Box
When ANGLE is enabled for an app, show a dialog box to the user to
indicate that ANGLE is in use.   This is useful because there are
not (or at least shouldn't be) any visual indication that a different
OpenGL driver is in use.

Bug: 120489005
Test: atest CtsAngleIntegrationHostTestCases
Test: Load an app with ANGLE enabled and verify dialog box is shown.
Test: Load an app without ANGLE and verify dialog box is not shown.
Change-Id: I5e87ec96582d43666cfcca2266b46ce98b859a32
2019-02-12 13:53:36 -07:00
Felipe Leme
4eecbe6e3c Add new ContentCapture APIs to let apps change the ContentCaptureContext.
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.LoginActivityTest#testSimpleLifecycle_changeContextOnCreate \
   CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.LoginActivityTest#testSimpleLifecycle_changeContextAfterCreate
Test: atest FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest

Bug: 124266664

Change-Id: I0348e81e1b2bac01363cf615d2ab32e5bab8aee1
2019-02-12 11:31:06 -08:00
TreeHugger Robot
79822242de Merge "Split blacklist from versioned blacklists." 2019-02-12 19:23:01 +00:00
Robert Snoeberger
0ac3cdfa3f Switch clock face while docked.
Bug: 120772327
Test: Added tests ClockManagerTest and DefaultClockSupplierTest
Change-Id: I404c6d52e1bd087d453d928faf373cf8dea9e2b2
2019-02-12 13:43:36 -05:00
Peiyong Lin
075a9e833f Split blacklist from versioned blacklists.
Previously we use blacklist to get all blacklists, to maintain the consistency
between blacklist and whitelist, and to move blacklist processing to GPU
service, we added blacklists to store all blacklists, and now blacklist will
only represent one blacklist.

BUG: 120869311
Test: Build, flash and boot. Verified in master patch ag/6288554
Change-Id: Ifac875177ad959705c8f80672341c4cbee7bbc93
Exempt-From-Owner-Approval: Change in CoreSettingsObserver.java is too minor
2019-02-12 17:15:01 +00:00
Matt Pietal
46d828c99e Sharesheet - file preview support
Support sharing 1 or more non-image type files, with potential
for system generated thumbnail image

Bug: 120419296
Test: atest ChooserActivityTest

Change-Id: I17c44435bb0444035e2ec7675cbc367b75cc3a8e
2019-02-12 07:28:15 -05:00
Misha Wagner
648d20359f Add KernelCpuThreadReader minimium CPU usage threshold
Configurable using KernelCpuThreadReaderSettingsObserver.

Test: atest KernelCpuThreadReaderTest#testReader_filtersLowUsage
Change-Id: I92bb5fbee6b56bff00c61f359e8281966e2882c1
2019-02-12 11:05:29 +00:00
Xiangyu/Malcolm Chen
cfab2e7015 Merge changes from topics "118348832", "120945564" am: 52a31598e7
am: 0c15f98874

Change-Id: I52fa7a18545f5e5bee64314cd47f8f6cb026f0a3
2019-02-11 16:13:42 -08:00
TreeHugger Robot
82193d0c57 Merge "Convert ViewNodeTest to androidx.test." 2019-02-11 22:25:19 +00:00
Felipe Leme
5d56e66495 Merge "Use DeviceConfig to configure Augmented Autofill Modes." 2019-02-11 22:06:36 +00:00
Olivier Gaillard
f062b3bb12 Merge "Add a flag to disable optional dimensions." 2019-02-11 20:53:49 +00:00
Tony Mak
84c8c2a2aa Merge "Add TEST_MAPPING to textclassifier" 2019-02-11 20:47:46 +00:00