Commit Graph

178 Commits

Author SHA1 Message Date
jackqdyulei
4076bae930 Disable ConnectedDeviceConnectedActivity
Only one connected device activity could be enabled at one time. This
cl disbale the new version but keep old version enabled in
AndroidMainfest.xml.

In this case tile could find correct activity at any time.

Bug: 69810208
Test: Build
Change-Id: I0175b968cc26e38d0549fe2302b762fe0bc65c20
2017-12-04 13:35:12 -08:00
Matthew Fritze
09ec9ae852 Fix unit test for PreferenceController
As we migrate to using BasePreferenceController,
we need to change the checks for PreferenceControllerMixin.

Change-Id: I68cc065b9ac5a39eec21b7979cdb527b13c9778a
Fixes: 69917609
Test: atest
2017-11-29 11:05:46 -08:00
TreeHugger Robot
6a68f306d7 Merge "Implement querySiteMapPairs for indexableProvider." 2017-11-28 19:38:32 +00:00
Fan Zhang
518e648acf Implement querySiteMapPairs for indexableProvider.
Query sitemap will return a list of pairs [parent class name, child
class name]. It's up to consumer to figure out the display name later
so the provider doesn't have dependency on localizing any display names.

- Removed SiteMapManagerTest. We will perform the test in
  SettingsIntelligence instead.
- Added test for the new provider in instrumentation test (robolectric
  doesn't recognize the new constants in framework yet)

Bug: 67359411
Bug: 64938328
Test: atest
Change-Id: Ia973115320e6b7c8cf84d4756db1763ae7010aed
2017-11-27 15:50:19 -08:00
yuemingw
7b1da61346 Block settings when DISALLOW_CONFIG_DATE_TIME.
Test: m -j RunSettingsRoboTests
runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/core/UserRestrictionTest.java

Fix: 67497909

After turn on the user restriction in TestDPC:
https://hsv.googleplex.com/5414119658225664
The date time settings page become:
https://hsv.googleplex.com/5199302573948928


Change-Id: I42590c4a505ec1b6ffa86eb460b90fa6ec8ba783
2017-11-22 19:53:18 +00:00
Julia Reynolds
8603c7ea62 Add owners files to notification test dirs
Test: make
Change-Id: I63778c68f1ab9edc36a9e12aa1729f8fd6a5e073
2017-11-20 16:40:47 +00:00
Fan Zhang
7d5c9ace64 Add test and fix null keys in search providers.
- Add keys to some screens.
- Remove dynamic saved network/turst agent from search provider.
- Remove dynamic print services from printsettings.

Bug: 69384409
Test: atest
Change-Id: I62dce27d52585badb2a8953a05084e35dbae2f7d
2017-11-16 12:57:45 -08:00
Fan Zhang
6c0c789460 Revert "Get rid of SearchIndexableResources entirely."
Fixes: 69266642

This reverts commit ba0077977f.

Change-Id: I9de6914f194a65ba627b2e5e805884f894fc044f
2017-11-13 22:48:49 +00:00
Fan Zhang
ba0077977f Get rid of SearchIndexableResources entirely.
Bug: 37741509
Test: robotests
Change-Id: I7e6dba5e13378beae632c838b7dd13acfdc50b10
2017-11-10 15:10:55 -08:00
Fan Zhang
b21112bd3d Add instrumentation test for SearchResultTrampoline intent.
Forgot to add this when creating intent-filter

Bug: 64938328
Test: atest
Change-Id: I8cfc26c2c589b2ae1942d365ed7dbca0da90d580
2017-11-10 12:25:47 -08:00
Fan Zhang
8068fda059 Add intent-filter to SearchResultTrampoline
Bug: 64938328
Test: atest
Change-Id: I3ac6506a6af3af9ff2bd60354ba23617b700ace8
2017-11-09 16:37:01 -08:00
Matthew Fritze
55ce64dcd9 Move Index provider conversion into Settings provider
Pre-patch, settings search provider would push all of its
fragments into to search via SearchIndexableResources with
an implicit contract of if the resource's xml == 0, then
it was a settings fragment with an Index provider.

One, implicit contract is bad. Two, it was messy at indexing time.

So this patch moves htat conversion into the search index provider.
Such that all of the indexables are either real Resources or Raw.

Change-Id: I39f4351c03d123bb9b45edb4df7f924cfaff2b38
Fixes: 65376542
Fixes: 37741509
Test: robotests
2017-11-07 11:18:26 -08:00
Fan Zhang
6438ee5466 Mark core unit tests for Presubmit
Bug: 68716631
Bug: 68720368
Test: rerun test
Change-Id: Ia8cca6aede824928fc358b005172bbe2ed670c8f
2017-10-31 14:09:31 -07:00
Fan Zhang
e261535192 Implement the missing PreferenceControllerMixin interface
Change-Id: I0bb28cf9d2ec24629485a754778faddcbc8f9fdb
Fixes: 68716631
Test: atest PreferenceControllerContractTest
2017-10-31 13:17:13 -07:00
TreeHugger Robot
11151f5052 Merge "Eliminate duplicate keys in pref xmls." 2017-10-28 19:39:28 +00:00
Fan Zhang
57ef92a810 Eliminate duplicate keys in pref xmls.
- Remove additional_system_update pref device_info page, we don't need
  it.
- Update keys in xml and Preference controller, and search index
  provider.
- Clean up in ScreenZoomPreference, it's anti-pattern to set fragment in
  constructor.
- Whitelist 2 that are super hard to remove.

Change-Id: Ibab6e2cb074513042a2ae007d9085aa64046eec8
Fixes: 67852637
Test: uniquePreferenceTest
2017-10-28 11:06:37 -07:00
Doris Ling
3977a6b482 Revert the way Special app access is launched.
- change it back to launch the fragment instead of intent activity.
- update the test case to launch special app access from Apps &
notifications page instead of directly launching it.

Change-Id: I61289ba0fa6cc4585c87cf337aa2007fb578450f
Fixes: 68397751
Test: visual, make SettingsUnitTests
2017-10-27 15:50:01 -07:00
TreeHugger Robot
295a6b42f4 Merge "Moved zenMode visual effects + automatic rule page" 2017-10-27 15:23:19 +00:00
Beverly
4359d4b9c9 Moved zenMode visual effects + automatic rule page
- Automatic zen rules have their own page like in N
- Minor string changes to page and add rule dialog
- Zen mode visual effects was moved into behavior settings

Bug: 63077372
Test: $ make SettingsUnitTests -j40
$ adb install -r ${OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk
$ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

Change-Id: I9635f8f7969b76d036bc06ec44705815e540777a
2017-10-27 09:49:04 -04:00
Fan Zhang
f2b3825a09 Merge "Add a test to enforce unique id for preferences (in search)" 2017-10-26 18:50:05 +00:00
Fan Zhang
7765067f33 Add a test to enforce unique id for preferences (in search)
Change-Id: I007ad2b9bf381c601f9375f14e32d4e2bc086942
Fixes: 67852637
Test: is a test
2017-10-26 09:47:35 -07:00
Malcolm Chen
13d50cb0f5 MSIM support for Wi-Fi calling setting.
UI change to support Wi-Fi calling settings for multi-SIM devices.

Bug: b/65648147
Test: manual
Change-Id: Ia2e3a835400873bf6d8bfc7a7690d98e74049076
2017-10-25 11:48:23 -07:00
Fan Zhang
a8cac7a409 Move ManageApplications to sub package and remove dead code
Bug: 64804294
Test: rerun test
Change-Id: I23cbd8da9b65f52470030ba3b9b676ece2bada11
2017-10-12 13:48:54 -07:00
Doris Ling
dee1a22c45 Consolidate all wrappers used for testing.
- Add the wrapper package and move all wrappers to the wrapper package.
- Get rid of some wrapper interface/impl implementation and have a
wrapper class directly.

Bug: 65634579
Test: make RunSettingsRoboTests
Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
2017-09-14 18:24:49 -07:00
Bill Yi
d732b0a4e6 Import translations. DO NOT MERGE
Change-Id: Iead27f9c66c6bce2c1f3b27c29cf2c703da6dac6
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-13 09:33:48 -07:00
TreeHugger Robot
7f541b8227 Merge "Clean up test strings" 2017-09-06 19:49:36 +00:00
Fan Zhang
a0372028f0 Clean up test strings
- Mark everything untranslatable to avoid TC confusion

Change-Id: Iea43b0f5f63253833d91aeaa11b3c463cd170741
Fixes: 65355069
Test: builds
2017-09-06 10:54:19 -07:00
Bill Yi
ef8151c8b3 Import translations. DO NOT MERGE
Change-Id: If965ef4d51917904739ed4726b036a285adc6d6d
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-06 08:15:05 -07:00
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