Correctly restrict UI for WifiSettings in Guest profile.

Makes sure the restricted user does not see Wifi Preferences
or Saved Networks activity. Also fixes a bug where the progress
bar is displayed starting the activity in Guest mode, and does not go
away. LinkablePreference is changed to make sure titles can be
multi-lined.

Bug: 35317523
Bug: 35318292
Test: to be done in b/35324506
Change-Id: I4a07a2ab3a83c3adaf87226969fd6f16e41c9419
This commit is contained in:
Stephen Chen
2017-02-14 13:56:03 -08:00
parent 1f52676019
commit 8fc61244ef
2 changed files with 15 additions and 5 deletions

View File

@@ -55,11 +55,15 @@ public class LinkablePreference extends Preference {
super.onBindViewHolder(view);
TextView textView = (TextView) view.findViewById(android.R.id.title);
if (textView == null || mContentTitle == null || mClickListener == null) {
if (textView == null) {
return;
}
textView.setSingleLine(false);
if (mContentTitle == null || mClickListener == null) {
return;
}
textView.setSingleLine(false);
StringBuilder contentBuilder = new StringBuilder().append(mContentTitle);
if (mContentDescription != null) {
contentBuilder.append("\n\n");