OSDN Git Service

android-x86/frameworks-base.git
5 years agoDelete INetworkManagementService#getNetdService.
Lorenzo Colitti [Tue, 11 Dec 2018 04:36:05 +0000 (13:36 +0900)]
Delete INetworkManagementService#getNetdService.

This code is unused.

Test: builds, boots
Test: atest frameworks-net
Change-Id: I45e796c0dd049e8ac722cc79eea8df81dd2ad28c

5 years agoMerge "Refactoring of deleting stats in NetworkStats based on uids."
Junyu Lai [Mon, 10 Dec 2018 05:15:28 +0000 (05:15 +0000)]
Merge "Refactoring of deleting stats in NetworkStats based on uids."

5 years agoMerge "Migrate INetd to stable aidl"
Luke Huang [Mon, 10 Dec 2018 03:07:08 +0000 (03:07 +0000)]
Merge "Migrate INetd to stable aidl"

5 years agoMerge "Remove ScopedBytes use"
Treehugger Robot [Sun, 9 Dec 2018 19:36:28 +0000 (19:36 +0000)]
Merge "Remove ScopedBytes use"

5 years agoMerge "Increase the IpClientTest timeouts to reduce flake rate."
Treehugger Robot [Sun, 9 Dec 2018 04:23:19 +0000 (04:23 +0000)]
Merge "Increase the IpClientTest timeouts to reduce flake rate."

5 years agoMerge "[CS] Add a generic transport-specific information API"
Etan Cohen [Sun, 9 Dec 2018 03:53:44 +0000 (03:53 +0000)]
Merge "[CS] Add a generic transport-specific information API"

5 years agoMerge "Frame EmergencyNumber notifier in TelephonyRegistry"
Shuo Qian [Sat, 8 Dec 2018 05:11:22 +0000 (05:11 +0000)]
Merge "Frame EmergencyNumber notifier in TelephonyRegistry"

5 years agoFrame EmergencyNumber notifier in TelephonyRegistry
sqian [Sat, 8 Dec 2018 01:09:39 +0000 (17:09 -0800)]
Frame EmergencyNumber notifier in TelephonyRegistry

Test: Treehugger
Bug: 112657134
Change-Id: I9e2e0348b8e0e9ac473db354023a242087fbb2c3
Merged-In: I9e2e0348b8e0e9ac473db354023a242087fbb2c3
(cherry picked from commit bdc5a733b76d25dab0393a3d4bfa823dc53121e7)

5 years agoMerge "Cleaned up dead code"
Jack Yu [Fri, 7 Dec 2018 21:36:48 +0000 (21:36 +0000)]
Merge "Cleaned up dead code"

5 years agoCleaned up dead code
Jack Yu [Tue, 4 Dec 2018 19:29:46 +0000 (11:29 -0800)]
Cleaned up dead code

Cleaned up dead code for CleanupDataConnection and
CleanupAllDataConnections. Also renamed the internal
version.

There is no logic change in this change.

Test: Unit tests and telephony sanity tests
Bug: 73659459
Merged-In: I3c9ed9502960c3f743f41078089cfff611cd96b0
Change-Id: I3c9ed9502960c3f743f41078089cfff611cd96b0
(cherry picked from commit 746d10446c77218b430e31ae0fcc0d0925bd45fc)

5 years ago[CS] Add a generic transport-specific information API
Etan Cohen [Tue, 27 Nov 2018 15:32:39 +0000 (07:32 -0800)]
[CS] Add a generic transport-specific information API

Add a generic transport-specific information container interface and
access methods. These can be used by a network factory to pass transport
(bearer)-specific network parameters to the app.

Bug: 117605977
Test: atest frameworks/base/tests/net/java/android/net (+new unit tests)
Change-Id: Ib7c83b677e1c02a2212265719813e648b0c9cc1b

5 years agoMerge "UnsupportedAppUsage - support implicit member signatures"
Paul Duffin [Fri, 7 Dec 2018 12:24:47 +0000 (12:24 +0000)]
Merge "UnsupportedAppUsage - support implicit member signatures"

5 years agoMerge "Revert "Schematize vold system properties""
Anthony Stange [Fri, 7 Dec 2018 12:04:56 +0000 (12:04 +0000)]
Merge "Revert "Schematize vold system properties""

5 years agoRevert "Schematize vold system properties"
Anthony Stange [Fri, 7 Dec 2018 11:43:03 +0000 (11:43 +0000)]
Revert "Schematize vold system properties"

This reverts commit 7bc31dc162dd6c97eeb4d85058a079a74bd8777b.

Reason for revert: Breaking aosp_master build.

Change-Id: I34a5e9889c17e3454a0a86deabcec3c192a3da52

5 years agoMerge "FRP: save password quality in DPM.resetPassword"
Treehugger Robot [Fri, 7 Dec 2018 11:09:41 +0000 (11:09 +0000)]
Merge "FRP: save password quality in DPM.resetPassword"

5 years agoMigrate INetd to stable aidl
Luke Huang [Fri, 23 Nov 2018 09:19:22 +0000 (17:19 +0800)]
Migrate INetd to stable aidl

Del the linking of old lib file and add new one.

Test: runtest frameworks-net passes
Change-Id: I7258f7c51718ff5f07e7bfe301b6c5f242b9da5a

5 years agoUnsupportedAppUsage - support implicit member signatures
Paul Duffin [Fri, 7 Dec 2018 10:40:38 +0000 (10:40 +0000)]
UnsupportedAppUsage - support implicit member signatures

Allows the signature of implicit members, i.e. members that are added
by the compiler, e.g. enum values() and valueOf(String) methods or
default constructors to be specified per class. The UnsupportedAppUsage
can now be repeated on a class so as to specify multiple implicit
members.

Bug: 119861512
Test: atest class2greylisttest, m -j20 framework
Change-Id: I73c8402e9c2053e3a04ef0ff8875ce446593ec8f

5 years agoMerge "Move netd related file group to the end for avoiding conflict"
Treehugger Robot [Fri, 7 Dec 2018 10:30:51 +0000 (10:30 +0000)]
Merge "Move netd related file group to the end for avoiding conflict"

5 years agoIncrease the IpClientTest timeouts to reduce flake rate.
Lorenzo Colitti [Fri, 7 Dec 2018 09:59:38 +0000 (18:59 +0900)]
Increase the IpClientTest timeouts to reduce flake rate.

Fix: 120131319
Test: atest FrameworksNetTests
Change-Id: Ibb70fa74c71608fd76e85636607e860dd58c404a

5 years agoMerge "Move DexLoadReporter setup before AppComponentFactory calls"
David Brazdil [Fri, 7 Dec 2018 09:04:56 +0000 (09:04 +0000)]
Merge "Move DexLoadReporter setup before AppComponentFactory calls"

5 years agoMove netd related file group to the end for avoiding conflict
Luke Huang [Fri, 7 Dec 2018 03:53:59 +0000 (11:53 +0800)]
Move netd related file group to the end for avoiding conflict

This patch should change no functionality.

Test: builded pass
Change-Id: I8161a9a365c6bfcd92f4b7a8fd641ad3a483d09c
Merged-In: If3e387ae9fcc22da7a4feca30c20391e5b236728

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 agoFRP: save password quality in DPM.resetPassword
Adrian Roos [Thu, 6 Dec 2018 16:50:41 +0000 (17:50 +0100)]
FRP: save password quality in DPM.resetPassword

When setting a password from DPM.resetPassword(), the actual quality of the
password was not passed to LockSettingsService (instead, the minimum required
quality was passed which is often UNSPECIFIED). As a result, during FRP we
would see inconsistent state and skip it.

Bug: 110172241
Test: Set credential via DPM.resetPassword(), factory reset device to trigger FRP, verify FRP shows.
Change-Id: I54376f60ac53451ace22965d331b47cd8c2e614e

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 agoRefactoring of deleting stats in NetworkStats based on uids.
junyulai [Mon, 29 Oct 2018 14:26:22 +0000 (22:26 +0800)]
Refactoring of deleting stats in NetworkStats based on uids.

In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d

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 agoMove DexLoadReporter setup before AppComponentFactory calls
David Brazdil [Mon, 3 Dec 2018 10:59:29 +0000 (10:59 +0000)]
Move DexLoadReporter setup before AppComponentFactory calls

BaseDexClassLoader has a callback for reporting all loaded secondary dex
files to DexManager. The callback needs to be set up:
(a) after the default app class loader is initialized, so as to not
report the app's main APK being loaded, and
(b) before control is handed over to the app for the first time, so as
to not miss any BaseDexClassLoader instantiations.

The latter used to mean setting up the callback before
Application.onCreate() but AppComponentFactory calls happen even
earlier. Hence move the call into LoadedApk where the borderline between
(a) and (b) lies.

Test: manually check dex loads from instantiateClassLoader are reported
Change-Id: I7961913de302bcede6c231304544d21d8db806a8

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"