OSDN Git Service

android-x86/frameworks-base.git
5 years agoFix missing schematized Car system properties
Inseob Kim [Wed, 21 Nov 2018 04:39:11 +0000 (13:39 +0900)]
Fix missing schematized Car system properties

Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: mma -j
Change-Id: Ib698d64d93a7bf4c1d9b7d8b883009b8de65ed09

5 years agoSchematize Car system properties
Inseob Kim [Wed, 21 Nov 2018 04:39:11 +0000 (13:39 +0900)]
Schematize Car system properties

Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: mma -j
Change-Id: I203861a78f48529434595c2e923c03d58b7e8299
Merged-In: I203861a78f48529434595c2e923c03d58b7e8299

5 years agoMerge "Schematize vold system properties"
Treehugger Robot [Fri, 7 Dec 2018 01:46:45 +0000 (01:46 +0000)]
Merge "Schematize vold system properties"

5 years agoMerge "Change owners of incidentd"
Mike Ma [Fri, 7 Dec 2018 01:28:40 +0000 (01:28 +0000)]
Merge "Change owners of incidentd"

5 years agoMerge "Add support for UHID_GET_REPORT requests"
Treehugger Robot [Thu, 6 Dec 2018 22:02:10 +0000 (22:02 +0000)]
Merge "Add support for UHID_GET_REPORT requests"

5 years agoMerge "address API council feedbacks for Telephony.Carriers"
Chen Xu [Thu, 6 Dec 2018 21:45:47 +0000 (21:45 +0000)]
Merge "address API council feedbacks for Telephony.Carriers"

5 years agoChange owners of incidentd
Mike Ma [Thu, 6 Dec 2018 21:40:24 +0000 (13:40 -0800)]
Change owners of incidentd

Test: NA
Change-Id: Ic651a13bb145610de2b668b6b235228e1e5151c1

5 years agoMerge "Fix validation problem in PhoneNumberRange"
Hall Liu [Thu, 6 Dec 2018 21:05:57 +0000 (21:05 +0000)]
Merge "Fix validation problem in PhoneNumberRange"

5 years agoMerge "Call netd to update the tcp buffer size"
Treehugger Robot [Thu, 6 Dec 2018 19:01:24 +0000 (19:01 +0000)]
Merge "Call netd to update the tcp buffer size"

5 years agoAdd support for UHID_GET_REPORT requests
Kim Low [Sat, 10 Nov 2018 01:15:13 +0000 (17:15 -0800)]
Add support for UHID_GET_REPORT requests

Updated to support UHID_GET_REPORT requests mainly for CTS use.
All feature reports are assumed to be static and should be specified
along with the register json.

For example, in sony_dualshock4_register.json, add the following.
  "feature_reports": [
    {
      "id": 5,
      "data": [0x05, 0x1e, 0x00, 0x05, 0x00, 0xe2, 0xff, 0xf2, 0x22, 0xbe, 0x22, 0x8d, 0x22, 0x4f,
        0xdd, 0x4d, 0xdd, 0x39, 0xdd, 0x1c, 0x02, 0x1c, 0x02, 0xe3, 0x1f, 0x8b, 0xdf, 0x8c, 0x1e,
        0xb4, 0xde, 0x30, 0x20, 0x71, 0xe0, 0x10, 0x00, 0xca, 0xfc, 0x64, 0x4d]
    }
  ]

Test: Make sure build has hid-sony driver that's backported from >4.10.
    Run Dualshock4 CTS
        > atest cts/tests/tests/hardware/src/android/hardware/input/cts/tests/SonyDualshock4TestCase.java

Change-Id: Ib0d534d47c6aa6fcc11af68b913c3db1cfa72752

5 years agoMerge "Track debug key changes in libcore/"
Neil Fuller [Thu, 6 Dec 2018 12:42:43 +0000 (12:42 +0000)]
Merge "Track debug key changes in libcore/"

5 years agoMerge "Rename hiddenapi config files"
David Brazdil [Thu, 6 Dec 2018 10:11:09 +0000 (10:11 +0000)]
Merge "Rename hiddenapi config files"

5 years agoMerge "Catch egl errors when drawIntoSurfaces"
Treehugger Robot [Thu, 6 Dec 2018 07:52:46 +0000 (07:52 +0000)]
Merge "Catch egl errors when drawIntoSurfaces"

5 years agoMerge "Move EnableDebuggger from ART to zygote"
Treehugger Robot [Thu, 6 Dec 2018 07:06:25 +0000 (07:06 +0000)]
Merge "Move EnableDebuggger from ART to zygote"

5 years agoFix validation problem in PhoneNumberRange
Hall Liu [Wed, 5 Dec 2018 21:57:42 +0000 (13:57 -0800)]
Fix validation problem in PhoneNumberRange

Regexes weren't matching empty strings (which are perfectly valid) for
the various arguments in the ranges. Fix it so that they do match.

Bug: 119675160
Test: GTS
Change-Id: I4ea0f65b62af9fd35612e5261e01b2bea07c8ddc

5 years agoMerge "UpdateAvailableNetworks apis"
Treehugger Robot [Wed, 5 Dec 2018 19:16:39 +0000 (19:16 +0000)]
Merge "UpdateAvailableNetworks apis"

5 years agoMerge "Add AIDL for number verification request API"
Hall Liu [Wed, 5 Dec 2018 18:29:47 +0000 (18:29 +0000)]
Merge "Add AIDL for number verification request API"

5 years agoMerge "support per carrier based iso country code."
Chen Xu [Wed, 5 Dec 2018 18:03:08 +0000 (18:03 +0000)]
Merge "support per carrier based iso country code."

5 years agoRename hiddenapi config files
David Brazdil [Tue, 13 Nov 2018 16:48:23 +0000 (16:48 +0000)]
Rename hiddenapi config files

Rename files to reflect new API list naming convention:
  light-greylist => greylist
  max-sdk-p-blacklist => greylist-max-p

This also removes unused files (private-dex.txt, public-dex.txt,
removed-dex.txt) and merges vendor.txt into greylist.txt.

Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Merged-In: I4922ecb011a03bef3fa105f8181d1851d2cc496a
Change-Id: I4922ecb011a03bef3fa105f8181d1851d2cc496a

5 years agoMerge "Hide eject icon of removable media when it's emulated volume"
Jeff Sharkey [Wed, 5 Dec 2018 16:19:05 +0000 (16:19 +0000)]
Merge "Hide eject icon of removable media when it's emulated volume"

5 years agoMove EnableDebuggger from ART to zygote
Orion Hodson [Wed, 5 Dec 2018 12:28:53 +0000 (12:28 +0000)]
Move EnableDebuggger from ART to zygote

Bug: 120485385
Test: cts
Change-Id: I17dc7048b3b1c4acb0b5816c45b52f9523a480ca

5 years agoMerge "Support multiple DcTracker for IWLAN refactoring"
Jack Yu [Wed, 5 Dec 2018 08:20:22 +0000 (08:20 +0000)]
Merge "Support multiple DcTracker for IWLAN refactoring"

5 years agoMerge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl"
Luke Huang [Wed, 5 Dec 2018 05:55:49 +0000 (05:55 +0000)]
Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl"

5 years agosupport per carrier based iso country code.
chen xu [Sun, 2 Dec 2018 22:14:15 +0000 (14:14 -0800)]
support per carrier based iso country code.

1. apply carrierid-to-countrycode as an override table on
top of mcc-to-countrycode table which is coarse and inaccurate
especailly for dual ISMI SIM
2. persist country iso to simInfo db and notify change through
public API onSubscriptionChangedListener

Bug: 64775297
Bug: 110559381
Test: Build
Change-Id: I3ec2d90d9ce8dfba1418358de62eb4d099234757

5 years agoAdd AIDL for number verification request API
Hall Liu [Fri, 30 Nov 2018 22:48:50 +0000 (14:48 -0800)]
Add AIDL for number verification request API

Add the new method to ITelephony and call it in the
requestNumberVerification API.

Bug: 119675160
Test: GTS later + testapps
Change-Id: I89baba023cdae746bc4afd96432f8348114d47cf

5 years agoSupport multiple DcTracker for IWLAN refactoring
Jack Yu [Mon, 26 Nov 2018 19:20:26 +0000 (11:20 -0800)]
Support multiple DcTracker for IWLAN refactoring

If the device is configured as AP-assited mode, multiple
DcTrackers will be created for each corresponding
data service. For legacy mode, only one DcTracker will
be created.

Test: Unit tests and telephony sanity tests
Bug: 73659459

Merged-In: I9f6afd65093dd1c65841466c6ff063717bb5bdaa
Change-Id: I9f6afd65093dd1c65841466c6ff063717bb5bdaa
(cherry picked from commit 21096187156c0b2e40d1e943cb250fbdca9de022)

5 years agoSchematize vold system properties
Inseob Kim [Thu, 8 Nov 2018 04:13:54 +0000 (13:13 +0900)]
Schematize vold system properties

Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
Merged-In: I8e04f643197b6c8a60cc38c6979e41c5de3469f5

5 years agoMerge "add nazaninb to OWNERS files"
Treehugger Robot [Wed, 5 Dec 2018 00:02:13 +0000 (00:02 +0000)]
Merge "add nazaninb to OWNERS files"

5 years agoUpdateAvailableNetworks apis
Sooraj Sasindran [Tue, 30 Oct 2018 16:42:53 +0000 (09:42 -0700)]
UpdateAvailableNetworks apis

Provide API to inform available networks

Bug: 117982838
Test: make and unit test
Merged-In: I9de1f767560551914de80031c1675d7e03b09775
Change-Id: I9de1f767560551914de80031c1675d7e03b09775

5 years agoTrack debug key changes in libcore/
Neil Fuller [Tue, 4 Dec 2018 21:17:29 +0000 (21:17 +0000)]
Track debug key changes in libcore/

Add ".source" to the debug key for the time zone update
via APK data:

i.e.
core_library.timezone>.source<.data_status

Bug: 118242715
Test: adb shell dumpsys runtime
Change-Id: I0f19faeef08ed19fe5482727280a17b49d8f923b

5 years agoMerge "Add API scaffolding for number verification"
Hall Liu [Tue, 4 Dec 2018 17:58:28 +0000 (17:58 +0000)]
Merge "Add API scaffolding for number verification"

5 years agoadd nazaninb to OWNERS files
Nazanin Bakhshi [Tue, 4 Dec 2018 17:37:59 +0000 (09:37 -0800)]
add nazaninb to OWNERS files

Bug: 120484065
Test: notest
Change-Id: I5821ee81148b611520e1a56d2ce187b4d18d5d01

5 years agoMerge "Add OWNERS for upcoming MediaStore work."
Jeff Sharkey [Tue, 4 Dec 2018 16:44:00 +0000 (16:44 +0000)]
Merge "Add OWNERS for upcoming MediaStore work."

5 years agoAdd OWNERS for upcoming MediaStore work.
Jeff Sharkey [Tue, 4 Dec 2018 16:09:40 +0000 (09:09 -0700)]
Add OWNERS for upcoming MediaStore work.

Also match contents of internal branch and alphabetize.

Bug: 113356944
Test: manual
Merged-In: I98245fe411295b6112cdc73a13baf2ac70edeb9d
Merged-In: I369767557ae023c0a7cdaf7cde46ad65c11bb6de
Change-Id: Ie48f2f70973e468d95fbbfa9fb56449dfa910b66

5 years agoMerge "Make ANDROID_RUNTIME_ROOT a required env variable"
Neil Fuller [Tue, 4 Dec 2018 12:39:16 +0000 (12:39 +0000)]
Merge "Make ANDROID_RUNTIME_ROOT a required env variable"

5 years agoMerge changes from topic "apex_adb"
Treehugger Robot [Tue, 4 Dec 2018 12:29:06 +0000 (12:29 +0000)]
Merge changes from topic "apex_adb"

* changes:
  Add MATCH_APEX flag to getInstalledPackages.
  Rename APEX installPackage method to stagePackage.
  Initial support for installing APEX via adb.

5 years agoMerge "hiddenapi: Add constants for 'greylist-max-p'"
David Brazdil [Tue, 4 Dec 2018 10:07:59 +0000 (10:07 +0000)]
Merge "hiddenapi: Add constants for 'greylist-max-p'"

5 years agoMerge "Add a service for reporting runtime debug info"
Neil Fuller [Tue, 4 Dec 2018 08:10:34 +0000 (08:10 +0000)]
Merge "Add a service for reporting runtime debug info"

5 years agoMerge "Fix ExifInterface for .heic when meta is at the end"
Treehugger Robot [Tue, 4 Dec 2018 02:51:07 +0000 (02:51 +0000)]
Merge "Fix ExifInterface for .heic when meta is at the end"

5 years agoMerge "C++17 is the default now."
Treehugger Robot [Tue, 4 Dec 2018 01:14:30 +0000 (01:14 +0000)]
Merge "C++17 is the default now."

5 years agoMerge "Add telecom test-commands for maintaining role overrides."
Tyler Gunn [Tue, 4 Dec 2018 01:01:48 +0000 (01:01 +0000)]
Merge "Add telecom test-commands for maintaining role overrides."

5 years agoMerge "Re-factor state machine in NetworkMonitor"
Chiachang Wang [Tue, 4 Dec 2018 00:57:46 +0000 (00:57 +0000)]
Merge "Re-factor state machine in NetworkMonitor"

5 years agoMerge "update comments for resetRadioConfig and rebootRadio"
Chen Xu [Mon, 3 Dec 2018 22:58:57 +0000 (22:58 +0000)]
Merge "update comments for resetRadioConfig and rebootRadio"

5 years agoAdd telecom test-commands for maintaining role overrides.
Tyler Gunn [Wed, 21 Nov 2018 23:11:36 +0000 (15:11 -0800)]
Add telecom test-commands for maintaining role overrides.

This allows for easier testing of role-dependencies for Telecom (since
RoleManager is not yet fully implemented).

Bug: 63966743
Test: Manual
Merged-In: I92fd86411d1312be2255ec0634f059cd8e4bfc26
Change-Id: I92fd86411d1312be2255ec0634f059cd8e4bfc26

5 years agoMerge "People don't read warnings."
Jeff Sharkey [Mon, 3 Dec 2018 20:20:38 +0000 (20:20 +0000)]
Merge "People don't read warnings."

5 years agoPeople don't read warnings.
Jeff Sharkey [Mon, 3 Dec 2018 17:56:56 +0000 (10:56 -0700)]
People don't read warnings.

Bug: 113136846
Test: manual
Change-Id: If7e313b4f0fa90875795b24817553bbd9a8c60ff

5 years agoC++17 is the default now.
Elliott Hughes [Mon, 3 Dec 2018 17:38:35 +0000 (09:38 -0800)]
C++17 is the default now.

Test: builds
Change-Id: I64495775afe4ded7d3312cc35a154fecba64adc3

5 years agoMerge "Display Hearing Aids name on UI tile"
Treehugger Robot [Mon, 3 Dec 2018 17:21:54 +0000 (17:21 +0000)]
Merge "Display Hearing Aids name on UI tile"

5 years agoAdd a service for reporting runtime debug info
Neil Fuller [Tue, 20 Nov 2018 19:37:22 +0000 (19:37 +0000)]
Add a service for reporting runtime debug info

Add a service for reporting runtime debug info via dumpsys.

With expected OEM customization / module versions in play
it makes sense to have runtime and associated "core library"
information in bug reports. The dumpsys information can also
be used from from host-side tests.

Bug: 119026403
Bug: 118242715
Test: adb shell dumpsys runtimeinfo
Change-Id: I62637a1c8bfd65d5de9b3e47b8700ead4bc314f2

5 years agoAdd MATCH_APEX flag to getInstalledPackages.
Dario Freni [Thu, 18 Oct 2018 10:49:50 +0000 (11:49 +0100)]
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

5 years agoRename APEX installPackage method to stagePackage.
Dario Freni [Wed, 7 Nov 2018 12:17:04 +0000 (12:17 +0000)]
Rename APEX installPackage method to stagePackage.

Test: adb install apex.test.apex  (succeeds)
Bug: 112669193

Merged-In: I8dc23d9d621d6a9fd5ee983eb6edbbe5ed13ad9a
Change-Id: I8dc23d9d621d6a9fd5ee983eb6edbbe5ed13ad9a

5 years agoInitial support for installing APEX via adb.
Dario Freni [Fri, 31 Aug 2018 13:18:04 +0000 (14:18 +0100)]
Initial support for installing APEX via adb.

Test: adb install package-signed.apex (succeeds)
adb install package-unsigned.apex (fails)
Merged-In: I3ac7971ce6923511a7d574291fe9002c5d55fa1b

Change-Id: I53bd15286b62a2a4ae6c2c5746b2ed039bc6ff77

5 years agoRe-factor state machine in NetworkMonitor
Chiachang Wang [Mon, 3 Dec 2018 09:06:54 +0000 (17:06 +0800)]
Re-factor state machine in NetworkMonitor

In ProbingState, most events are deferred and never exited if
the probe complete message indicated that the probe timed out or
failed. It means it will need to remember to explicitly return
HANDLED or NOT_HANDLED in the ProbingState for every new
message. Thus, re-factor the design for better architecture.

Test: - atest FrameworksNetTests
      - manually test for state transition
Bug: 120014928
Change-Id: I18500b958b35383335fcdef6af4e08dbbdfdffb0

5 years agoMerge "Start using shared libraries class loader."
Nicolas Geoffray [Sun, 2 Dec 2018 20:39:38 +0000 (20:39 +0000)]
Merge "Start using shared libraries class loader."

5 years agoStart using shared libraries class loader.
Nicolas Geoffray [Thu, 15 Nov 2018 12:59:52 +0000 (12:59 +0000)]
Start using shared libraries class loader.

Change 1/2. Change 2/2 will setup the class loader namespace for
shared libraries.

This change sets up shared libraries class loaders for applications
and for dexopt.

bug: 111174995
Test: DexoptUtilsTest, device boots
Exempt-From-Owner-Approval: PS1 was approved by owner, PS2 is a build fix.

(cherry picked from commit 8d144eb8bd3487a68c3a0cf58d9744e7d9e1d78b)
Merged-In: Ie9a2b4eaa85cda59951703433f7a2d03bc12095d

Change-Id: I76383308418485ad6739f8a404d02c2771e4afe4

5 years agoMerge changes from topic "sqlitez"
Treehugger Robot [Sun, 2 Dec 2018 01:30:04 +0000 (01:30 +0000)]
Merge changes from topic "sqlitez"

* changes:
  Support for appending "standalone" WHERE chunks.
  Bind update() args as Object[] for performance.
  Extend SQLiteQueryBuilder for update and delete.
  Execute "strict" queries with extra parentheses.
  Revert SQLiteQueryBuilder for now.
  Execute "strict" queries with extra parentheses.
  Add support for appending standalone phrases.
  GROUP BY and HAVING aren't ready to be strict.
  Extend SQLiteQueryBuilder for update and delete.

5 years agoSupport for appending "standalone" WHERE chunks.
Jeff Sharkey [Thu, 26 Jul 2018 20:36:59 +0000 (14:36 -0600)]
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

5 years agoBind update() args as Object[] for performance.
Jeff Sharkey [Thu, 26 Jul 2018 15:39:18 +0000 (09:39 -0600)]
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

5 years agoExtend SQLiteQueryBuilder for update and delete.
Jeff Sharkey [Wed, 25 Jul 2018 20:52:14 +0000 (14:52 -0600)]
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.

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: Ib4fc8400f184755ee7e971ab5f2095186341730c
Change-Id: Ib4fc8400f184755ee7e971ab5f2095186341730c

5 years agoExecute "strict" queries with extra parentheses.
Jeff Sharkey [Wed, 25 Jul 2018 20:01:59 +0000 (14:01 -0600)]
Execute "strict" queries with extra parentheses.

SQLiteQueryBuilder has a setStrict() mode which can be used to
detect SQL attacks from untrusted sources, which it does by running
each query twice: once with an extra set of parentheses, and if that
succeeds, it runs the original query verbatim.

This sadly doesn't catch inputs of the type "1=1) OR (1=1", which
creates valid statements for both tests above, but the final executed
query ends up leaking data due to SQLite operator precedence.

Instead, we need to continue compiling both variants, but we need
to execute the query with the additional parentheses to ensure
data won't be leaked.

Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111085900
Merged-In: I6e8746fa48f9de13adae37d2990de11c9c585381
Change-Id: I6e8746fa48f9de13adae37d2990de11c9c585381

5 years agoRevert SQLiteQueryBuilder for now.
Jeff Sharkey [Thu, 19 Jul 2018 15:30:16 +0000 (09:30 -0600)]
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

5 years agoExecute "strict" queries with extra parentheses.
Jeff Sharkey [Mon, 16 Jul 2018 22:53:45 +0000 (16:53 -0600)]
Execute "strict" queries with extra parentheses.

SQLiteQueryBuilder has a setStrict() mode which can be used to
detect SQL attacks from untrusted sources, which it does by running
each query twice: once with an extra set of parentheses, and if that
succeeds, it runs the original query verbatim.

This sadly doesn't catch inputs of the type "1=1) OR (1=1", which
creates valid statements for both tests above, but the final executed
query ends up leaking data due to SQLite operator precedence.

Instead, we need to continue compiling both variants, but we need
to execute the query with the additional parentheses to ensure
data won't be leaked.

Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Bug: 111085900
Merged-In: Ie85a95003ae134eef2fdfbf074c2f82d0a6a9f26
Change-Id: Ie85a95003ae134eef2fdfbf074c2f82d0a6a9f26

5 years agoAdd support for appending standalone phrases.
Jeff Sharkey [Mon, 16 Jul 2018 20:34:21 +0000 (14:34 -0600)]
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

5 years agoGROUP BY and HAVING aren't ready to be strict.
Jeff Sharkey [Mon, 16 Jul 2018 16:43:43 +0000 (10:43 -0600)]
GROUP BY and HAVING aren't ready to be strict.

Despite SQLite documentation saying these clauses follow the "expr"
syntax, queries will fail with obscure "row value misused" errors,
so remove the strict enforcement for now.

Test: manual
Bug: 111480817
Merged-In: Ib8cdcb4e6456110589203189fcfa14e75cd68718
Change-Id: Ib8cdcb4e6456110589203189fcfa14e75cd68718

5 years agoExtend SQLiteQueryBuilder for update and delete.
Jeff Sharkey [Fri, 13 Jul 2018 01:47:49 +0000 (19:47 -0600)]
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

5 years agoupdate comments for resetRadioConfig and rebootRadio
chen xu [Fri, 30 Nov 2018 08:35:31 +0000 (00:35 -0800)]
update comments for resetRadioConfig and rebootRadio

This operation is carrier/technology agnostic. Its currently used by
some cdma carriers e.g, OMADM but it doesn't mean its an no-op for GSM
carriers

Bug: 119118770
Test: Build
Change-Id: Iff31fc0afbb060a590b24bd19dc91cad3889e4fb

5 years agoMerge "BluetoothManager: Set DBG to false"
Treehugger Robot [Sat, 1 Dec 2018 04:44:09 +0000 (04:44 +0000)]
Merge "BluetoothManager: Set DBG to false"

5 years agoFix ExifInterface for .heic when meta is at the end
Chong Zhang [Fri, 30 Nov 2018 22:25:08 +0000 (14:25 -0800)]
Fix ExifInterface for .heic when meta is at the end

available() bytes is counted after the last read position,
after the seek to new position, size should be compared
with the avaliable directly (without adding position).

bug: 120086693
test: Open .heic files in Downloads/Photos that's either
very small (b/117625929, b/111897855), or with the meta
at the very end (b/120086693). There shouldn't be error
in ExifInterface.
Change-Id: I37ac57823b26f03bb0ba555ee6213cf999942d21

5 years agoDisplay Hearing Aids name on UI tile
Stanley Tng [Thu, 29 Nov 2018 21:47:45 +0000 (13:47 -0800)]
Display Hearing Aids name on UI tile

When the current device is a hearing aids, display the name under the
tile.

Bug: 117423826
Test: Manual testing on phone with hearing aids connected
Change-Id: Iab52ff944d356f6c8cd7a0062fc67a0d55010fd1
Merged-In: I98cfda7905763a3da3dbc1fbed13fee881da7bb2

5 years agoaddress API council feedbacks for Telephony.Carriers
chen xu [Wed, 28 Nov 2018 08:21:50 +0000 (00:21 -0800)]
address API council feedbacks for Telephony.Carriers

Bug: 118296421
Test: telephony unit test
Change-Id: Ib26db49e5fa6891c2176124681172c271e6cc423
Merged-in: Ib26db49e5fa6891c2176124681172c271e6cc423

5 years agoMerge "Remove static for getSubscriptionIds"
Shuo Qian [Fri, 30 Nov 2018 20:21:45 +0000 (20:21 +0000)]
Merge "Remove static for getSubscriptionIds"

5 years agoMerge "Fix AndroidCharacter.getDirectionalities for unassigned Unicode code points"
vichang [Fri, 30 Nov 2018 19:49:36 +0000 (19:49 +0000)]
Merge "Fix AndroidCharacter.getDirectionalities for unassigned Unicode code points"

5 years agoMerge "Fixed race condition in data connection"
Jack Yu [Fri, 30 Nov 2018 19:47:57 +0000 (19:47 +0000)]
Merge "Fixed race condition in data connection"

5 years agoMerge "Refactor hid command, mitigate overflows"
Treehugger Robot [Fri, 30 Nov 2018 19:29:22 +0000 (19:29 +0000)]
Merge "Refactor hid command, mitigate overflows"

5 years agoMerge "Actually check for READ_PHONE_STATE permission for Voicemail query"
Brad Ebinger [Fri, 30 Nov 2018 18:28:51 +0000 (18:28 +0000)]
Merge "Actually check for READ_PHONE_STATE permission for Voicemail query"

5 years agoMerge "Nullify the default wallpaper component if it does not exist"
Treehugger Robot [Fri, 30 Nov 2018 16:45:02 +0000 (16:45 +0000)]
Merge "Nullify the default wallpaper component if it does not exist"

5 years agoMerge "API: Make implicit APIs from type usage explicit"
Adrian Roos [Fri, 30 Nov 2018 16:25:06 +0000 (16:25 +0000)]
Merge "API: Make implicit APIs from type usage explicit"

5 years agoMerge "Fix max directionality in AndroidCharacter.getDirectionalities"
vichang [Fri, 30 Nov 2018 10:59:11 +0000 (10:59 +0000)]
Merge "Fix max directionality in AndroidCharacter.getDirectionalities"

5 years agoMerge "Turn hidden API lists into a single CSV"
David Brazdil [Fri, 30 Nov 2018 10:01:02 +0000 (10:01 +0000)]
Merge "Turn hidden API lists into a single CSV"

5 years agoNullify the default wallpaper component if it does not exist
SzuWei Lin [Thu, 22 Nov 2018 06:33:01 +0000 (14:33 +0800)]
Nullify the default wallpaper component if it does not exist

The default wallpaper component cannot be found after GSI is flashed.
The home screen background will have no wallpaper and be black.
It will also cause the following CTS tests to fail:

- KeyguardTests#testDialogShowWhenLockedActivity
- KeyguardTests#testTranslucentShowWhenLockedActivity

The patch will check if the package of the default component exists.
If not, it will fall back to null, which is the AOSP default value, and
display the wallpaper in framework resource.

Bug: 119895131
Bug: 111909699
Test: flash GSI aosp_arm64-userdebug on a crosshatch, got AOSP wallpaper
Test: flash full crosshatch-userdebug on a crosshatch, got crosshatch wallpaper
Change-Id: I9d618d05458a03a675324cb2f861decf31c5bf18

5 years agoMerge "Remove PARENT_SUB_ID since it's no longer needed."
Xiangyu/Malcolm Chen [Fri, 30 Nov 2018 04:16:29 +0000 (04:16 +0000)]
Merge "Remove PARENT_SUB_ID since it's no longer needed."

5 years agoMerge "API to switch preferred data"
Treehugger Robot [Fri, 30 Nov 2018 01:29:39 +0000 (01:29 +0000)]
Merge "API to switch preferred data"

5 years agoFixed race condition in data connection
Jack Yu [Wed, 28 Nov 2018 21:02:42 +0000 (13:02 -0800)]
Fixed race condition in data connection

Fixed that multiple threads are accessing
APN contexts associated with the data connection.

Test: Telephony sanity tests and unit tests
Bug: 120088861
Merged-In: Iffc840715684f4db78f3635b403e1b2772412099
Change-Id: Iffc840715684f4db78f3635b403e1b2772412099
(cherry picked from commit a7f9dce360e47df579c8bc4c526c0bf8358d4a00)

5 years agoAdd API scaffolding for number verification
Hall Liu [Wed, 28 Nov 2018 18:44:22 +0000 (10:44 -0800)]
Add API scaffolding for number verification

Add the PhoneNumberRange and NumberVerificationCallback classes. Add a
method in TelephonyManager to activate the API, but it does nothing for
now.

Bug: 119675160
Test: todo
Change-Id: I3ccd62b47f02a3aa324b675fdb16c8e7a1e9feec

5 years agoRefactor hid command, mitigate overflows
Siarhei Vishniakou [Mon, 16 Jul 2018 16:01:40 +0000 (17:01 +0100)]
Refactor hid command, mitigate overflows

Currently there are a few overflows possible in the hid command by
sending malformed json requests. Refactor the code to avoid these
overflows. These are mostly memcpy usage, where the size comes
(indirectly) from the size of the json array.
The json array must still be valid, because invalid json will produce an
earlier exception in the java layer.

Test: hid malformed_commands.json
The file "malformed_commands.json" can be found in the bug.
Bug: 111363077

Merged-In: I2f9dd31e0bfa2badc58779f40f4a80e025754cd2
(cherry picked from commit d54b70c8bfe393ef57445bd59962e6730b0b13c0)
Change-Id: I2f9dd31e0bfa2badc58779f40f4a80e025754cd2

5 years agoActually check for READ_PHONE_STATE permission for Voicemail query
Brad Ebinger [Thu, 29 Nov 2018 20:41:34 +0000 (12:41 -0800)]
Actually check for READ_PHONE_STATE permission for Voicemail query

We were not checking READ_PHONE_STATE permission when callers
were querying for the number of voicemails the user had for a
subscription.

Removes old ITelephony#getVoiceMessageCount method from graylist
because it hasn't been used since kitkat and does not allow for
READ_PHONE_STATE permission checks.

Bug: 119884553
Test: manual
Change-Id: Ic6c29b123e192caf663d0e0c8da559116d1a78c9

5 years agoMake ANDROID_RUNTIME_ROOT a required env variable
Neil Fuller [Fri, 23 Nov 2018 19:00:32 +0000 (19:00 +0000)]
Make ANDROID_RUNTIME_ROOT a required env variable

Make ANDROID_RUNTIME_ROOT a required environment variable
for AndroidRuntime.cpp.

Bug: 119935277
Test: build / treehugger
Change-Id: I1098b4d7de8a8642ca5f431ec56a3f086f22b44f

5 years agoMerge "add more comments for API getAidForAppType"
Chen Xu [Thu, 29 Nov 2018 19:07:32 +0000 (19:07 +0000)]
Merge "add more comments for API getAidForAppType"

5 years agoRemove PARENT_SUB_ID since it's no longer needed.
Malcolm Chen [Wed, 28 Nov 2018 19:15:57 +0000 (11:15 -0800)]
Remove PARENT_SUB_ID since it's no longer needed.

Bug: 120141126
Test: build and flash
Change-Id: Ie482ba707ecb8b02d6c8f9e3b8bcdc30c835878e
Merged-In: Ie482ba707ecb8b02d6c8f9e3b8bcdc30c835878e

5 years agoMerge "add setMetered in SubscriptionManager"
Xiangyu/Malcolm Chen [Thu, 29 Nov 2018 18:57:55 +0000 (18:57 +0000)]
Merge "add setMetered in SubscriptionManager"

5 years agoMerge "Add gps_debug.conf module"
Anton Hansson [Thu, 29 Nov 2018 15:53:07 +0000 (15:53 +0000)]
Merge "Add gps_debug.conf module"

5 years agohiddenapi: Add constants for 'greylist-max-p'
David Brazdil [Thu, 1 Nov 2018 09:54:25 +0000 (09:54 +0000)]
hiddenapi: Add constants for 'greylist-max-p'

New category of hidden API has been created. Update the script
generate_hiddenapi_lists.py with the new flag name.

Test: m, phone boots
Change-Id: I79e5478678880939e20e500cb8dad9b2a56fc84f

5 years agoTurn hidden API lists into a single CSV
David Brazdil [Tue, 30 Oct 2018 18:21:24 +0000 (18:21 +0000)]
Turn hidden API lists into a single CSV

Maintaining multiple text files has become too cumbersome as adding
each new category of API requires changes across many projects.
This patch changes generate_hiddenapi_lists.py to produce a single
CSV file in the format:

  <api_signature>,<flag1>,...,<flagN>

It can accept legacy API list files as input (for existing
frameworks/base/config/hiddenapi-*.txt files) as well as per-package
CSVs produced by class2greylist.

Test: m, check lists have not changed
Test: phone boots
Test: tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: Iebcef426ec93ea1d72b662bbff91d4e068fa0a70

5 years agoMerge changes from topic "libcore-remaining-hiddenapi"
Treehugger Robot [Thu, 29 Nov 2018 15:20:12 +0000 (15:20 +0000)]
Merge changes from topic "libcore-remaining-hiddenapi"

* changes:
  Prevent hiddenapi entries being added for libcore related projects
  Remove remaining libcore entries from light greylist

5 years agoAdd gps_debug.conf module
Anton Hansson [Tue, 27 Nov 2018 12:10:30 +0000 (12:10 +0000)]
Add gps_debug.conf module

Copy the gps_debug.conf from the device-specific folders to
a place closer to the code that uses it.

Bug: 112879252
Bug: 120066492
Test: make
Change-Id: I937e699cb9e891c511ca7b9f4740d45e19668c54
Merged-In: I937e699cb9e891c511ca7b9f4740d45e19668c54
Exempt-From-Owner-Approval: cp from internal
(cherry picked from commit 11905c6b2c8d2c7b3001cd913619d8b17c533ac1)

5 years agoPrevent hiddenapi entries being added for libcore related projects
Paul Duffin [Wed, 28 Nov 2018 12:22:14 +0000 (12:22 +0000)]
Prevent hiddenapi entries being added for libcore related projects

The libcore related projects (see below) have been (mostly) switched
over to use UnsupportedAppUsage annotations, This change will prevent
entries for those projects being added to a config/hiddenapi-* file.

* libcore
* external/bouncycastle
* external/conscrypt
* external/icu
* external/okhttp
* external/libphonenumber - still has a couple of entries in
      config/hiddenapi-light-greylist.txt due to limitations in
      UnsupportedAppUsage/class2greylist.

Tested by attempting to upload the file with entries for libcore
projects and without those entries and checking that the behavior
is expected.

Test: see above
Bug: 117818301
Change-Id: I67a30b307e12e842b28cfb2160fab0029868fa06

5 years agoRemove remaining libcore entries from light greylist
Paul Duffin [Tue, 27 Nov 2018 15:37:58 +0000 (15:37 +0000)]
Remove remaining libcore entries from light greylist

Removes the libcore entries that have been added since the previous
entries were removed. The entries are now specified using
UnsupportedAppUsage annotations.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: Ie2ab636f61697664eced59969d12aa46103d96a1

5 years agoMerge "Simpify logic in updateTcpBufferSizes"
Lucas Lin [Thu, 29 Nov 2018 08:29:30 +0000 (08:29 +0000)]
Merge "Simpify logic in updateTcpBufferSizes"

5 years agoMerge "Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord"
Jakub Pawlowski [Thu, 29 Nov 2018 07:21:01 +0000 (07:21 +0000)]
Merge "Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord"

5 years agoBluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord
Jakub Pawlowski [Wed, 28 Nov 2018 22:36:53 +0000 (23:36 +0100)]
Bluetooth: Fix NPE when accesing Manufacturer Data of invalid ScanRecord

Bug: 118805852
Test: compilation
Change-Id: I537bec61cd3e7df700cc972683458f977ff370b8