Commit Graph

24303 Commits

Author SHA1 Message Date
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
TreeHugger Robot
f33034a114 Merge "Add lifecycle observers for future mixin structures." 2016-08-24 19:12:12 +00:00
TreeHugger Robot
bc6ed505d7 Merge "Extract and refactor logic to determine the data usage summary mark." 2016-08-23 21:24:42 +00:00
Fan Zhang
ea024155fb Add lifecycle observers for future mixin structures.
- Converted VisibilityLoggerMixin into a LifecyclerObservable so we
  don't have to call logger.onResume/onPause manually in most fragments.
- Observable will be useful when we provide logics across all
  fragment/activity, eg log lifecycle event latencies.
- Also added new tests for lifecycle component.

Bug: 30681529
Test: RunSettingsRoboTests

Change-Id: Ida39300aeb42f71b2e0bbfaebd0c51dc468cb5e8
2016-08-23 14:02:39 -07:00
Matthew Fritze
b42136ec8c Extract and refactor logic to determine the data usage summary mark.
Created a new controller for DataUsageInfo and add appropriate
unit tests.

Bug: 30946416
Change-Id: Ida1281a771013fd807242f846edb4f2a9c0ccabb
Test: Robolectric tests with target RunSettingsRoboTests
2016-08-23 12:15:16 -07:00
Fan Zhang
d0f2f3dee5 resolve merge conflicts of 111b81d to master
Change-Id: I2b7eb6dfe73a94b6acd5ef47690ee72022b1ad6d
2016-08-22 17:26:34 -07:00
Salvador Martinez
111b81dc79 Tests for launch support on default feature am: 3fb4e96b0d
am: 6c07416eba

Change-Id: I5ed71234e55ecbfbf160b860122ba73cc18d1707
2016-08-22 22:32:34 +00:00
Salvador Martinez
3fb4e96b0d Tests for launch support on default feature
Includes some espresso tests to ensure that the proper
tab is selected when you attempt to launch settings.

Bug: 30233920
Change-Id: I171293114bd84b064b333091fcf2394d44debed5
(cherry picked from commit d1ef20beaa)
2016-08-22 21:52:46 +00:00
Daniel Nishi
b0528318e4 Remove unnecessary build flag from Robotests make.
Change-Id: Icd2a06ad7f5dbcf1913d16a5513765c6b2fdbf9f
2016-08-22 12:25:08 -07:00
Fan Zhang
5f79ae9677 Move SharedPreferenceLogger to instrumentation package.
Bug: 30914916
Test: SettingsUnitTests and RunSettingsRoboTests

- Added interface to abstract logger
- Added test for SharePrefLogger
- Moved Existing tests for instrumentation to robotests.

Change-Id: I2b431ea4b0fd09d0f11389d8b9181448f08a52c5
2016-08-18 17:38:25 -07:00
TreeHugger Robot
b0e8f67389 Merge "Log visibility change for all fragments." 2016-08-18 21:06:00 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Matthew Fritze
626a21b0bf Add Robolectric makefile and modify Settings Manifest for testing.
Bug: 30918570
Change-Id: I4ae998676757b4985833fac5ba05d7685e29a8a8
2016-08-17 23:28:38 +00:00
TreeHugger Robot
95d55fc687 Merge "Tests for launch support on default feature" 2016-08-15 19:42:55 +00:00
Salvador Martinez
d1ef20beaa Tests for launch support on default feature
Includes some espresso tests to ensure that the proper
tab is selected when you attempt to launch settings.

Bug: 30233920
Change-Id: I171293114bd84b064b333091fcf2394d44debed5
2016-08-15 10:34:11 -07:00
Jeremy Klein
46b1f4843f Fix a broken TetherServiceTest. am: 8681148918 am: be9c338253
am: 9de1885a4d

Change-Id: I66818d04e363d43cae88a713daaf51a746c84f38
2016-08-12 00:10:29 +00:00
Jeremy Klein
9de1885a4d Fix a broken TetherServiceTest. am: 8681148918
am: be9c338253

Change-Id: Ic4b97f70f0ac75c3ee42ebc51a0b1365a7ac58f1
2016-08-12 00:06:28 +00:00
Jeremy Klein
8681148918 Fix a broken TetherServiceTest.
This should have been updated when I changed settings to use the new
tethering API.

Bug: 30814807
Change-Id: I3853e6abf1e9976aedae70d4ff41336940545b64
2016-08-11 15:57:29 -07:00
Jeremy Klein
381186d503 Set the tether Entitlement app as active when enabling tethering. am: b04fae204e am: 95fb3f6d3c
am: fc0b9c2f7e

Change-Id: I7bab3f9bede7dc6e3454e4a45aecb6ce25025762
2016-08-03 19:20:13 +00:00
Jeremy Klein
fc0b9c2f7e Set the tether Entitlement app as active when enabling tethering. am: b04fae204e
am: 95fb3f6d3c

Change-Id: I75d28601b83a9b8edffa1f6741767673aaa7dfc0
2016-08-03 19:02:20 +00:00
Jeremy Klein
b04fae204e Set the tether Entitlement app as active when enabling tethering.
This fixes tether entitlement timeouts when tethering is enabled
via the QS tile.

Bug: 29514913
Change-Id: I975bf3e52d2df49541544d1b7a6bdcdec1b61d8c
2016-08-01 15:00:19 -07:00