Commit Graph

2577 Commits

Author SHA1 Message Date
Fan Zhang
3903e15de2 Fix a crash in AppInfoBase where appEntry is invalid am: 2c6634a8a9
am: 4a1245e8c1

Change-Id: Ibf609a79a19fca98554b3ec60940163674125af9
2017-07-06 20:36:05 +00:00
Fan Zhang
75bee9bf98 App header cleanup
- Refactor the entity header layout to use LinearLayout and add id to
  content area
- Remove now unused AppHeader class
- Make entire icon+text area clickable and link to app info page
  Refactor the binding logic from bindButton to its own method.
- Remove unused MultiLinePreference

Fix: 62705377
Test: make RunSettingsRoboTests

Change-Id: I6db554695410e71b669f6fdba29d98fedc3364b9
2017-07-06 13:23:38 -07:00
Antony Sargent
b6fc6e31a5 Add a confirmation dialog when forgetting BT device
This adds a confirmation dialog for when you hit the "Forget" button to
unpair with a device from the Bluetooth device details page.

Bug: 37955181
Test: make RunSettingsRoboTests
Change-Id: I7643ed09bf363c48078d6de8a47583bf91fc7729
2017-07-06 12:24:32 -07:00
TreeHugger Robot
0002680697 Merge "Fix race condition and optimize categoryUpdater refresh" 2017-07-06 18:54:43 +00:00
Fan Zhang
2c6634a8a9 Fix a crash in AppInfoBase where appEntry is invalid
Change-Id: Ifbea967405ddc1e1bd069ddeab170bc67b1835b4
Fix: 63178369
Test: robotests
2017-07-06 17:56:47 +00:00
Matthew Fritze
aadd26e335 Merge "Check non-indexable keys for raw data" into oc-dr1-dev am: 24ba2fbdb9
am: dc2005eb6a

Change-Id: Ibcefe758e9524ae810234212ac83d385bd03d09e
2017-07-06 17:39:25 +00:00
TreeHugger Robot
24ba2fbdb9 Merge "Check non-indexable keys for raw data" into oc-dr1-dev 2017-07-06 17:31:29 +00:00
Fan Zhang
aeb94f0e5c Fix race condition and optimize categoryUpdater refresh
- In SettingsActivity, do not call updateCategories() if nothing
  changed.
- In SummaryLoader, create a mapping between tile key and summary. This
  is necessary to handle a race condition where category is refreshed
  after summary load.
- In DashboardSummary, refresh Tile's summary to latest cache value
  everytime category is refreshed.

Change-Id: I61389b8ba614ba7e34939325bada6e1bd6fa6709
Fix: 63149109
Test: robotests
2017-07-06 10:13:58 -07:00
Matthew Fritze
bdd57aad3e Check non-indexable keys for raw data
Change-Id: I182f6757cae0ccdd07c2c38ea0f02bd4998f79be
Fixes: 63360455
Test: make RunSettingsRoboTests
2017-07-06 08:15:42 -07:00
Alex Kulesza
7ef10c410b Merge "Render enhanced battery projection curves." into oc-dr1-dev am: 32812e6121
am: d69f7cddb6

Change-Id: Id226cd9d3c2ea5bbbbc1dcedfbd273938ac477ef
2017-07-06 14:10:06 +00:00
Alex Kulesza
32812e6121 Merge "Render enhanced battery projection curves." into oc-dr1-dev 2017-07-06 14:02:26 +00:00
Philipp Weiß
7072a82a3e Merge "When Remove Account is disallowed, show dialog" 2017-07-06 08:08:43 +00:00
Jack He
bbe2cf45ac Bluetooth: Use string in remote device summary am: 04f5967c95
am: d79f6af9ae

Change-Id: If95cf2c89469d5b9220e3f2741e8c7f9288b655a
2017-07-06 03:29:58 +00: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
Daniel Sheng
f8e0963f78 Merge "Added suggestions for gestures." into oc-dr1-dev 2017-07-06 03:19:57 +00:00
Daniel Sheng
9e958b6dfc Merge "Removed camera lift gesture settings UI." 2017-07-06 02:56:12 +00:00
Alex Kulesza
f30915e860 Make utility methods static. am: 43d4fefb36
am: cc56b1aa04

Change-Id: Ia1ebdff4fcd82f829e90f76bf7d49b0adbc8febc
2017-07-06 01:36:33 +00:00
Jack He
04f5967c95 Bluetooth: Use string in remote device summary
* Use String in connected device summary instead of resource id
* This allows dynamic strings to be built by CachedBluetoothDevice
  such as ones involve battery level percentages

Bug: 35874078
Test: make, unit test, test with Bluetooth devices
Change-Id: I583eac73280ca17387b215a4e7095e27de399998
2017-07-06 01:22:35 +00:00
Daniel Sheng
11d240c300 Removed camera lift gesture settings UI.
Bug: 37154489
Test: make + manual + unit tests
Change-Id: I79e70dea12a65fefcb06aca3fd1891a95d856626
2017-07-05 18:04:10 -07:00
Daniel Sheng
f7c459c9e5 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: I7337a141cb21e5a1399aaca05ec1facd8629577b
Merged-In: I7aed110c81ca2fb6b90e2f359b4bb941c02bc1c3
2017-07-05 17:35:03 -07:00
Daniel Sheng
77ba611ac0 Merge "Added suggestions for gestures." 2017-07-06 00:34:06 +00:00
Android Build Merger (Role)
e9e5978576 Merge "Merge "Fix Bluetooth device details crash on screen rotation" into oc-dr1-dev am: 6d50576496 am: 5438319677" 2017-07-05 23:21:57 +00:00
TreeHugger Robot
e0f8691abf Merge "Fix alignment for build number preference in RTL." 2017-07-05 23:21:44 +00:00
Antony Sargent
c73c4b4055 Merge "Fix Bluetooth device details crash on screen rotation" into oc-dr1-dev am: 6d50576496
am: 5438319677

Change-Id: I1595e3c80b731a4c7f86faa198f2cc6e7f05d710
2017-07-05 23:15:53 +00:00
Alex Kulesza
82dbcd973d Render enhanced battery projection curves.
BatteryInfo now supplies standard linear or enhanced projection curves,
depending on the provider.

Note that the semantics of parsing have changed slightly in that the
value of endTime supplied to onParsingStarted is now the end time of the
historical data and does not include the projection. However, as far as
I can see there is no existing code that depends on the parsing
functionality besides BatteryInfo itself.

Also slightly optimizes the updating behavior of the UsageGraph, since
we are now reconfiguring it multiple times.

Bug: 38400320
Test: make RunSettingsRoboTests, manual on device
Change-Id: Ieff26d31356b34bb38e49f54f979fd80549864b2
2017-07-05 18:56:02 -04:00
Alex Kulesza
43d4fefb36 Make utility methods static.
BatteryUtils.convertUsToMs and .convertMsToUs should be static, and now
they are.

Bug: 63347148
Test: make RunSettingsRoboTests
Change-Id: If652e2d3e1260df9a933805d7da670fbb26b2c25
2017-07-05 18:53:22 -04:00
Antony Sargent
6d50576496 Merge "Fix Bluetooth device details crash on screen rotation" into oc-dr1-dev 2017-07-05 22:49:04 +00:00
Sundeep Ghuman
2d1e8a736e Merge "Use EntityHeaderController in WifiDetailPreferenceController." into oc-dr1-dev am: 09229abbf2
am: 4fd8528c2f

Change-Id: Ie183a68e7ae944bad8a2ca3782522afd7f78b74f
2017-07-05 22:43:16 +00:00
TreeHugger Robot
09229abbf2 Merge "Use EntityHeaderController in WifiDetailPreferenceController." into oc-dr1-dev 2017-07-05 22:21:40 +00:00
Matthew Fritze
bfe82cab89 Add util method to get battery stats
Bug:62271803
Test: make RunSettingsRoboTests
Change-Id: I91089c24c7cd5f7329be052c50859e049e70e9b1
2017-07-05 14:54:20 -07:00
TreeHugger Robot
bc4044ee7b Merge "Ensure that brightness level is within 0-100%." 2017-07-05 21:47:12 +00:00
Daniel Nishi
2872e2c6cc Update the Storage icons.
Change-Id: I10648df80566629c09d03211ed642516595e4b22
Fixes: 62548249
Test: Manual
2017-07-05 14:41:12 -07:00
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