Commit Graph

10323 Commits

Author SHA1 Message Date
Fan Zhang
9c1fcf9916 Move system update preference from device_info to system.
In order to move the preference and its logic cleanly, created a
controller object that encapsulates the preference/click handler.

Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I332384e20fbf0e21d2f3becb531d97b20f7f7ef1
2016-10-03 13:53:45 -07:00
Fan Zhang
4fe7c0859f Fix a NPE when rotating dialog created by DialogCreatable.
Bug: 30088727
Test: make RunSettingsRoboTests
Change-Id: I775899809dfe920daa294f70d646b141da7c0706
2016-10-03 13:50:59 -07:00
Fan Zhang
cc335d9509 Rearrange a few settings into System category page.
- Use activity-alias to define which activity shows up in what category.
  We choose activity-alias because it creates a reference to UI we need
  without having to define a new set of intent-filter and/or category
  keys. This reduces maintainence in the long run. We should merge
  metadata from activity-alias into targetActivity when cleaning up.

- Created new System dashboard activity that hosts all system category
  tiles dynamically, and a static tile for checking system update.

Bug: 31781480
Test: manual
Test: make RunSettingsRoboTests -j40
Change-Id: Ia2d762e3e1aebd17423a395c5e6c286dc3326492
2016-09-30 16:03:46 -07:00
jackqdyulei
0bfee2799d Add classloader for RtlCompatibleViewPager
To avoid BadParcelableException when reload the activity after it
is killed by OS.

Bug: 31707097
Test: make SettingsTests && adb install -r \
${OUT}/data/app/SettingsTests/SettingsTests.apk && \
adb shell am instrument -w \
'com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner'

Change-Id: Ic8f20d9e2d236f0bea96071a88fbc6e7ba856f54
2016-09-28 17:56:04 -07:00
TreeHugger Robot
eaec1622f5 Merge "Fix robolectric tests" 2016-09-27 23:25:33 +00:00
Stephen Chen
e9a91a9ab3 Merge "Fix cancel button behavior when setting data limit." 2016-09-27 23:02:00 +00:00
Steven Ng
d654c889b8 Merge "Provide fingerprint options for SET_NEW_PASSWORD intent" 2016-09-27 21:04:21 +00:00
Stephen Chen
a88733aed8 Fix cancel button behavior when setting data limit.
Bug: 28563526
Change-Id: I574c4051bb19710409ca4cf4eeffef7be1a7d0ec
Fixes: 28563526
Test: make RunSettingsRoboTests
2016-09-27 13:11:46 -07:00
Fan Zhang
081b549768 Fix robolectric tests
Fix: 31751980
Test: make RunSettingsRoboTests
Change-Id: Id787665d7cb44ee8a0c6ff52927394de1c3e9efc
2016-09-27 12:28:13 -07:00
TreeHugger Robot
8c46585218 Merge "Avoid over logging preference changes." 2016-09-27 18:24:29 +00:00
Steven Ng
4fdcec71dc Provide fingerprint options for SET_NEW_PASSWORD intent
1) Added a trampoline activity to display SET_NEW_PASSWORD intent.
2) On devices that have fingerprint sensor and have no enrolled fingerprint,
   ChooseLockGeneric handles the SET_NEW_PASSWORD intent by providing
   fingerprint + {PIN/PATTERN/PASSWORD} and skip fingerprint options.

Test: See below
1) Auto
   make RunSettingsRoboTests
2) Manual
   a) Fingerprint + pattern
      i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
      ii) Click Pixel Imprint + Pattern.
      iii) Set a pattern lock.
      iv) Can enroll a fingerprint.
   b) Pattern
      i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
      ii) Click Continue without Pixel Imprint
      iii) A list of unlock options, without fingerprint option, is shown.
      vi) Select and enroll a pattern lock
   c) Has an existing password
      i) $ adb shell am start -a android.app.action.SET_NEW_PASSWORD
      ii) Setting app asks for password input.
      iii) Enter password and click "Continue without Pixel imprint".
      vi) No password is asked. A list of unlock options, without fingerprint option, is shown.
      v) Select and enroll a pattern lock
   d) Work profile
      i) Create a work profile
      ii) adb shell am start --user x -a android.app.action.SET_NEW_PASSWORD. X is the work profile user id.
      iii) Click Pixel Imprint + Pattern.
      iv) Set a pattern lock.
      v) Can enroll a fingerprint.

Bug: 23017051
Change-Id: I6384bbffb72a5d3a83972da7474532746e4d06b9
2016-09-26 22:13:08 +01:00
jackqdyulei
0162daa651 Disable the control of draw over permission for SystemUI
Bug: 31077838
Test: make SettingsTests && adb install -r \
${OUT}/data/app/SettingsTests/SettingsTests.apk \
&& adb shell am instrument -w  \
'com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner'

Change-Id: I760590f5558f2d686ffbfe78234a8b08e13883fd
2016-09-26 13:22:04 -07:00
Fan Zhang
ad7023a406 Merge "Fix crash when changing data restriction for non-app UID." 2016-09-26 16:01:31 +00:00
Fan Zhang
2d6bf057f8 Avoid over logging preference changes.
When preference screen is created all prefence goes through
SharedPreferenceLogger once. We don't want to log it as preference
change because it's just initial display. Subsequent preference logger
calls should result in logging.

Bug: 30914916
Test: make RunSettingsRoboTests
Change-Id: Icaee9137c55555f4db7839ff0381a13ccd420190
2016-09-23 18:01:13 -07:00
Doris Ling
430025c4d6 Split Ambient Display settings. am: 1ad58d0abf am: f89766dbab
am: 0dfe46fe58

Change-Id: I33ffaa71c09cff7a4df496c42371519367e1772c
2016-09-24 00:35:24 +00:00
Doris Ling
0dfe46fe58 Split Ambient Display settings. am: 1ad58d0abf
am: f89766dbab

Change-Id: If17ab5951a9b8a2a5b68a1fcc2492de8a72f0c08
2016-09-24 00:07:17 +00:00
Doris Ling
f89766dbab Split Ambient Display settings.
am: 1ad58d0abf

Change-Id: Ie47c7504728bb225214ee8c348af8a154cb5a1f2
2016-09-24 00:05:17 +00:00
Daniel Nishi
fee35492b8 Use a config flag instead of a RO flag for showing Manage Storage. am: c0b33f70ed
am: bfe5afc270

Change-Id: I159cb08e7ef25802562603d4f8e297ffdf8d0f30
2016-09-23 22:34:22 +00:00
Doris Ling
1ad58d0abf Split Ambient Display settings.
1. Reverting the changes for Display->Ambient Display; this setting
   will control incoming notification pulse.
2. Added 2 separate entries in gestures settings to control pick up
   and double tap gestures-triggered pulsing for Ambient Display.
3. Added automated tests to verify the preference initializes to the
   correct default value, and also verify that toggling the preference
   updates the corresponding settings correctly.

Test: make SettingsTests

Bug: 30595437
Change-Id: I125bf75fc4ccfea126a00ffae4207fcb789f487a
2016-09-23 15:33:37 -07:00
Fan Zhang
13566f29a5 Fix crash when changing data restriction for non-app UID.
Change-Id: Ie622e8e22bade33050865fe4135534b27995d523
Fixes: 31708057
Test: make RunSettingsRoboTests
2016-09-23 15:14:18 -07:00
Fan Zhang
aa71afe597 Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
2016-09-23 08:37:37 -07:00
TreeHugger Robot
c8a0395766 Merge "Use MetricsFeatureProvider for condition/suggestion/search." 2016-09-22 23:56:28 +00:00
Stephen Chen
2b98ffaab8 Change Display summary to sleep timeout description.
Bug: 29579542
Fixes: 29579542
Change-Id: I4e122bd6972fde933229768cba86302eb4d3f7c6
Test: Added Robo test, manually tested
2016-09-22 13:55:32 -07:00
Fan Zhang
c93d18e29c Use MetricsFeatureProvider for condition/suggestion/search.
Bug: 31664539
Test: make RunSettingsRoboTests

This allows different metric clients to listen to these events.

Change-Id: Ib19c8099b16ff78d9aa4901278e0ff33eeefd4a8
2016-09-22 13:22:26 -07:00
Fan Zhang
f3b06ef8a0 Fix compile error when robotests references R.* in Settings
Test: make SettingsRoboTests
Change-Id: I85c8bb1b83fa9d1f487658b1bc5dc080f70efa2f
2016-09-22 10:54:15 -07:00
Fan Zhang
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Matthew Fritze
00368c3779 Merge "Update Robolectric tests to use google truth" 2016-09-21 16:12:20 +00:00
TreeHugger Robot
d97f64d082 Merge "Fix NPE when using VisibilityLogger." 2016-09-20 18:20:11 +00:00
Fan Zhang
45fb1199a2 Fix NPE when using VisibilityLogger.
Fix: 31612160
Test: make RunSettingsRoboTests
Change-Id: Ib040a40d27a76d9440f629ed4f768dc4bfde8ac2
2016-09-20 09:22:06 -07:00
Amin Shaikh
e5d373b044 Merge "Test for wallpaper preference layout crash." 2016-09-19 21:59:41 +00:00
Daniel Nishi
c0b33f70ed Use a config flag instead of a RO flag for showing Manage Storage.
Bug: 30455784
Test: make SettingsTests; run the instrumentation.
Change-Id: I860192c1c20fcaec2a5cbcdc085ff01dafa7351a
(cherry picked from commit 7f075a3c41)
2016-09-19 20:39:33 +00:00
Daniel Nishi
f83a21d0fc Merge "Use a config flag instead of a RO flag for showing Manage Storage." 2016-09-19 20:36:03 +00:00
Matthew Fritze
9a3dc4e2a8 Update Robolectric tests to use google truth
Bug: 31545801
Test: make RunSettingsRoboTests
Change-Id: Idb801d51b6a4dc02ea062bc32086e1a8fc28b94b
2016-09-19 11:42:11 -07:00
Fan Zhang
0b056c1bf6 Add tests for data warning related classes.
Bug: 26934313
Test: make RunSettingsRoboTests
Test: make & run SettingsUnitTests

Change-Id: I1e5ce91c02a9c9025afec4e07bb99e4830194a21
2016-09-19 11:16:01 -07:00
Daniel Nishi
7f075a3c41 Use a config flag instead of a RO flag for showing Manage Storage.
Bug: 30455784
Test: make SettingsTests; run the instrumentation.
Change-Id: I860192c1c20fcaec2a5cbcdc085ff01dafa7351a
2016-09-16 15:56:47 -07:00
TreeHugger Robot
19b062265e Merge "Extend MetricsFactory so it can log to different LogWriters" 2016-09-15 23:07:33 +00:00
Fan Zhang
66a9852a7b Extend MetricsFactory so it can log to different LogWriters
- Renamed MetricsFractory to MetricsFeatureProvider, and access it using
  FeatureFactory.
- Instead of containing exactly 1 logWriter, MetricsFeatureProvider now
  contain a list.
- Added OnAttach event in Lifecycle. This is needed when a mixin
  requires Context to initialize itself.
- Updated tests.

Bug: 29575437
Test: make RunSettingsRoboTests
Change-Id: I7cc1528b9a744cd40088701e2bd115f41a8bf744
2016-09-15 14:25:31 -07:00
Amin Shaikh
db01a3f0c0 Test for wallpaper preference layout crash.
Test: runtest --path tests/unit/src/com/android/settings/WallpaperPreferenceLayoutTest.java

Bug: 31489007
Change-Id: I3c8440e84f3c169ac97ab13efde7ea7fa2027352
2016-09-15 11:52:18 -07:00
jackqdyulei
e54dd3a0cd RTL: Navigate to previous tab when back.
When go back from RTL language, user should be navigated to the
previous setting tab.

Bug: 31145366
Test: make RunSettingsRoboTests

Change-Id: I2f2ec727f9737ea0e52dac9950c8af34559e3d9a
2016-09-15 11:22:53 -07:00
Matthew Fritze
73f8eda988 Merge "Revert "Linked google truth to Robolectric tests and added an example."" 2016-09-14 00:41:55 +00:00
Matthew Fritze
7a78107332 Revert "Linked google truth to Robolectric tests and added an example."
This reverts commit 21f15a3280.

Change-Id: I07b978438b09c1a905eb58d2198913d21d552d6d
2016-09-14 00:33:31 +00:00
Matthew Fritze
ba15465610 Merge "Linked google truth to Robolectric tests and added an example." 2016-09-14 00:07:48 +00:00
Matthew Fritze
21f15a3280 Linked google truth to Robolectric tests and added an example.
Bug: 31252617
Change-Id: I95aefd4809b8d292fe4cbeac903b8445e6e2a5ea
Test: Target: RunSettingsRoboTests
2016-09-13 16:54:57 +00:00
Daniel Nishi
e8d30f7cc6 Fix the Settings lifecycle Robotests.
By breaking the tests into two pieces, we avoid any race conditions
with adding the fragment and also unit test the two components
separately.

Bug: 31370315
Test: m RunSettingsRoboTests
Change-Id: I9761b0b00141d3ce481a7edb5d8145c645c51da7
2016-09-09 13:36:59 -07:00
Salvador Martinez
923534f641 resolve merge conflicts of 8ec7028 to master
Change-Id: I02767dea7e2fd8e6dfdfe495af1c28587b080630
2016-09-07 10:24:03 -07:00
Salvador Martinez
8ec70281ee Fixed Sound Settings summary text am: b706d4e956
am: d39c1fa395

Change-Id: I73fa598eb0067b5c1497e7bac803b9d349eaf86c
2016-09-07 16:17:14 +00:00
Salvador Martinez
b706d4e956 Fixed Sound Settings summary text
The summary for Sound settings was not
descriptive enough when the volume was set
to 0% so additional strings were added. Now
it will change let you know the status
of the ringer and vibration settings when
at 0% volume. Espresso tests added to test
that text is properly updated in each of
these states.

Test: make SettingsTests
Bug: 31099179
Change-Id: Id49e2d0c4b7ac0f17efcdaf31de48d5eb678ca46
2016-09-06 17:23:50 -07:00
Guang Zhu
e0fcb1290c Merge "Avoid JUnit4 collision in android-support-test, mockito-target" 2016-08-25 20:42:29 +00:00
Guang Zhu
2705ae35f9 Avoid JUnit4 collision in android-support-test, mockito-target
Bug: 31072145
Test: make droid checkbuild

Change-Id: I7f2b13a4c28e51d76313ee3b6d13c904c2925228
2016-08-25 19:43:16 +00:00
Doris Ling
6cf7d7c9b7 Add ObservableDialogFragment to log DialogFragments.
Bug: 30681529
Test: RunSettingsRoboTests

ObservableDialogFragment can be used as host of VisibilityLoggerMixin,
allowing us to log visibility change for all dialogs easily.

Change-Id: I973db929d8494d3756584ca60df3b2e87d96c757
2016-08-25 10:42:50 -07:00