Commit Graph

21788 Commits

Author SHA1 Message Date
Daniel Solomon
37fc6eaaf4 Merge "Add API to ColorSpace to compute chromaticity coordinates from CCT" 2018-12-04 20:12:46 +00:00
Hall Liu
3706c94bf3 resolve merge conflicts of 78128395e7 to master
Bug: 119675160
Test: none
Change-Id: I6bb788cb3b5e0e8f36c48282b06527f5d8dec688
2018-12-04 11:38:12 -08:00
Hall Liu
78128395e7 resolve merge conflicts of 57a6375a99 to pi-dev-plus-aosp
Bug: 119675160
Test: None
Change-Id: Ib01e4549beca4fc237b7ea95aa9043536e1e1139
2018-12-04 18:55:18 +00:00
TreeHugger Robot
be0afe72a8 Merge "Refactor Inspector API" 2018-12-04 18:36:51 +00:00
Hall Liu
239b0de673 Merge "Add API scaffolding for number verification" 2018-12-04 17:58:28 +00:00
Sooraj Sasindran
401023f8a0 Merge "UpdateAvailableNetworks apis" 2018-12-04 17:28:35 +00:00
Jeff Sharkey
f660c012b0 Merge "Add support for "Audiobooks"." 2018-12-04 16:58:17 +00:00
TreeHugger Robot
2a2896c280 Merge "Make getUnderlineColor public." 2018-12-04 16:25:19 +00:00
Dario Freni
110abbf49a Merge changes from topic "apex_adb" am: f64909587b
am: 2d03586435

Change-Id: I217e06b2e131e6eb3f21c6f25207699f9b15b28f
2018-12-04 05:05:42 -08:00
Jeff Sharkey
628d2e6888 Merge "Redact location Exif tags when no permission." 2018-12-04 01:28:37 +00:00
Ashley Rose
d2c5f456c9 Refactor Inspector API
InspectionHelper has been renamed to InspectionCompanion for clarity
about its lifecycle. The APIs needed to be accessed from the context of
an inspection agent injected by the profiler have been made public.

With a tightend focus on platfrom views and XML resource IDs, the
@InspectableProperty annotation now has affordances for specifying an
attribute resource ID and for defining @IntDef flag and enum mappings.
@InspectableChildren has been removed, as this will be special cased in
the injected inspector. Additionally, support for attribute ID is now
provided in all PropertyMapper methods.

Additionally, PropertyMapper and PropertyReader now have support for
Gravity ints, @ColorInt, @ColorLong, and Color objects.

Test: mmma frameworks/base
Bug: 120224687
Change-Id: If455e2d1d9693eac39c33fc35f892baf75671ba4
2018-12-04 01:20:11 +00:00
Felipe Leme
ecb08be22e Split IntelligenceManager / IntelligenceService.
This name is too generic, so we split it in 2 parts:

- ContentCaptureManager: the public API used by views and apps to report their
  structure.
- SmartSuggestionsServiec: the system service use to consume these events and
  provide autofill suggestions.

This CL also:

- Optimizes ContentCaptureManager allocation so they are not created on contexts that are not
  capturing events (such as views from the system server).
- Uses a generic ContentCaptureEventsRequest (rather than a list of events) to make it easier
  to be extended.
- Fixed IntelligencePerUserService so it clears the sessions when the
  implementation changes.

Test: manual verification

Bug: 119776618
Bug: 117944706
Bug: 119638877

Change-Id: I069bcd23dda94afe18b2781fd3981b8b555afa56
2018-12-03 15:29:07 -08:00
Ahmed ElArabawy
390de008b0 Merge "Support of Low Latency mode for WifiLocks" 2018-12-03 22:26:35 +00:00
qqd
3cdaa2488f Make getUnderlineColor public.
Bug: 117521361
Test: atest CtsTextTestCases:android.text.style.cts.SuggestionSpanTest
Change-Id: Iafc7fa65b495e5cc5e69809c94c15c947ceab9ca
2018-12-03 14:12:42 -08:00
Philip P. Moltmann
7208efc83b Merge changes from topic "LocationAccessCheck"
* changes:
  New settings for testing permission controller
  Expose API needed for apps to use work profiles.
2018-12-03 19:59:03 +00:00
Jeff Sharkey
cb39499354 Redact location Exif tags when no permission.
When the caller doesn't hold the ACCESS_MEDIA_LOCATION permission,
any location Exif tags should be redacted for privacy reasons.  We
still allow unredacted raw file access if the media is owned by the
calling app, since they should be able to see data they contributed.

Certain backup apps really want to see the original contents without
any redaction, so provide them a setRequireOriginal() API so they
get a strong exception whenever the original bits can't be provided.

Add the ability to open a redacted file for read/write access by
stopping redaction for any ranges that have been overwritten with
new data, along with tests to verify this behavior.

Extend "content" tool to bind null values.

Bug: 111892141
Test: atest android.os.RedactingFileDescriptorTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I47b220036a712d9d49547196b90e031b10760f84
2018-12-03 12:57:09 -07:00
TreeHugger Robot
cee08bd900 Merge "Revert getMatchingOsuProviders(List<ScanResult>) API referencing hidden type" 2018-12-03 19:29:32 +00:00
Andrew Scull
d968016172 Merge "Complete OemLockService API." 2018-12-03 17:43:51 +00:00
Soonil Nagarkar
5494113f67 Merge "Add ignoreLocationSettings to WifiScanner" 2018-12-03 16:26:39 +00:00
Julia Reynolds
b56135964d Merge "Require a permission for Q apps using full screen intents" 2018-12-03 16:13:59 +00:00
Andrey Kulikov
c7f839b720 Merge "Restrict unsupported API usage to View.setFrame" 2018-12-03 15:54:19 +00:00
Adrian Roos
68877da9bb Revert getMatchingOsuProviders(List<ScanResult>) API referencing hidden type
This partially reverts commit 8561aa3281 because
the added API references the OsuProvider type which is not part of the API.

Bug: 119556446
Test: make droid
Change-Id: Id13857bcb52e715148b06d27cf4096d08f751d37
Exempt-From-Owner-Approval: API only change
2018-12-03 16:48:21 +01:00
TreeHugger Robot
87a81049d2 Merge "Made View#setTransitionAlpha(),getTransitionAlpha() public" 2018-12-03 15:28:05 +00:00
Roshan Pius
4762f45bb4 Merge "WifiManager: Set a max limit on num of suggestions" 2018-12-03 14:51:22 +00:00
Andrey Kulikov
c5713cbf62 Made View#setTransitionAlpha(),getTransitionAlpha() public
It will allow to call this methods in AndroidX Transition without reflection.

Bug: 117521009
Bug: 117519704
Test: a new test
Change-Id: I68f33365337a3c21c0914e8a02bef47e430d8e46
2018-12-03 13:49:02 +00:00
Andrey Kulikov
470564c977 Restrict unsupported API usage to View.setFrame
Developers should use setLeftTopRightBottom() instead. Also making setLeftTopRightBottom final.

Bug: 117520377
Test: none
Change-Id: I67d196e4950d4ef43c9b15dbd00a7dc5d72a59d5
2018-12-03 13:48:21 +00:00
Dario Freni
e8129a31bb Add MATCH_APEX flag to getInstalledPackages.
If set, PackageManager will query apexservice and ask for activated
packages.

Test: wrote a small app to test the new query.
Bug: 117589375
Merged-In: I498bd97896f3eab65c88e9684874a30713be585e
Change-Id: I498bd97896f3eab65c88e9684874a30713be585e
2018-12-03 22:29:31 +09:00
Andrey Kulikov
5754598e83 Makes View#setAnimationMatrix public
Bug: 117520374
Test: None. There is no getter for it so it's not easy to test. Probably it should be tested on RenderNode side instead.
Change-Id: I399ebb772e557c849b02a1d71be7821121a9ce8a
2018-12-03 11:34:39 +00:00
Andrey Kulikov
4bcd414ea9 Merge "Made ViewGroup.suppressLayout/isLayoutSuppressed public" 2018-12-03 11:32:48 +00:00
Ahmed ElArabawy
0008fa8d5c Support of Low Latency mode for WifiLocks
This commit is part of adding the support for low latency mode
wakelocks. It adds the new WifiLock for low latency
This commit also deprecates the FULL, and SCAN_ONLY wifilocks.

Bug: 34905427
Test: No Test- This commit is just the api definition

Change-Id: Id47294867d8000517601dd48a2fcf5a345779ddb
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2018-12-03 04:39:14 +00:00
Daniel Solomon
1ca52e44cc Add API to ColorSpace to compute chromaticity coordinates from CCT
Add a ColorSpace API that computes the chromaticity coordinates of a CIE
series D illuminant from the specified correlated color temperature.

Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases --test android.graphics.cts.ColorSpaceTest
Bug 116516917

Change-Id: I6c9f2a23ed548556d5fbdcc22ed5a094a76bb8e4
2018-12-02 12:01:11 -08:00
Jeff Sharkey
74c52585f4 Merge changes from topic "sqlitez" am: a920b9c85e
am: fd5131bba5

Change-Id: Id9ca077e14373ad19b2ac98ce65a89ea3fc2873e
2018-12-02 11:56:50 -08:00
Jeff Sharkey
fd5131bba5 Merge changes from topic "sqlitez"
am: a920b9c85e

Change-Id: If22eef6e248b9e3bd1f5e22cd5081608494ad733
2018-12-02 11:32:48 -08:00
Philip P. Moltmann
9e5fccc81a Merge "Give platform permissions a dummy group" 2018-12-02 01:28:26 +00:00
Philip P. Moltmann
c9907ce3e8 New settings for testing permission controller
The settings are used to reduce the runtime of the location access
permission controller tests.

Bug: 120303361
Test: atest CtsPermissionTestCases:android.permission.cts.LocationAccessCheckTest
      atest --test-mapping frameworks/base/core/java/android/provider/:presubmit
Change-Id: I47ed218dc0a300f73a1c0308fce60b61e6a423b0
2018-12-01 17:03:31 -08:00
Jeff Sharkey
0da04839b7 Support for appending "standalone" WHERE chunks.
The existing appendWhere() methods aren't very friendly for
developers, since they require manual tracking of state to decide if
subsequent standalone chunks should be prefixed with "AND".

While it's tempting to offer direct argument binding on the builder
class, we can't really deliver on that API in a secure way, so instead
add separate bindSelection() method which explicitly burns arguments
into a standalone selection string, which can then be appended to
the builder.

This was the last piece of new functionality being used by
SQLiteStatementBuilder, so we can delete that class and migrate
users back to SQLiteQueryBuilder.

Bug: 111268862
Test: atest frameworks/base/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I418f24338c90bae8a9dad473fa76329cea00a8c5
Change-Id: I418f24338c90bae8a9dad473fa76329cea00a8c5
2018-12-01 17:23:05 -07:00
Jeff Sharkey
8a634372b3 Bind update() args as Object[] for performance.
It's wasteful to convert them to String when SQLite already knows
how to bind specific data types, including funky types like byte[].

Also promote to public API, since they're generally useful.

Bug: 111085900
Test: atest packages/providers/DownloadProvider/tests/
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I5b418bca1204773fd2795156a2f47906ca1e1a6b
Change-Id: I5b418bca1204773fd2795156a2f47906ca1e1a6b
2018-12-01 17:23:05 -07:00
Jeff Sharkey
6c90f1ded2 Revert SQLiteQueryBuilder for now.
We've encountered subtle bugs in how apps are using this public
API, so revert it back to exactly what shipped in the last
release, and move functionality to new SQLiteStatementBuilder
class, since we already have several customers using it.

Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111486645
Merged-In: Ief059e987f2421e19f6f57a94320c313946a26d7
Change-Id: Ief059e987f2421e19f6f57a94320c313946a26d7
2018-12-01 17:23:04 -07:00
Jeff Sharkey
55777e52df Add support for appending standalone phrases.
When users are building queries, they often need to append several
standalone SQL clauses, and it's tedious to track their first clause
so they can manually append " AND " to each subsequent clause.

So add new appendWherePhrase() API which appends a standalone phrase
which is AND'ed together with any existing WHERE query.

Also fix bug in update() which would turn null values into the
string literal "null" instead of passing them through as SQL NULL.

Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111085900
Merged-In: Ia280dd864895654239503e080eaef925f5620d37
Change-Id: Ia280dd864895654239503e080eaef925f5620d37
2018-12-01 17:23:04 -07:00
Jeff Sharkey
3e26b7db55 Extend SQLiteQueryBuilder for update and delete.
Developers often accept selection clauses from untrusted code, and
SQLiteQueryBuilder already supports a "strict" mode to help catch
SQL injection attacks.  This change extends the builder to support
update() and delete() calls, so that we can help secure those
selection clauses too.

Extend it to support selection arguments being provided when
appending appendWhere() clauses, meaning developers no longer need
to manually track their local selection arguments along with
remote arguments.

Extend it to support newer ContentProvider.query() variant that
accepts "Bundle queryArgs", and have all query() callers flow
through that common code path.  (This paves the way for a future
CL that will offer to gracefully extract non-WHERE clauses that
callers have tried smashing into their selections.)

Updates ContentValues to internally use more efficient ArrayMap.

Bug: 111268862
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Merged-In: I60b6f69045766bb28d2f21a32c120ec8c383b917
Change-Id: I60b6f69045766bb28d2f21a32c120ec8c383b917
2018-12-01 17:23:04 -07:00
Jeff Sharkey
2ea404fd2a Merge "Method to determine isolated storage mode." 2018-12-01 22:37:35 +00:00
Philip P. Moltmann
a3e358cf9f Expose API needed for apps to use work profiles.
Bug: 120303361
Test: Built
Change-Id: I5e4cd1450bb284321711558a4475e872d14022ff
2018-12-01 09:32:12 -08:00
Philip P. Moltmann
2a01ddbb4e Give platform permissions a dummy group
We still don't want apps to deal with permissions groups but many apps
crash if the group is not set.

Test: android.permission2.cts.PermissionPolicyTest#testPlatformPermissionPolicyUnaltered
Change-Id: Ibc817d4d44a9a76a1c5fac170f8e76f96a9e4201
Fixes: 119836955
2018-12-01 07:58:25 -08:00
TreeHugger Robot
4a18273991 Merge "Deprecate getPreferredPackages() and related APIs" 2018-12-01 05:50:31 +00:00
TreeHugger Robot
031eef2fef Merge "Expose RenderNode#getUniqueId() as View#getUniqueDrawingId()" 2018-12-01 05:44:59 +00:00
TreeHugger Robot
5cf6abedcb Merge "Make TextView.isSingleLine public" 2018-11-30 22:42:28 +00:00
Nikita Dubrovsky
18a87693a0 Deprecate getPreferredPackages() and related APIs
The APIs for "preferred" packages and activites have been superseded
by modern activity-based preferences.

Bug: 120291723
Test: build (javadoc-only change)
Change-Id: I4242a10e1612f7e203256e4c26c5e8c518cc7656
2018-11-30 21:25:13 +00:00
Soonil Nagarkar
1e59a5f3e9 Add ignoreLocationSettings to WifiScanner
Give WifiScanner an API to ignore location settings while wifi scanning
for certain requests.

Bug: 119140584
Test: manually
Change-Id: I9bc4cf38c3ea720193dcc87f2c8494afd89a36ec
2018-11-30 13:18:59 -08:00
TreeHugger Robot
e444d218b7 Merge "Revert "Allow location provider to deep link into permissions UI"" 2018-11-30 21:04:35 +00:00
Jeff Sharkey
10887d5e5a Add support for "Audiobooks".
Bug: 113356944
Test: manual
Change-Id: Ifed54c41a533ed2d556dc6561ea498ec293991a6
2018-11-30 13:53:19 -07:00