Commit Graph

2094 Commits

Author SHA1 Message Date
Lucas Lin
eb24608dbc Merge "Better notification to user when DNS-over-TLS is broken"
am: 81852c8481

Change-Id: I8be963e35ed5e5ba914c6d3504a52ccb789aaf29
2019-10-23 02:51:56 -07:00
lucaslin
783f221065 Better notification to user when DNS-over-TLS is broken
Provide a specifc notification to let users know that device
has no internet is because it really doesn't have internet access
or it's caused by private DNS resolution failed.

Bug: 113242081
Test: atest FrameworksNetTests
Change-Id: I710c88a4742f5fd56c39fc797d7fa3ad36dba553
2019-10-22 18:27:33 +08:00
Svet Ganov
484271bc7e [DO NOT MERGE] Update PermissionChecker usages to avoid unnecessary attribution.
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.

To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.

In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.

Test:
    atest com.android.settingslib.location.RecentLocationAppsTest
    atest CtsPermissionTestCases
    added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
    added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
    added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
    added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess

Bug:141028068
Change-Id: I89f4add79a55c3c8d6fbe8d57decaa78fe12f0f9
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
2019-10-14 17:22:30 +00:00
Svet Ganov
534b728a1e [DO NOT MERGE] Update PermissionChecker usages to avoid unnecessary attribution.
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.

To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.

In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.

Test:
    atest com.android.settingslib.location.RecentLocationAppsTest
    atest CtsPermissionTestCases
    added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
    added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
    added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
    added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess

Bug:141028068
Change-Id: I4a74d4906f92e323fbd30b9b25011129895afc9a
Merged-In: I89f4add79a55c3c8d6fbe8d57decaa78fe12f0f9
Merged-In: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
2019-10-14 17:15:38 +00:00
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -07:00
Neil Fuller
fbf9b6c05a Merge "Simplify APIs exposed for time zone lookups"
am: 19de70814a

Change-Id: I011145107f9b228272814bbdc73aa8fe35a0d984
2019-09-02 07:28:52 -07:00
Neil Fuller
e5700a7c49 Simplify APIs exposed for time zone lookups
The libcore.timezone APIs may form the basis for some
new SystemApis. Before starting that process the API
surface is being rationalized to establish the core
use cases.

Test: Treehugger
Bug: 139091367
Change-Id: Ib615976fae76ceb98873a33e1e995542e691c9d0
Merged-In: Ib615976fae76ceb98873a33e1e995542e691c9d0
(cherry picked from commit babab5cd6a)
2019-08-30 13:48:30 +01:00
Quang Luong
c825db1194 Do not set AccessPoint.ssid to config.SSID for Passpoint networks
On each WifiTracker scan, existing Passpoint AccessPoints are updated
by update(config) with a WifiConfiguration returned by the framework
and then updated with fresh scan results through setScanResults().
Since the Passpoint WifiConfigurations given to update(config) have
null SSID, the call to setScanResults() sets the config.SSID to the
SSID of the strongest scan result. However, update(config) also sets
AccessPoint.ssid to config.SSID, which means the UI may display a blank
SSID before the call to setScanResults() sets it to the correct SSID.
Thus, update(config) should not set AccessPoint.ssid to config.SSID if
the AccessPoint is for Passpoint.

Bug: 137282522
Test: manual - connect to Passpoint network, validate SSID in network
details page.
Change-Id: I2218c1217de3e4fe48e40114a3ea8ceab3d845f2
2019-07-16 14:46:52 -07:00
Malcolm Chen
ac56a4254e Provide @hide API to return merged IMSIs from grouping.
Bug: 135105735
Test: test app. Apply grouping and call the new API, to make sure
it returns correct values.

Change-Id: I99586976d3421d4b35be465201ee33cbb2dfd1d9
2019-07-11 13:19:36 -07:00
Lei Yu
68178f853b Merge "Use old API to build NetworkTemplate" into qt-dev
am: e5fdc968a0

Change-Id: I35702ae50d5274defd6974245bf1209ad3a0115f
2019-07-10 11:07:38 -07:00
Lei Yu
e5fdc968a0 Merge "Use old API to build NetworkTemplate" into qt-dev 2019-07-10 17:27:58 +00:00
Chienyuan
991b628a09 [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc am: df484ced0b am: 2a547afdfa am: b36f88020e am: 60aad1a06f
am: 5f70ebf52c

Change-Id: Id4c1a257b04515a03828a33229e5630c75c56ac2
2019-07-09 22:33:28 -07:00
Chienyuan
5f70ebf52c [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc am: df484ced0b am: 2a547afdfa am: b36f88020e
am: 60aad1a06f

Change-Id: I59696232bedf6bc978f66efd8f5df2ec2fb3336a
2019-07-09 22:23:46 -07:00
Chienyuan
60aad1a06f [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc am: df484ced0b am: 2a547afdfa
am: b36f88020e

Change-Id: I34205b247a3261c940c9704f8b3f03bd10ec3238
2019-07-09 22:06:03 -07:00
Chienyuan
b36f88020e [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc am: df484ced0b
am: 2a547afdfa

Change-Id: I0ec4664b3654fb0b8397a89b8948183413d7d522
2019-07-09 21:47:21 -07:00
Chienyuan
2a547afdfa [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc
am: df484ced0b

Change-Id: I174f1594f8f7ae21979398ba29b961e95bd47c75
2019-07-09 21:33:15 -07:00
Lei Yu
5e955861f9 Use old API to build NetworkTemplate
Use old API to be consistent with NetworkPolicyManagerService

Bug: 135105735
Test: RunSettingsLibRoboTests & Manual test
Change-Id: I5d04cfd962c3d09cac7d33a97f847771074ab258
2019-07-09 17:18:49 -07:00
Android Build Merger (Role)
df484ced0b [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855 am: 3aaf2811fc
Change-Id: Id1233680c478ff3367d69375056dd5d0bc1867ff
2019-07-09 07:11:53 +00:00
Android Build Merger (Role)
3aaf2811fc [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3 am: 181fb5b929 am: e6bf153855
Change-Id: Ieb2eab9943a3fde047fbfe947ccad105a5f7160d
2019-07-09 07:11:47 +00:00
Android Build Merger (Role)
181fb5b929 [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277 am: 9ac58f09c3
Change-Id: I231941e32409574af8c15fe9e763169fe09b279f
2019-07-09 07:11:36 +00:00
Android Build Merger (Role)
9ac58f09c3 [automerger] HidProfile: sync isPreferred() with HidHostService am: 830217f277
Change-Id: If9cb4de9ab510f1ddfff44a404a0a248cf9103dc
2019-07-09 07:11:28 +00:00
Chienyuan
830217f277 HidProfile: sync isPreferred() with HidHostService
HidHostService allow to connect when priority is PRIORITY_UNDEFINED.
HidProfile should return ture when priority is PRIORITY_UNDEFINED.
Otherwise, the "Input device" toggle in off state when HID device
connected.

Bug: 132456322
Test: manual
Change-Id: Id7bae694c57aec17e019d591c0a677e3cb64f845
2019-07-09 15:09:56 +08:00
Amin Shaikh
408d2d312d Update SignalDrawable X path drawing.
- Use config resources to specify svg path and cutout width / height
- Specify these resources for all 3 themes

Fixes: 133343689
Test: mp res sysuig; demo mode; manually change themes
Change-Id: Ic29e5da541330c1aa99b0e82e46a14dbb10d7940
2019-06-27 16:49:05 -04:00
Beverly
5090f7da48 Log Preference changes when value is a String
As long as the String can be converted to an integer

Test: atest SharedPreferenceLoggerTest
Fixes: 135937584
Change-Id: If58077c9c7b10373c4c2459d275add25a5bcdc05
2019-06-24 16:41:37 -04:00
Arc Wang
b85c1276c7 Merge "[Wi-Fi] Support transition mode in AccessPoint#matches" into qt-dev
am: 1b9e062d24

Change-Id: Ib87bdb31a9cb3996f8acc9966a51e1c171f3022f
2019-06-19 10:15:39 -07:00
Arc Wang
04bb4b82c6 [Wi-Fi] Support transition mode in AccessPoint#matches
When enrolling Wi-Fi network with Settings Wi-Fi QR code scanner,
it will compare Wi-Fi network information between QR code and
all reachable Wi-Fi networks before connecting.

This change supports to enroll Wi-Fi networks from a Wi-Fi AP
of transition mode.

Bug: 134706055
Test: Scan a QR code of open network, verify connection
      Scan a QR code of OWE network, verify connection
      Scan a QR code of WPA3 network, verify connection
      Scan a QR code of WPA3 network, verify transition mode connection

Change-Id: Ifc470cbcde7f33ffd76c9f6a8606cabda78a88cd
2019-06-19 11:20:58 +08:00
Amin Shaikh
efe9f0523d Merge "Invalidate SignalDrawable on level change." into qt-dev
am: fb5526ce13

Change-Id: I681e8c822dfcf612c949f1e92ff9120401bf49cb
2019-06-13 07:26:15 -07:00
Amin Shaikh
b7e99e1f33 Invalidate SignalDrawable on level change.
This regression was introduced by ag/7248138. Previously, changes to the
level always caused drawable invalidation, but currently invalidation
only occurs on signal level changes (not cutout or carrier change state
changes). This change fixes this behavior to invalidate the signal
drawable on all level changes.

Fixes: 134621165
Test: sysui demo mode
Change-Id: I5e14480a61fde5a0f7fdce781ae4a42a97e5d88a
2019-06-12 16:45:11 +00:00
Lifu Tang
f5076dfc51 Filter "Android System" from recent location apps
Bug: 134674484
Test: build, flash, and test manually
Change-Id: I86879e034b6605a4d3db2024f5e27601a45580fd
2019-06-10 22:05:04 +00:00
Quang Luong
8e13ea659e Merge "Made AccessPoint's scan result list thread safe" into qt-dev 2019-06-10 21:37:43 +00:00
Quang Luong
9574a1beb4 Made AccessPoint's scan result list thread safe
If wifi verbose logging is enabled, the main thread may iterate through
the scan result list while the worker thread updates it, resulting in
an ArrayIndexOutOfBounds exception. This change adds a lock to every
iteration through mScanResults and mExtraScanResults.

Bug: 134098126
Test: atest WifiTrackerTest && atest AccessPointTest
Change-Id: If42a9ad8031ff66b1732a79772ba441185f7a18f
2019-06-07 14:06:24 -07:00
Quang Luong
4c23e8cbfb Unsaved carrier wifi connection should display carrier in summary
Autoconnected carrier wifi should display "Connected via <carrier>"
in the wifi picker even if the network has not been saved.

Bug: 134525097
Test: atest AccessPointTest
Change-Id: Id28daec3f80124f5329386ef5ff2b32cda505355
2019-06-07 12:04:25 -07:00
Lei Yu
2a31c40e45 Use new API to build NetworkTemplate
This CL is built to make CBRS show correct data usage, by merging
all subscriberId under same groupuuid

Bug: 133865338
Test: RunSettingsLibRoboTests
Change-Id: I1c5084ff98ac9a71655cc93698f3e02268654977
2019-05-31 13:40:54 -07:00
Antony Sargent
c026de3dbf Move config for inflateSignalStrength
This moves the config files for determining the inflateSignalStrength
boolean into frameworks/base/core/res, and adds a utility method in
SettingsLib for retrieving it. This is needed so we can display
per-subscription signal strength icons in the DSDS header on the
Settings Network & internet page that match what SysUI shows.

Bug: 128855095
Test: manual, existing tests should pass
Change-Id: I57032f022439b2de3f7bf57757b2a49dc7eccfe1
2019-05-28 09:31:19 -07:00
Salvador Martinez
ade071d6c2 Merge "Add function to query last estimate time to Estimate" into qt-dev 2019-05-20 21:22:23 +00:00
Narayan Kamath
e1bbd0b1d2 Merge "SettingsLib: Add an API method to query whether a package is a system module." into qt-dev 2019-05-20 07:42:53 +00:00
Salvador Martinez
5b84fde6af Add function to query last estimate time to Estimate
This just adds a centralized place to query for the last update
time so that people don't implement it with different defaults
or something like that.

Test: in sister CL
Bug: 132751712
Change-Id: I10769eaa2e4c2ec613397988a264228a9474d1d6
2019-05-17 15:43:16 -07:00
Philip P. Moltmann
4f09b09f62 Merge "Whitelist all perms on installExistingPackage" into qt-dev 2019-05-17 19:56:19 +00:00
Lei Yu
b899f8abdd Merge "Add short version bluetooth device summary" into qt-dev 2019-05-16 18:18:45 +00:00
Xin Li
c76d117d2a DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Philip P. Moltmann
a4bd150588 Whitelist all perms on installExistingPackage
The code allows to also whitelist only a select set of permissions, but
this is not yet exposed in the API.

Also: Fix up shell commands for restricted permissions

Fixes: 132368462
Test: - Enabled app via device admin in secondary profile
        -> verified that permissions were whitelisted
      - Installed existing and new app using --restrictpermissions and
        not
	-> verified that permissions were whitelisted or not
      atest AppRestrictionsHelperTest
            RestrictedPermissionsTest
Change-Id: I9cd76c555b40663f2e25ad86e8a54991baae346c
Merged-In: I9787e63d8beb8f6b1ba2d15532d4c0f69dbdf863
2019-05-15 11:09:45 -07:00
Narayan Kamath
97e6c3afb0 SettingsLib: Add an API method to query whether a package is a system module.
Modules may not necessarily be hidden, but we would still like to
prevent them from being disabled as they may contain critical system
functionality.

Bug: 131927465
Test: atest ApplicationsStateTest

Change-Id: I38995ecce7f517642c51a1145b1fd294638cb786
2019-05-15 18:19:11 +01:00
Lei Yu
35fcd6b0e3 Merge "Use merged NetworkTemplate to query data usage" into qt-dev 2019-05-15 00:27:23 +00:00
TreeHugger Robot
90122592ff Merge "[OWE] Support OWE in transition mode" into qt-dev 2019-05-14 13:57:05 +00:00
TreeHugger Robot
9a78a2a88c Merge "Add a parameter to filter out system apps" into qt-dev 2019-05-14 00:07:28 +00:00
Lei Yu
e63ca1b857 Add short version bluetooth device summary
Bug: 132640667
Test: RunSettingsLibRoboTests
Change-Id: I38e7eb486238637bdacfaf6b1140f1a24b71a066
2019-05-13 16:17:29 -07:00
Hai Shalom
2195d1fc66 [OWE] Support OWE in transition mode
Support OWE in transition mode for devices with OWE support
and devices without OWE support. Scan results will return a
new type of network for OWE in transition networks on devices
that support OWE, and Open for devices that don't support OWE.
Handle the case where Open network is manually added to a device
that supports OWE.

Bug: 132139642
Test: Device with OWE: Connect to Open, OWE-Transition, OWE networks
Test: Device without OWE: Connect to Open, OWE-Transition
Test: Manually create Open network, connect to OWE-Transition
Change-Id: I29e69eaae2672562420ee7c6393bf2cc4d7f1b91
2019-05-13 15:37:43 -07:00
TreeHugger Robot
99a61d3b58 Merge "Update SignalDrawable to show X for empty state" into qt-dev 2019-05-13 19:05:34 +00:00
Lei Yu
c00a30eb8a Use merged NetworkTemplate to query data usage
This CL uses merged NetworkTemplate so that it shows correct
data for carrier which is a virtual that has multiple
subscriberId under the hood.

By doing this, this CL also adds several hidden API so settings
can query by NetworkTemplate directly.

Fixes: 120566366
Test: RunSettingsLibRoboTests
Change-Id: I8b747697933c75b48b14387adafb5ac9ca165926
2019-05-13 11:42:23 -07:00
TreeHugger Robot
c410ad8aca Merge "[WPA3] Fix typo in AP key comparison method" into qt-dev 2019-05-13 18:10:00 +00:00