Commit Graph

300 Commits

Author SHA1 Message Date
Julia Reynolds
0e497230d9 Merge "Add settings page for notification channel groups" 2017-09-01 12:49:39 +00:00
Julia Reynolds
0c3f4bce57 Add settings page for notification channel groups
Bug: 63927402
Test: tests/unit/src/com/android/settings/notification/.*
Change-Id: Iebf7d8ba54f0cf5801a42f3161354d3cc5e5c848
2017-08-31 11:02:36 -04:00
Doris Ling
d47606ab6d Move tests from tests/app/ to tests/unit/
- second round, move all remaining items
- removed SoundSettingsIntegrationTest and DashboardAdapterTest as they
are obsolete.

Fixes: 62103184
Test: make SettingsUnitTests
Change-Id: Idc2eeb285acd209ef2d00c5451fff697002e1734
2017-08-29 15:32:53 -07:00
Stephen Chen
0246cd8a40 Merge "Add a "Add Network" button to SavedAccessPointsWifiSettings" into oc-mr1-dev am: a78eeb2d61
am: 31deb9a766

Change-Id: Ibd4f9959af5c5c1bde51ce1b9285531880301daa
2017-08-24 02:17:10 +00:00
Stephen Chen
dc1add0c61 Add a "Add Network" button to SavedAccessPointsWifiSettings
Bug: 36719359
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/SavedNetworkSettingsTest.java
Test: Open saved networks from WifiSettings. Ensure that exiting and
resuming the activity keeps the "Add Network" button on the bottom of
the network list. This is tested through the cases where networks are
forgotten/saved before resuming, and that pausing/resuming when the dialog
is open or closed does not affect the result.

Change-Id: Ib719a1f6b9468c0f8f44470eeed9144904672cf1
2017-08-17 14:00:30 -07:00
TreeHugger Robot
65e557754e Merge "onConnectedChanged should not update access points" 2017-08-10 23:35:07 +00:00
Doris Ling
109bb5e59a Move tests from tests/app/ to tests/unit/
- first round: move tests that currently pass

Bug: 62103184
Test: make SettingsUnitTests
Change-Id: Ief3adf88e5090621e5ec3957a71d1b56b4be186a
2017-08-09 17:12:46 -07:00
Sundeep Ghuman
45bb3a1a77 onConnectedChanged should not update access points
In WifiSettings, invocation of onConnectedChanged should not update
access points. This is controller by another callback,
onAccessPointsChanged. Furthermore, this is fired before any changes
have even been made to the AccessPoints.

This is exacerbating a problem where old scan results are not shown in
the WifiPicker, or sometimes the platform does not return any scan
results.

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Ibbc067d9952525b4edd85389996509e9b17bb1bd
2017-07-31 13:23:02 -07:00
Antony Sargent
1e69f27a41 Merge "Allow open password dialog for wrong-password wifi access points" into oc-dr1-dev
am: 9fb7a3b8b4

Change-Id: Ic44e0cf3972085439a603e25374d46447ebe7a8f
2017-07-26 16:18:50 +00:00
TreeHugger Robot
9fb7a3b8b4 Merge "Allow open password dialog for wrong-password wifi access points" into oc-dr1-dev 2017-07-26 10:53:30 +00:00
Antony Sargent
c00fedc639 Allow open password dialog for wrong-password wifi access points
When we're failing to connect to a wifi access point due to an incorrect
password, we want to allow an intent from a notification to open up the
wifi settings page and bring up the dialog for entering a different
password. We already have code in settings to do this for not-yet-saved
access points, so this CL just changes it slightly to also allow it for
saved access points.

Unfortunately WifiSettings can't be tested with Robolectric due to it
not supporting PreferenceScreen, so this adds a test to
WifiSettingsUiTest. There were some existing test failures in that file
which I've fixed while I was in there:

-The TestAccessPointBuilder class wasn't being found at runtime because
 it was getting stripped out at build time due to not being used in
 settings.

-The changingSecurityStateOnApShouldNotCauseMultipleListItems test was
 asserting that we don't end up with multiple entries for the same SSID
 in the access point list when changing the security state for the AP,
 but it was accidentally passing multiple AP's with the same name the
 first time.

Bug: 33245941
Test: runtest --path WifiSettingsUiTest.java
Change-Id: I16c9c8b0d8380a0e26f9b23df6a8d012af6a2476
Merged-In: I929ca6892242059df157c01d6e9ea30e8d1c5e78
2017-07-26 07:00:51 +00:00
Antony Sargent
5d137f0f2c Allow open password dialog for wrong-password wifi access points
When we're failing to connect to a wifi access point due to an incorrect
password, we want to allow an intent from a notification to open up the
wifi settings page and bring up the dialog for entering a different
password. We already have code in settings to do this for not-yet-saved
access points, so this CL just changes it slightly to also allow it for
saved access points.

Unfortunately WifiSettings can't be tested with Robolectric due to it
not supporting PreferenceScreen, so this adds a test to
WifiSettingsUiTest. There were some existing test failures in that file
which I've fixed while I was in there:

-The TestAccessPointBuilder class wasn't being found at runtime because
 it was getting stripped out at build time due to not being used in
 settings.

-The changingSecurityStateOnApShouldNotCauseMultipleListItems test was
 asserting that we don't end up with multiple entries for the same SSID
 in the access point list when changing the security state for the AP,
 but it was accidentally passing multiple AP's with the same name the
 first time.

Bug: 33245941
Test: runtest --path WifiSettingsUiTest.java
Change-Id: I929ca6892242059df157c01d6e9ea30e8d1c5e78
2017-07-25 20:25:59 +00:00
Evan Laird
de5d2e8894 Merge "Fix Settings manifest pointing to old class namespace" into oc-dr1-dev am: a9e2d97004
am: bc562b1888

Change-Id: I9c33400aa612b7c44b9199ef8564889d8a128a1b
2017-07-20 20:50:57 +00:00
Evan Laird
e99586cfea Merge "Fix Settings manifest pointing to old class namespace" into oc-dr1-dev
am: a9e2d97004

Change-Id: I596d700d10a29640344d4554824a29eb21e71cf1
2017-07-20 20:37:47 +00:00
Evan Laird
22315adb60 Fix Settings manifest pointing to old class namespace
The string declaring the right fragment was never updated to the new
namespace.

Change-Id: I35809f2f35dbf290deeb69d1bc672b86f8d5a752
Fixes: 63677809
Test: make SettingsUnitTests && \
adb install -r out/target/product/<device>/data/app/SettingsUnitTests/SettingsUnitTests.apk && \
adb shell am instrument -w -e class \
com.android.settings.dream.DreamSettingsLaunchTest\
com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
2017-07-19 10:29:16 -04:00
Charles He
c22e4d68c8 Merge "Disable always-on VPN options if an app has opted out." 2017-07-18 18:47:34 +00:00
Malcolm Chen
6fef2fff5e Remove extra newline in AndroidManifest.
Remove extra newline in AndroidManifest which caused
android.settings.MOBILE_DATA_USAGE not received.

Bug: b/63670955
Test: testcase MobileDataUsageActivityTest
Change-Id: I4a4178141010b128e3d9c8c9721a51b81cbdffff
2017-07-14 15:05:20 -07:00
TreeHugger Robot
7eee73a0c8 Merge "Don't use framework strings for formatting file sizes" 2017-07-13 23:11:42 +00:00
Roozbeh Pournader
ded99003c4 Don't use framework strings for formatting file sizes
Modify various formatters to avoid using framework strings for
formatting file sizes.

Also update README instructions for running unit tests.

Bug: 36994779
Test: adb shell am instrument -w -e class com.android.settings.utils.FileSizeFormatterTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Test: make -j RunSettingsRoboTests
Change-Id: I4035f26d29408b64389892a4a2379b4823f8ac96
2017-07-12 15:58:21 -07:00
Daniel Nishi
e70a06a5d5 Merge "Fix filter bug for non-internal app filtering." into oc-dr1-dev am: bce83f8c71
am: eba886f045

Change-Id: Ib1b6f17ef73222cfeebe163c6a43112f74ffa898
2017-07-12 17:33:32 +00:00
Daniel Nishi
6f3900f6b5 Fix filter bug for non-internal app filtering.
By default, the filter would show all non-categorized apps. This,
however, regressed the external storage apps view which does not have
categorization (yet). By adding back in a legacy option to use the old
purely UUID filtering, we can fix the regression.

Change-Id: I72d8d3bc08fbdff53374eb1e973bce9f8d7e2e79
Fixes: 63542896
Test: Settings unit test
2017-07-11 17:11:28 -07:00
Daniel Sheng
9a16e473ab Removed camera lift gesture settings UI.
Bug: 37154489
Test: make + manual + unit tests
Change-Id: Ifefa07d0e8e0de19d78303352c6f0e01dc1c52ab
Merged-In: I79e70dea12a65fefcb06aca3fd1891a95d856626
2017-07-05 20:24:12 -07:00
Daniel Sheng
11d240c300 Removed camera lift gesture settings UI.
Bug: 37154489
Test: make + manual + unit tests
Change-Id: I79e70dea12a65fefcb06aca3fd1891a95d856626
2017-07-05 18:04:10 -07:00
Shunta Sato
6d1bb15f3b Merge "Fix Wi-Fi list adds same AP repeatedly" into oc-dr1-dev am: 9638e020e5
am: 97419f8d52

Change-Id: I06a7a62ca94104bc0b108df1fa53660453a95375
2017-06-29 20:42:16 +00:00
TreeHugger Robot
9638e020e5 Merge "Fix Wi-Fi list adds same AP repeatedly" into oc-dr1-dev 2017-06-29 20:31:18 +00:00
Shunta Sato
22080a1df5 Fix Wi-Fi list adds same AP repeatedly
When switch AP security mode, several same APs are shown.

To fix this issue, append security type to preference
key for avoiding different APs have same key.
git fetch

Cherrypick of:
https://partner-android-review.googlesource.com/#/c/799829/

Bug: 37558394
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I39621636f14b29e45ba96ff76dc3c21a4996a136
2017-06-28 20:21:46 -07:00
Lei Yu
db62b52119 Merge "Add location check action for bt anomaly" into oc-dr1-dev am: a6b24388fc
am: 91dbfc6ee9

Change-Id: Ib7f5560b4ef44cb14bcf5e3633b09d179816b221
2017-06-28 18:13:20 +00:00
jackqdyulei
c14daa2370 Add location check action for bt anomaly
This cl adds action to turn off location permission for both
ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION by using API
in RuntimePermissionPresenter

Bug: 36921532
Test: runtest -x LocationCheckActionTest

Change-Id: Ibe1e2908bd745a137d92a70a8432e9f866c1be61
2017-06-27 16:21:50 -07:00
Charles He
fc1ce57b13 Disable always-on VPN options if an app has opted out.
The user can turn on / off always-on for individual VPN apps in
Settings > Network > VPN. Now that we're providing an opt-out of the
always-on feature for VPN apps, we should disabled the toggles if the
VPN app has an explicit opt-out.

Related unit tests are also removed as the check is now performed in the
frameworks, not in Settings.

Bug: 36650087
Test: CTS Verifier

Change-Id: I486fec14a1f8b86e7120dbdbfed3885801ab4dd7
2017-06-27 14:14:31 +01:00
Daniel Nishi
c758c52ab0 Count cache in storage categories. am: b22b85b593 am: 5837a9b98b
am: 41400d022c

Change-Id: Iee95e7d07f0642aec5bc478c8929bb4b50d3d3ec
2017-06-23 04:37:22 +00:00
Daniel Nishi
5837a9b98b Count cache in storage categories.
am: b22b85b593

Change-Id: I85b6ce492c34f67215dcb8539e7b88b02a9ef2fa
2017-06-23 04:19:19 +00:00
Daniel Nishi
b22b85b593 Count cache in storage categories.
This makes the System size more consistent because cache is not
attributed to the system (when the cache is under quota).

Change-Id: I680e70daf5e98b9a205023a218dfd1dcc8ee8334
Fixes: 62623731
Test: Settings Unit Test
2017-06-22 19:08:48 -07:00
Fan Zhang
9ef5f21b8a Merge "Load regulatory info from /data/misc" into oc-dr1-dev am: f964e8c3b2
am: 9f7227eb59

Change-Id: I2421dba06e793b62ed3abb2dde041b8d0e1f0d29
2017-06-23 01:47:45 +00:00
Fan Zhang
1bc7ac3bfa Load regulatory info from /data/misc
Bug: 62837579
Test: settings test
Change-Id: I84ef037174a1839993d02e8cd46d159398be1ddc
2017-06-22 20:13:21 +00:00
Daniel Nishi
d5f1b14d28 Merge "Add more sane multi-profile app attribution." into oc-dev am: 4743423a82 am: 2de5ab35f8
am: 72e8d24c10

Change-Id: I4606ad001b3742b8b9eec7d21c7296b0010b2430
2017-06-19 18:11:59 +00:00
Daniel Nishi
2de5ab35f8 Merge "Add more sane multi-profile app attribution." into oc-dev
am: 4743423a82

Change-Id: I59630cf77da700cd5a159e11ac6f9818f1303199
2017-06-19 17:55:28 +00:00
Daniel Nishi
4743423a82 Merge "Add more sane multi-profile app attribution." into oc-dev 2017-06-19 17:45:31 +00:00
Maurice Lam
33cad22f4f Merge "Make confirm lock screen use the right theme" into oc-dr1-dev am: 98a9d341c8
am: 9b8f36e359

Change-Id: I08f5a9da6f6fac3206a5bb6df2e2106e91033863
2017-06-16 22:42:26 +00:00
Maurice Lam
846172564e Make confirm lock screen use the right theme
Test: cd tests/robotests && mma
Bug: 62348472
Change-Id: Ie05c2e6adba8450a1092f0fefcad6b003398de7d
2017-06-16 13:02:36 -07:00
Daniel Nishi
b088010d12 Add more sane multi-profile app attribution.
Due to issues w.r.t. attribution across multiple users, we originally
duplicated the previous implementation which zeroed out the sizes. This,
however, caused system bloat due to the change in how we calculate the
system size.

By attributing apps which do not exist in the primary profile to the
first user that shows up with it installed, we can avoid accidentally
attributing it to the system size.

Bug: 62623731
Test: Settings unittest & Settings robotest
Change-Id: I9514c9ecef62ea6270723f62e6bf27c69b75f180
2017-06-15 17:25:10 -07:00
Maurice Lam
4c930fc2d5 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
(cherry picked from commit 0f897d79f6)
2017-06-15 20:23:21 +00:00
Sundeep Ghuman
f4bee3bb18 Allow WifiSettings to show old APs on app resume. am: 4ae59dde43
am: 6ab460c354

Change-Id: I1f3b7d405ea6e98d4cfa0a69b4468494f7867d4a
2017-06-15 04:24:26 +00:00
Sundeep Ghuman
60b814ba43 Allow WifiSettings to show old APs on app resume.
If we do not have any recent scan results, show the previous APs from
when the app was last paused, by not triggering a force update.

Accompanying changes are also made in WifiTracker to prevent
onAccessPointsChanged callbacks from being invoked until the tracker
receives a new 'SCAN_RESULTS_AVAILABLE' broadcast (ag/2409026).

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
one minute later.

Change-Id: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
Merged-In: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
2017-06-14 19:07:05 -07:00
Sundeep Ghuman
4ae59dde43 Allow WifiSettings to show old APs on app resume.
MANUAL MERGE of ag/2398149 to avoid merge conflicts when trying to
submit to oc-dev.

If we do not have any recent scan results, show the previous APs from
when the app was last paused, by not triggering a force update.

Accompanying changes are also made in WifiTracker to prevent
onAccessPointsChanged callbacks from being invoked until the tracker
receives a new 'SCAN_RESULTS_AVAILABLE' broadcast (ag/2409026).

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
one minute later.

Change-Id: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
2017-06-14 19:05:21 -07:00
TreeHugger Robot
f357f78eef Merge "Refactor hotspot into a full page" 2017-06-14 21:33:22 +00:00
Fan Zhang
78d5efdfea Refactor hotspot into a full page
- Deprecated WifiAPEnabler, and copied most of its logic into various
  controllers and WifiTetherSettings.
- Added tests

Fix: 37253404
Fix: 36181835

Test: make RunSettingsRoboTests
Change-Id: Iad994d61b694ad7f1113d045a3e7500eeaec178b
2017-06-14 12:32:44 -07:00
Maurice Lam
0f897d79f6 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
2017-06-12 18:03:02 -07:00
Fan Zhang
015c7706e4 Hide saved network preference when there is none.
We already do this when wifi is enabled. This change brings same
behavior when wifi is off.

Change-Id: I44301fe46a6183735f8be71c80cfe719ad0e82b4
Fix: 62094681
Test: runtest --path tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
2017-06-01 12:38:08 -07:00
Fan Zhang
c2b0c7bf31 Use a common style for custom preference icon layouts
Change-Id: Ief3bc54f700cb891041adf92846149c6f41caad0
Fix: 35961001
Test: instrumentation test
2017-05-31 17:09:15 -07:00
Jeff Sharkey
7c236a0c7e Merge commit '47eec246a9293616cb74d2c354be85201ec4e19e' into mergeit
Change-Id: I988ae328e0e9bb99b086490cf2ef48ca19779d13
2017-05-31 09:05:30 -06:00