Commit Graph

255 Commits

Author SHA1 Message Date
Rajeev Kumar
c6f0b9d6f3 Data plans setting peference.
Change-Id: Ieb2aa67ab98140aa90501227345a15ad64cf124c
Note: These changes are required for Data balance UI.
Bug: 62349208
Test: make RunSettingsRoboTests -j40
2017-07-12 11:48:23 -07:00
TreeHugger Robot
ade7f5b531 Merge "Automatically play the gesture video when the setting is launched." 2017-07-11 22:05:22 +00:00
Rajeev Kumar
ff3834f4d4 Merge "Add custom attributes to DonutView." 2017-07-11 19:02:17 +00:00
Doris Ling
a689787b71 Automatically play the gesture video when the setting is launched.
- and save the video pause state on config change so that the paused
video will not auto start again on screen rotation.

Change-Id: I3f41849ee3063942fb4141e4556e494bc8439226
Fix: 63145847
Test: make RunSettingsRoboTests
2017-07-11 10:38:24 -07:00
Rajeev Kumar
eaceb1906e Add custom attributes to DonutView.
Note: These changes are required for Data balance UI.
Bug: 62349208
Test: Manual
Change-Id: I50f304580f681dc1461fb82d84ce0fede21b4b87
2017-07-11 10:32:27 -07:00
Rajeev Kumar
b82304251a Recycle TypedArray in FixedLineSummaryPreference
Change-Id: I3aefad2081751f778fd2b32c6e05921131b84547
2017-07-10 12:40:26 -07:00
Philip Quinn
97efc5c6f1 Add SeekBarPreference.getMax(). am: 648ddd5c83
am: 7d46906218

Change-Id: Id8d9071b4a9ceac31fe81eb7d1de31890d9156f1
2017-07-07 03:51:09 +00:00
Philip Quinn
648ddd5c83 Add SeekBarPreference.getMax().
Bug: 63047816
Test: make -j
Change-Id: I416d044fa32f3aed32c1e6239baf9c57652bca2e
2017-07-07 03:39:40 +00:00
TreeHugger Robot
e663befae4 Merge "App header cleanup" 2017-07-06 22:22:52 +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
Daniel Nishi
842bcf5081 Merge "Unify storage calculations." into oc-dr1-dev am: 947cb367db
am: a223ee4890

Change-Id: I4a4dbe87c52a2c53abd2489143d9183c72d2c4cf
2017-07-06 17:27:05 +00:00
Daniel Nishi
5d272ce4ff Unify storage calculations.
Due to one calculation using longs and the other using doubles, there
were situations where the percentage was off-by-one between the two
places.

By changing both places to now use doubles to calculate percentages, the
numbers should be unified.

Change-Id: I4f4ed19326562e198273adc60a1593c7d1a6b6a7
Fixes: 37923610
Test: Manual
2017-07-05 10:10:15 -07:00
Daniel Nishi
65a628751e Merge "Put the donut on a diet." into oc-dr1-dev am: 2cbe278ad4
am: 7cc286bac7

Change-Id: I7ff03385d589e1fd147f05cd417fbaba144a3e3c
2017-06-28 21:07:26 +00:00
Daniel Nishi
e55bffaf59 Put the donut on a diet.
Shrinks the donut from 6dp to 4dp to closer match the mocks.

Change-Id: Iaf455beb4f54e7673ff6adc6068e0410fac379b5
Fixes: 62548749
Test: Manual
2017-06-28 18:29:40 +00:00
Fan Zhang
896f1b363c Reduce jank around loading view when opening data usage UI
Change-Id: I3d23d8160b046de8fe125ba0697b7b3d7786453c
Fix: 28181319
Test: robotests
2017-06-26 15:15:30 -07:00
Juan Lang
4482812cb1 Use SettingsLib's versions of Custom* classes.
Test: make RunSettingsRoboTests
Change-Id: I2584e820b72bb4672c53fd1a9f63c7f1662e0809
2017-06-21 12:07:50 -07:00
Fan Zhang
f18fa145f2 Merge "Add logging when entity header buttons are clicked" into oc-dr1-dev am: 58d27eef9a
am: 1d3f5e55cd

Change-Id: I1f0bd8ed2dcedb9add6c63d1ab72ce30fb93ca70
2017-06-20 23:44:21 +00:00
Fan Zhang
a74337c627 Add logging when entity header buttons are clicked
Change-Id: I673e5b4a6c5f8736bbec72e259a82acb3f514828
Fix: 62709062
Test: make RunSettingsRoboTests
2017-06-20 16:53:14 +00:00
Fan Zhang
a9fd6ed8ed Keep candidates in radio button picker UI ordered
We will use the order from candidate list.

Change-Id: I3f5bfb9d603d6c926fddd4711e2899df10cb72ac
Fix: 37542504
Test: make RunSettingsRoboTests
2017-06-19 13:35:51 -07:00
TreeHugger Robot
f357f78eef Merge "Refactor hotspot into a full page" 2017-06-14 21:33:22 +00:00
Fan Zhang
78d5efdfea Refactor hotspot into a full page
- Deprecated WifiAPEnabler, and copied most of its logic into various
  controllers and WifiTetherSettings.
- Added tests

Fix: 37253404
Fix: 36181835

Test: make RunSettingsRoboTests
Change-Id: Iad994d61b694ad7f1113d045a3e7500eeaec178b
2017-06-14 12:32:44 -07:00
Tarandeep Singh
4803267106 Replace showSoftInput with ImeAwareEditText.scheduleShowSoftInput
Both View focus (which is triggered by View.requestFocus()) and IME focus
(which is internally handled inside InputMethodManager), are implemented
as delayed tasks on the UI thread. The goal here is to make sure that
InputMethodManager.showSoftInput() always gets called only after the target
EditText gained IME focus.
This requires some tricks, but is basically a solved problem with
ImeAwareEditText introduced by
I182b05d3ff59fb3b4732d60d0d5a464f0e0e0235. Here we can just reuse it.

Note that ConfirmLockPassword & ChooseLockPassword are the only ones
using ScrollToParentEditText. Latter doesn't call IMM.showSoftInput().

Fixes: 62542157
Test: Verified keyboard still shows-up on the ConfirmLock screen.

Change-Id: I892d639f3cc5d43db553b682d5278b8ce2fe72da
2017-06-12 17:24:39 -07:00
Andrew Sapperstein
dd19c3c8ba Update battery & storage settings to use headline font.
Updates several locations to use config_headlineFontFamily as the
android:fontFamily or Typeface object. This allows OEMs to specify
a custom headline font.

Bug: 36855735
Test: ag/2360364
Change-Id: I627515d2afd5ff018aae10843d099b8c83880635
2017-06-06 16:29:21 -07:00
Daniel Nishi
3be2832cfa Merge "Band aid to fix overly long text in donut." into oc-dev am: b5abb2c1d2
am: 0be5066922

Change-Id: Icf83d3412e0c87c5dbcb98156c0310a6db5b7645
2017-06-06 17:46:33 +00:00
Daniel Nishi
b5abb2c1d2 Merge "Band aid to fix overly long text in donut." into oc-dev 2017-06-06 17:34:01 +00:00
Daniel Nishi
9f84622be4 Band aid to fix overly long text in donut.
In the Storage Settings, if the text is too long, it will overlap with
the donut. After discussing with UX, we've opted to shrink the text in
the extenuating circumstances. This is because this text is more of a
helper and the full information is on the left.

Bug: 38030457
Test: Manual with Telugu
Change-Id: I18bcaaae74d049c42eaff50868d3861ae258839d
2017-06-05 13:22:26 -07:00
jackqdyulei
6772f5a2c2 Make footer preferences non-clickable by default
cherry-picked from ag/2301717

Both the footer preference and the TextView they contain
were clickable, which confused some accessibility services.

Bug: 62050563
Test: Verified that switch access no longer offers users
the option of clicking on the footer for accessibility
services and Magnification as well as in the Battery
settings screen.

Change-Id: I5cb13d6268466c690dd38f2b652422d2c3d813b4
Merged-In: I937340fda93f6a8097919e1f86d5d890487370bc
2017-06-05 10:44:34 -07:00
Rebecca Silberstein
141e442e26 Merge "SettingsAppWidgetProvider: do not use setWifiApEnabled" into oc-dev am: bbc260d408
am: cba166d380

Change-Id: Ie639b844ab810386e8f0203e2978bf07453e35bd
2017-05-30 22:11:21 +00:00
Rebecca Silberstein
bbc260d408 Merge "SettingsAppWidgetProvider: do not use setWifiApEnabled" into oc-dev 2017-05-30 21:48:37 +00:00
Fan Zhang
d35f90c289 Extend single line summary preference to multi line.
also updated some strings char limit.

Change-Id: Ie068ecc410bb8211b4cd5e32a5539c824c48040f
Fix: 36413664
Fix: 62079108
Test: make RunSettingsRoboTests
2017-05-30 11:48:20 -07:00
Rebecca Silberstein
deca11c87d SettingsAppWidgetProvider: do not use setWifiApEnabled
Calls to stop tethering should use stopTethering instead of
setWifiApEnabled.

Bug: 38017909
Test: manual
Change-Id: Ib43f8c29b190ba7bad9c5b2d6a01bc9558110890
2017-05-30 11:40:16 -07:00
Antony Sargent
ff8e3e7bde Add setIconContentDescription to EntityHeaderController
This lets us set a contentDescription on the icon in entity headers
for accessibility.

Bug: 62068874
Test: make RunSettingsRoboTests
Change-Id: I1af7aad34aa65b616cf4edb8b144f315040a9fdd
2017-05-24 17:21:58 -07:00
Daniel Nishi
ec5e28ae9b Merge "Fix storage summary background colors." into oc-dev am: 8b8f27cd06
am: 4525f9387a

Change-Id: I8a30afbf999318fd7dabaf7d15ce38f99168353b
2017-05-23 17:51:17 +00:00
Fan Zhang
841d1d5aab Show shadow when entity header starts scrolling.
- Add a controller to manage add/remove onScrollChangedListener to
  recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
  elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.

Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
2017-05-22 17:16:24 -07:00
Fan Zhang
98289a887b Use entity header on AccountDetailDashboardFragment
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Iaf92730e8c6b5c44cb8eca4525fc931487ce9630
2017-05-18 16:36:32 -07:00
Fan Zhang
d7414259d0 Move entity header controller out of application package.
Bug: 37669238
Test: rerun robotests
Change-Id: I54eb30f28fa0a88a6f0b97b53f9f1408320b5ce0
2017-05-18 16:36:32 -07:00
Daniel Nishi
12dbce00c1 Fix storage summary background colors.
This changes the donut background color to a lighter blue and changes
the overall background to be a grey. Both of these colors match the
Battery implementation.

Bug: 35245772
Test: Manual
Change-Id: I8e12afe4434a0e2428384fc496cab5c05dc998ee
2017-05-18 11:36:10 -07:00
Fan Zhang
cbfe1eb881 Add title to SeekbarPreference content description.
Adding a title to contentDesciption of the seekbar.
The title is helpful to indicate which seekbar user is changing when
talkback is enabled.

Also move SeekBarPreference from root package to widget packge.

Change-Id: I793f41c4902e350b6bc6d62761362779cc3722a9
Fix: 35421942
Test: make RunSettingsRoboTests
2017-05-16 12:35:45 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Maurice Lam
c41e408aea Refactor choose lock password scrolling
Replace the negative margin + inset background hack with a overriding
call to requestRectangleOnScreen, which will also make a best effort
to show all the password requirements if there are multiple of them.

Bug: 38236574
Test: Added ScrollToParentEditTextTest
Change-Id: Id570652b64434b2d0b25c231540375d93884aaa9
2017-05-11 19:26:12 +00:00
Doris Ling
e249c00a3c Limit the summary text for App info->Permissions to one line.
- the summary text is the list of permissions that the app has. It is
dynamic, and when the list is long, setting the summary will expand
the text view height and make the page launch looks janky. We cannot
pre-set the summary to certain line, since the permissions list for each
app is unknown beforehand. To avoid the jank, limit the summary to 1
line and truncate it if necessary.

Change-Id: I1acb1ac9f46c55808ce03626e53cf71502231ab2
Fix: 36413664
Test: make RunSettingsRoboTests
2017-05-04 23:20:32 +00:00
Doris Ling
e2ad415fdb Add content description to the master switch toggle button.
Set the preference title as the toggle button's content description, so
that when user focus on the button, it will read the lable as well on
top of just "switch on" or "switch off".

Change-Id: Id1954fd54b7d38cb4e75d8b3e49d05ee694e0e41
Fix: 37618855
Test: make RunSettingsRoboTests
2017-04-27 15:09:21 -07:00
Julia Reynolds
c68ae0b9fd Channel settings updates
- Update master switch preference to store enabled state in case
it's set before the view holder is bound
- Update master switch preference to prevent disabled switches
from being toggled
- Show an importance summary for max importance
- properly handle null notification sounds

Change-Id: I395b95b76d2a3c1c94b41d1c2720bb0cf1cae917
Fixes: 36920159
Fixes: 37421928
Fixes: 36939825
Test: RunSettingsRoboTests & manual
2017-04-17 14:42:09 -04:00
Doris Ling
aa805e70ed Allow settings preference title to span over multiple lines.
- add singleLineTitle=false to SettingsPreference style, so that it will
not confined the title to a single line.
- remove the custom multi line title from DividerPreference and
MasterSwitchPreference.

Change-Id: I5a78d2cd6ac00c4482e252b0789fd2d265bd9adf
Fix: 34886787
Test: manual
2017-04-11 13:17:38 -07:00
Yohei Yukawa
63ca922354 Merge "Deprecate IMM#showSoftInputUnchecked() part 2" 2017-03-24 18:50:24 +00:00
TreeHugger Robot
775cb1479b Merge "Change "When in VR mode" to full screen radio button picker" 2017-03-24 00:47:37 +00:00
TreeHugger Robot
bf3ba3d121 Merge "Update the donut view to handle new string." 2017-03-23 21:21:53 +00:00
Fan Zhang
a0c2c11bbf Change "When in VR mode" to full screen radio button picker
Change-Id: I619af85f9c4a2c32daca786f49e898fde9b593f8
Fix: 36557316
Test: make RunSettingsRoboTests
2017-03-23 13:44:23 -07:00
Fan Zhang
a278962dbc Refactor DefaultAppPicker to a general radio button picker
Bug: 36557316
Test: make RunSettingsRoboTests
Change-Id: I52985e527e55697cf29f8d97d775d4bbed025beb
2017-03-23 12:41:31 -07:00
Daniel Nishi
5959c9279e Update the donut view to handle new string.
Change-Id: Idb5cec6d8169f3d229375faecc4bf96501481112
Fixes: 36224266
Test: Manually verified
2017-03-23 10:29:14 -07:00