Commit Graph

257 Commits

Author SHA1 Message Date
Doris Ling
4ec4b64b9d Check for null activity before getting dashboard categories.
am: b7e650c6f7

Change-Id: I26f8c96189d3390055a7dd02680da57d2c2ed2cb
2016-07-22 01:42:47 +00:00
Doris Ling
b7e650c6f7 Check for null activity before getting dashboard categories.
In DashboardSummary, when async task finishes running, ensure that the
fragment is still associated with the activity before getting the
dashboard categories from the activity.

Change-Id: If23cd27a0d3e3429d900ae41ef6f24ed03b9e8d6
Fixes: 30278854
2016-07-21 12:22:17 -07:00
Doris Ling
b3055b083a Merge \"Combine setCategories() and setSuggestions() in DashboardAdapter.\" into nyc-mr1-dev
am: 7e70fd1166

Change-Id: Id8f655e0a9b29369a57eea3c5140cf47def7cc36
2016-07-20 18:51:17 +00:00
Doris Ling
7e70fd1166 Merge "Combine setCategories() and setSuggestions() in DashboardAdapter." into nyc-mr1-dev 2016-07-20 18:02:43 +00:00
Jason Monk
ff1132470b Merge \"Protect against work conditional crash\" into nyc-mr1-dev
am: bd6a4f9066

Change-Id: I6072b6235abb35da9ecac1f41b01cf82e75d868b
2016-07-20 13:33:57 +00:00
Jason Monk
bd6a4f9066 Merge "Protect against work conditional crash" into nyc-mr1-dev 2016-07-20 13:28:13 +00:00
Justin Klaassen
5d8b1ca588 Merge \"Add Night display settings conditional\" into nyc-mr1-dev
am: b57ee0e02f

Change-Id: I72715ad005fade9376d036ebe7abfde0c89bd1e5
2016-07-20 01:06:41 +00:00
Justin Klaassen
d60f09edaf Add Night display settings conditional
Bug: 30043281
Change-Id: I2464cd90f1f7f379aabf123f602e6150a87120cf
2016-07-19 14:31:46 -07:00
Jason Monk
31678f14e9 Protect against work conditional crash
Change-Id: Iba6e7281c622e3ba34fa6bd4672b2380b0329808
Fixes: 30014085
2016-07-19 14:22:14 -04:00
Christopher Wiley
9170100f6c Merge \"Do not use TetherUtil.setWifiTethering\" into nyc-mr1-dev
am: 62edbf484e

Change-Id: I023592acc146cbddb2917556a0fb7c3dade417f4
2016-07-19 16:02:42 +00:00
Christopher Wiley
9d251279ca Do not use TetherUtil.setWifiTethering
This functionality is replaced by ConnectivityManager.startTethering()
and ConnectivityManager.stopTethering().

Bug: 30147602
Test: Can toggle tethering on/off via all of settings, quick settings,
      and quick quick settings.
Change-Id: I4d190185c473237982b988f898e76d4997dc401c
2016-07-18 11:17:14 -07:00
Doris Ling
38d8582abe Combine setCategories() and setSuggestions() in DashboardAdapter.
In DashboardSummary.rebuildUI(), we first update the adapter with the
current categories, then run the async task to update the adapter with
the suggestions. This causes the adapter to first layout the existing
categories, and relayout when the suggestions is available. This causes
the suggestions view and categories view to overlap before the
relayout is complete.

Since categories and suggestions are borh set each time we try to
rebuild the UI, delaying the update for categories until the suggestions
are ready will avoid the unnecessary relayout of the list elements.

Ran app launch test for Settings app with the change and launch time is
between 412ms and 486ms in 10 runs, which does not show much delay in
app launch time with delaying updating the categories.

Bug: 29318104
Change-Id: I03ae2386392315f28fe2c361682f2f3252e9f827
2016-07-15 13:08:56 -07:00
Matthew Fritze
b51d45aed0 Merge \"Settings ViewPager now correctly handles RTL mode\" into nyc-mr1-dev
am: b8257e6fee

Change-Id: Id867babc43ed918eaf537a89284fe37d9068014d
2016-07-15 19:17:07 +00:00
Matthew Fritze
b8257e6fee Merge "Settings ViewPager now correctly handles RTL mode" into nyc-mr1-dev 2016-07-15 19:06:48 +00:00
Matthew Fritze
44564126c3 Settings ViewPager now correctly handles RTL mode
Previously, the settings and support tabs were incorrectly orderded,
and had inverted transitions on click and on swipe.
Ordering of tabs now correctly displays All Settings as the default,
right tab, and the Support tab to its left. The tab headers also now
function properly in transition, and onclick.

Change-Id: Iab499ee13433cb78941bc33cbb0e99ffe2937174
Fixes: 30079049
2016-07-15 11:55:53 -07:00
Doris Ling
7072bd2f1c Merge \"Revert equal check in DashboardAdapter.setCondition().\" into nyc-mr1-dev
am: 3468853cef

Change-Id: I136422e5b2dccf4f17ab5645bd6af48a1c47dc9a
2016-07-14 03:42:02 +00:00
Doris Ling
3468853cef Merge "Revert equal check in DashboardAdapter.setCondition()." into nyc-mr1-dev 2016-07-14 03:34:00 +00:00
Tony Mak
494fed5682 Merge \"Hide Set Wallpaper in Settings suggestion if it is not allowed\" into nyc-mr1-dev
am: 1a8be1e372

Change-Id: Ic8a85dbb4b654f6df0bad993a1cce986f60ab193
2016-07-14 01:38:16 +00:00
Tony Mak
1a8be1e372 Merge "Hide Set Wallpaper in Settings suggestion if it is not allowed" into nyc-mr1-dev 2016-07-14 01:22:52 +00:00
Fan Zhang
458024f52e Merge \"Add content description to escalation card title.\" into nyc-mr1-dev
am: 31e5d5bb4b

Change-Id: I990a9c8a0adc41b976fcaaf177b90a74c32d4be7
2016-07-13 23:36:52 +00:00
Doris Ling
08d34b6a99 Revert equal check in DashboardAdapter.setCondition().
1. Remove the equality check for the conditions list which causes
"Airplane mode is on" to be shown always even when airplane mode is
turned off.
2. Also add mIsShowingAll and mSuggestionMode to instance state.

Bug: 30055644
Change-Id: I0709e9a1b0139e80cdb834cb76a9334dce753e14
2016-07-13 16:17:13 -07:00
Fan Zhang
0bd87d71b8 Add content description to escalation card title.
Bug: 30079904

In strings like "We're here for you 24/7", to avoid talkback read 24/7
as 24/7ths, we need to provide a custom content description.

Change-Id: If51586d97a376e7a859658d7a6dc48108094ddc2
2016-07-13 13:47:04 -07:00
Fan Zhang
7d1ef4ca3c Merge \"Cross fade escalation card when content changes.\" into nyc-mr1-dev
am: b10df69a84

Change-Id: I2fe2f2ab2cad15e1ee60ba7dafb3ccd7fd349604
2016-07-13 19:51:35 +00:00
TreeHugger Robot
b10df69a84 Merge "Cross fade escalation card when content changes." into nyc-mr1-dev 2016-07-13 19:46:02 +00:00
Fan Zhang
060287a805 Merge \"Tweak layouts to make support UI look better.\" into nyc-mr1-dev
am: 8b47c12550

Change-Id: I29e31e40f60f160e26c1ec17afb4cb60cbe90b7a
2016-07-13 18:57:40 +00:00
TreeHugger Robot
8b47c12550 Merge "Tweak layouts to make support UI look better." into nyc-mr1-dev 2016-07-13 18:51:54 +00:00
Doris Ling
161093bb0a Merge \"Reduce the number of times that dataset changed is triggerd in DashboardAdapter\" into nyc-mr1-dev
am: 8c50ced07c

Change-Id: I0989b7f8e122d5221757b57b1866d536a1657ae3
2016-07-13 17:25:16 +00:00
Fan Zhang
5df6364d89 Cross fade escalation card when content changes.
Fixes: 30079520

Whenever escalation card needs to change content:
- Instead of rebuilding entire data set, rebuild just escalation data.
- Instead of notify entire data set change, only notify the position
  change for escalation card.
This triggers the cross-fade animation in RecyclerView's
DefaultItemAnimator.

Change-Id: Ia19593d852fa6a1c366aecf9330d8274d7295e85
2016-07-13 10:23:52 -07:00
Fan Zhang
55c6ea25f4 Tweak layouts to make support UI look better.
Fixes: 30087623

- Removed some padding and hide empty textviews.

Change-Id: Id8476aa3870d796c5f5a34c2f3fa6db34918691b
2016-07-13 10:19:56 -07:00
Doris Ling
8c50ced07c Merge "Reduce the number of times that dataset changed is triggerd in DashboardAdapter" into nyc-mr1-dev 2016-07-13 17:13:05 +00:00
Tony Mak
2c5a27dc7a Hide Set Wallpaper in Settings suggestion if it is not allowed
Change-Id: I8030389f3fe945c3df241f347d58b8da04622d9e
Fix: 30089761
2016-07-13 17:57:33 +08:00
Fan Zhang
85a11e7f82 Merge \"Request support rules to refresh when account changes.\" into nyc-mr1-dev
am: 987eadbd4b

Change-Id: I7ff6ead262c69d18b8a5fc746e58c1a62a23e68a
2016-07-13 01:25:45 +00:00
Doris Ling
b76de265a2 Reduce the number of times that dataset changed is triggerd in DashboardAdapter
1. Save the suggestion list and the category list into the instance
state so that it will be available on warm start, and avoid the need
to reload the data.
2. Add the condition list to the constructor parameters for
DashboardAdapter, so that it does not need to setConditions()
separately which will trigger notifyDataSetChanged()

Bug: 30055644
Change-Id: Ia04fa3a25b13d2dacf6baf5f412d662a595fb6dd
2016-07-12 18:02:22 -07:00
Fan Zhang
eadc7dc815 Request support rules to refresh when account changes.
Bug: 30079512

When account is added, operation rule can potentially change. Request a
refresh to make sure user sees the latest UI.

Change-Id: I89e9d97bec22d612ca3602d86cc63f8f06355a39
2016-07-12 16:42:40 -07:00
Daniel Nishi
d2965dfe3d Merge \"Don\'t show the Fingerprint suggestion if it is disabled.\" into nyc-mr1-dev
am: 8dc1a7340b

Change-Id: If6f0c6307b3c617b0c07c5cf9a69899ae893009c
2016-07-12 21:49:33 +00:00
Daniel Nishi
c9ec8c80bc Don't show the Fingerprint suggestion if it is disabled.
Bug: 27202317
Change-Id: I8e97e47f711961cf127fc2135dd06812236829b8
2016-07-12 13:11:19 -07:00
Fan Zhang
0e2c45b5df UI updates for support tab.
am: 48aab452cb

Change-Id: I7d2bb55979e6b2a4dfe944552fe9a50a184fe573
2016-07-08 19:21:26 +00:00
Fan Zhang
48aab452cb UI updates for support tab.
Fixes: 29999181
Fixes: 29397123

- Reduce support tile min height to 48dp.
- Add a 8dp spacer between escalation card and first support tile.
- Show different off-hour support escalation title when support hour is
  always avaiable.

Change-Id: I4dacf2b375734c4819b9b19b68fc84faf083c0d4
2016-07-08 10:26:29 -07:00
Fan Zhang
caf4498597 Fix strings for support tab.
am: 4178710f3d

Change-Id: Iaf5c0945180fab00986827f03dd1bdf9b4c224eb
2016-07-07 15:37:23 +00:00
Fan Zhang
4178710f3d Fix strings for support tab.
Bug: 29105266

- Fix typos in string and comments
- Use 2 different strings for off-hour and off-line cases.

Change-Id: I63859605ff7185d5f8cc66fd31b56f1d09ed11aa
2016-07-07 08:27:25 -07:00
Fan Zhang
5efd8009df Merge \"Add logging when click tollfree/tolled phone support button\" into nyc-mr1-dev
am: a0eb2997a9

Change-Id: I7a0d7e8cf410e05e578690b6ece69d6489fb3d81
2016-07-06 20:56:03 +00:00
TreeHugger Robot
a0eb2997a9 Merge "Add logging when click tollfree/tolled phone support button" into nyc-mr1-dev 2016-07-06 20:44:04 +00:00
Fan Zhang
afa4fff821 Merge \"Remove search in support tab.\" into nyc-mr1-dev
am: bae81b4a6f

Change-Id: I59e7b9dffd8c488397b6904928e6c56a4ad0664d
2016-07-06 20:14:46 +00:00
Fan Zhang
ece8ff63b6 Remove search in support tab.
Bug: 29397123
Change-Id: Id2d43724696c04e890adba562b5476e1834779da
2016-07-06 09:54:07 -07:00
Fan Zhang
0e2e738400 Merge \"Update escalation cards layout and data binding.\" into nyc-mr1-dev
am: eef9dbcdb9

Change-Id: I1d5d80d7c60b72f0cb4d8d9eb91679000f278f6d
2016-07-01 18:31:18 +00:00
Fan Zhang
a9f7016acd Add logging when click tollfree/tolled phone support button
Bug: 29105266
Change-Id: Ide67c74b6c072c937f97269ad33800cca68a672d
2016-07-01 11:18:13 -07:00
Fan Zhang
016bd60491 Update escalation cards layout and data binding.
Bug: 29397123

- Updated the UI for support escalation cards so different state have
  the same height and text/button shows up at roughly same place.
- Split data model for escalation cards from SupportData. The data and
  UI between escalation cards and support tiles are different enough
  that it no longer makes sense to share the same data object.

Change-Id: I328cc33961b9638e5e5fc2cad3ebf443991f4d0c
2016-06-30 13:57:22 -07:00
Fan Zhang
8ea45ff337 Merge \"Fix a bug where selected country is reset.\" into nyc-mr1-dev
am: 57824d5aaa

Change-Id: I1b5c64822a80b9cc493b47a4b7a37fb5a19cf3bb
2016-06-30 17:03:04 +00:00
TreeHugger Robot
57824d5aaa Merge "Fix a bug where selected country is reset." into nyc-mr1-dev 2016-06-30 16:51:55 +00:00
Fan Zhang
a05a1b15d8 Merge \"Update UI for support tab.\" into nyc-mr1-dev
am: 0293fb40f2

Change-Id: I2126800fbd52201ac25a150ec9e8acf66c0526b1
2016-06-30 15:28:43 +00:00