Commit Graph

27 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
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
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
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
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
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
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