Commit Graph

2545 Commits

Author SHA1 Message Date
Rajeev Kumar
a414ef872f Merge "Create a feature provider for data plan feature. This change will allow us to enable/disable this feature from adb shell." 2017-07-05 21:33:23 +00:00
Fan Zhang
e6b7bc6f15 Fix alignment for build number preference in RTL.
- Fixed by adding BidiFormatter.unicodeWrap around the whole string.

Change-Id: I3ca1292d912062db8c2fead524cd84a19eb80cff
Fix: 63135900
Test: make RunSettingsRoboTests
2017-07-05 14:20:08 -07:00
TreeHugger Robot
ff45106b49 Merge "Adjust UX for toggles when active scorer is not set." 2017-07-05 21:19:58 +00:00
jackqdyulei
e0fa4afc71 Merge "Update the method about foreground time." into oc-dr1-dev am: 96e774b7d7
am: b067dea683

Change-Id: I3ef03ee20157e41228ebe4656109abf055a20ec1
2017-07-05 20:43:58 +00:00
TreeHugger Robot
96e774b7d7 Merge "Update the method about foreground time." into oc-dr1-dev 2017-07-05 20:38:52 +00:00
Soroosh Mariooryad
55bb0c258d Log async ranking state in Settings search ranking
Bug: 62072727
Test: RunSettingsRoboTests

Change-Id: I2140c41d01f18a1e4b9e3f505e0afa4a8757d049
2017-07-05 13:04:22 -07:00
Sundeep Ghuman
d569195299 Use EntityHeaderController in WifiDetailPreferenceController.
Switch to the Entity header to bring parity in design of
WifiNetworkDetailsFragment and other Settings pages.

Bug: b/37252029
Test: make -j40 RunSettingsRoboTests
Change-Id: Ib11f3d37eac4dca08fa61eef67910cd328682bac
2017-07-05 12:54:38 -07:00
Doris Ling
c7d2d270ab Ensure that brightness level is within 0-100%.
Check whether the retrieved brightnesss value is out of range, and
adjust it if necessary.

Change-Id: Ieb1ccc03dcb9fa3e1ed192fcc3d217b84d4d316c
Fix: 63181935
Test: make RunSettingsRoboTests
2017-07-05 12:53:04 -07:00
Stephen Chen
7e27006a7b Adjust UX for toggles when active scorer is not set.
This change fixes two issues: when wakeup is not available, update the
number of items to show above the fold in wifi preferences. When scorer
is not set, grey out wakeup toggle and set summary to reflect the
status.

Bug: 62410973
Bug: 62343859
Test: make RunSettingsRoboTests -j40

Change-Id: I5f4131c6a86eab6c0fb03ea2b5101ba107a9189f
2017-07-05 12:29:06 -07:00
Rajeev Kumar
ad157aca52 Create a feature provider for data plan feature. This change will
allow us to enable/disable this feature from adb shell.

Bug: 62349208
Test: make RunSettingsRoboTests -j40
Change-Id: I2d0bed738d5d4cd0fe1de056ee37092d46be72b6
2017-07-05 12:25:53 -07:00
phweiss
7a34e9c28e When Remove Account is disallowed, show dialog
When DISALLOW_MODIFY_ACCOUNT is set by a device admin, and
the user wants to remove an account, show the support dialog
instead of showing the confirm dialog.

To use the O-API DPM.createAdminSupportIntent(), a wrapper
needs to be used, because existing Robolectric tests otherwise
don't compile.

Bug: 37413849
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=*RemoveAccountPreferenceControllerTest

Change-Id: If23ea304ab8b9df1748e6acf3032310843b04780
2017-07-05 19:32:48 +02:00
Daniel Sheng
20d5588a27 Added suggestions for gestures.
Bug: 30986021
Test: manual + make RunSettingsRoboTests + adb shell am instrument -w
com.android.settings.tests.unit /android.support.test.runner.AndroidJUnitRunner

Change-Id: I7aed110c81ca2fb6b90e2f359b4bb941c02bc1c3
2017-07-05 09:05:11 -07:00
Jeff Davidson
4ba7478fdf Don't show "Wipe eSIMs" checkbox for developers.
Per UX review feedback, it doesn't make sense to show this just
because someone has developer options turned on. So only show it if
the user has ever downloaded an eSIM profile.

Change-Id: If474451dddcaa75bce1e57ce2f1751ef3adf45ee
Test: TreeHugger
Fixes: 63147904
2017-07-01 01:06:19 +00:00
Antony Sargent
1b6e7d76ed Fix Bluetooth device details crash on screen rotation
We were getting the following exception when you rotated the Bluetooth
device details screen:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.settings/com.android.settings.SubSettings}:
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR
and set android:windowActionBar to false in your theme to use a Toolbar
instead.

It turns out that allowing EntityHeaderController to inflate the
settings_entity_header.xml view seems to cause this - if you instead
manually include a LayoutPreference and hand that to
EntityHeaderController, you don't have the problem.

The rotation failure couldn't be tested with Robolectric because our
version doesn't support using FragmentTestUtil.startFragment for
fragments which use PreferenceScreen's ("sorry, not yet
implemented"). So instead this includes an app test.

Bug: 62447414
Test: runtest --path=BluetoothDeviceDetailsRotationTest.java
Change-Id: I8d052d1f4ab6e2b0ca5c0e513ec366bdcc382d99
2017-06-30 16:34:40 -07:00
jackqdyulei
43cbee6914 Update the method about foreground time.
For now it uses MIN(STATE_TOP_TIME, FOREGROUND_ACTIVITY_TIME) and this
method is used in both display and screen smearing.

Bug: 63080621
Test: RunSettingsRoboTests
Change-Id: I2ca3109697aa66fae67d8b2f4f10c4d08bb99d59
2017-06-30 16:18:29 -07:00
Fan Zhang
b487fae5d8 Code cleanup: DashboardAdapter.category is no longer a list
We only ever display a single DashboardCategory in homepaeg, so the
category doesn't need to be a list in DashboardData/Adapter

Change-Id: I57db02bb45cbc511f0fce1bf33043b51ef9db15c
Fix: 33861822
Test: updated robotests
2017-06-30 15:30:51 -07:00
TreeHugger Robot
a1bf76a69d Merge "Also tint the settings icon in DashboardAdapter.setCategory()." 2017-06-30 20:07:40 +00:00
Fan Zhang
8b0df6a4df Fix settings robotest am: 4e34839a1e
am: 517daf43a4

Change-Id: I8a8beb1549f625ac2cfa147162b747b5e05df771
2017-06-30 03:53:57 +00:00
Fan Zhang
4e34839a1e Fix settings robotest
Change-Id: I0685b1f47ae286a4fdf78a57c21f7a656804754f
Fix: 63146944
Test: robotest
2017-06-30 01:27:20 +00:00
Fan Zhang
a29346bab8 Change the way we generate stable id for DashboardSummary
- The countItem() method generates id based on position of Tile. This is
not truely stable.
- Added stable id constants for static views, and use hash of title as
stable id for tiles.

Bug: 33861822
Test: robotests
Change-Id: Ibbc88c82655503dc3964cb0c430c779dc9c93d41
2017-06-29 14:21:43 -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
TreeHugger Robot
5243d5dd85 Merge "Add account sync summary." into oc-dr1-dev 2017-06-29 18:58:58 +00:00
jackqdyulei
82b7f4ae04 Merge "Change the type of "hours" from long to double" into oc-dr1-dev am: 1498e86530
am: 595def292b

Change-Id: I7a84119fc64b37c8d6ed32ee05e644f9f860a62e
2017-06-29 18:46:28 +00:00
TreeHugger Robot
1498e86530 Merge "Change the type of "hours" from long to double" into oc-dr1-dev 2017-06-29 18:38:39 +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
TreeHugger Robot
4ef813efdc Merge "Disable SmartSuggestion conditionally" 2017-06-29 01:55:52 +00:00
jackqdyulei
0e852e4113 Merge "Add metric action log for anomaly action" into oc-dr1-dev am: 43afb664e6
am: b58333f46e

Change-Id: If798eac93947126cbdee7c02ee69a792d3032d18
2017-06-29 01:19:16 +00:00
TreeHugger Robot
2d6930b2df Merge "Add account sync summary." 2017-06-29 01:11:43 +00:00
TreeHugger Robot
43afb664e6 Merge "Add metric action log for anomaly action" into oc-dr1-dev 2017-06-29 01:10:42 +00:00
TreeHugger Robot
9df70249b9 Merge "Change to use new suggestion/condition UI." into oc-dr1-dev 2017-06-29 01:04:58 +00:00
jackqdyulei
985aa11e1a Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev am: 33c9b7a111
am: 9d57855c96

Change-Id: Ib387fc18e5352afddf698f0108fc78c71b66dc88
2017-06-29 00:53:14 +00:00
TreeHugger Robot
33c9b7a111 Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev 2017-06-29 00:43:09 +00:00
jackqdyulei
8213f102dc Change the type of "hours" from long to double
So we won't have the rounding issue here.

Bug: 63112264
Test: RunSettingsRoboTests
Change-Id: I85b3525781074294964a956dbe76f3b55f65704d
2017-06-28 16:20:34 -07:00
Doris Ling
067122a8e4 Also tint the settings icon in DashboardAdapter.setCategory().
When suggestion loader takes longer time to complete, we will first show
the dashboard with just the categories, and refresh the UI when the
suggestion is ready. However, we only tint the icon when we update both
the categories and suggestions, and hence in some case, some tile
results with icon not being tinted.

Change-Id: I023d50655349731b03c7d7aff153d2cbbd8c63e0
Fix: 37456962
Test: make RunSettingsRoboTests
2017-06-28 16:12:38 -07:00
jackqdyulei
ac29684b14 Add metric action log for anomaly action
Change AnomalyAction to abstract class and log the action there.

Bug: 37681923
Test: RunSettingsRoboTests
Change-Id: Ied7a269d4a3f8fcb978165af6e17a9c9952fea49
2017-06-28 15:35:54 -07:00
Fan Zhang
e199f50d65 Disable SmartSuggestion conditionally
The smart suggestion flag should be treated as false when dismissing
first impression type suggestions. Smart suggestion and first impression
suggestions have different dismiss rules.

Change-Id: Ia99d310ddea7baf58b6eadacee8ccda5bf33f311
Fix: 63094854
Test: robotests
2017-06-28 14:58:29 -07:00
Matthew Fritze
f050ab93d1 Merge "Add synchronous indexing api to SearchFeatureProvider" into oc-dr1-dev am: e2e54e17c7
am: d4075ea983

Change-Id: Ie93718a9af3b3bb4e53dfbf7f43da31c1ee9404a
2017-06-28 20:53:12 +00:00
TreeHugger Robot
e2e54e17c7 Merge "Add synchronous indexing api to SearchFeatureProvider" into oc-dr1-dev 2017-06-28 20:44:13 +00:00
Matthew Fritze
5c16030dbc Merge "Add list-select as an inline result" into oc-dr1-dev am: e455c8f377
am: 46483a1a29

Change-Id: Ia2f55440571504c66b67276990e9fde19a1709fa
2017-06-28 20:40:42 +00:00
Doris Ling
e76550a66e Add account sync summary.
- Check for the number of sync adapter that is enabled for the account and
update the summary text for the account sync preference accordingly.
- Add divider above the Remove Account button.

Merged-In: Ic333f62cce9aed0a72771324976ebe3d8e586287
Change-Id: I003d6dd0a070bf123f178b8d9ba7b6657466b905
Fix: 62862167
Test: make RunSettingsRoboTests
2017-06-28 13:37:17 -07:00
TreeHugger Robot
84872626cd Merge "Change to use new suggestion/condition UI." 2017-06-28 20:27:27 +00:00
TreeHugger Robot
e455c8f377 Merge "Add list-select as an inline result" into oc-dr1-dev 2017-06-28 20:27:00 +00:00
Doris Ling
771848dde0 Add account sync summary.
- Check for the number of sync adapter that is enabled for the account
and
update the summary text for the account sync preference accordingly.
- Add divider above the Remove Account button.

Bug: 62862167
Test: make RunSettingsRoboTests
Change-Id: Ic333f62cce9aed0a72771324976ebe3d8e586287
2017-06-28 13:18:56 -07:00
jackqdyulei
f43f359242 Merge "Hide the IDLE in "app list"" into oc-dr1-dev am: 9a30ceab83
am: 881b581e0a

Change-Id: I1a63208cc637be0f9f5ab1e4171b59e498d381ee
2017-06-28 19:48:46 +00:00
TreeHugger Robot
9a30ceab83 Merge "Hide the IDLE in "app list"" into oc-dr1-dev 2017-06-28 19:38:20 +00:00
jackqdyulei
85e25e34fd Fix the getForegroundActivityTotalTimeMs
The parameter in timer should be microseconds, not milliseconds

Bug: 63073847
Test: RunSettingsRoboTests
Change-Id: I5e451aee9eb30815fbefe12c0bfdc85dff884b8e
2017-06-28 12:33:20 -07:00
Doris Ling
b99af0e4a2 Change to use new suggestion/condition UI.
Change to always use the new UI that combines the suggestion and conditions,
and remove all codes relating to the old UI.

Fix: 37645754
Fix: 62621808
Test: make RunSettingsRoboTests

Merged-In: I3421a9e5182f6606843392d6fae8b9f07c5f2e46
Change-Id: I5ef169a563166520dad0ac44f6780da814e2f1f7
2017-06-28 12:22:34 -07:00
Matthew Fritze
98a9e42c93 Add synchronous indexing api to SearchFeatureProvider
- Opens the database indexing to be synchronous for the
external settings api.
- Adds logging to track synchronous and async indexing
times.

Bug: 62826872
Test: make RunSettingsRoboTests
Change-Id: I28b69f3952946c0ae5dd7ea7da66f7a5fd485637
2017-06-28 11:31:27 -07:00
Doris Ling
631893f582 Change to use new suggestion/condition UI.
Change to always use the new UI that combines the suggestion and conditions,
and remove all codes relating to the old UI.

Bug: 37645754
Bug: 62621808
Test: make RunSettingsRoboTests
Change-Id: I3421a9e5182f6606843392d6fae8b9f07c5f2e46
2017-06-28 11:22:44 -07:00