Merge "Fix additional summary of RestrictedSwitchPreference." into nyc-dev

am: 205d10b

* commit '205d10bb136e36a17662fb1e60b0e002ca1f7158':
  Fix additional summary of RestrictedSwitchPreference.

Change-Id: Ib337bc61f870aa7f76a506ea46bea53009dbf715
This commit is contained in:
Sudheer Shanka
2016-04-20 21:11:28 +00:00
committed by android-build-merger

View File

@@ -94,9 +94,9 @@ public class RestrictedSwitchPreference extends SwitchPreference {
additionalSummaryView.setText(
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
additionalSummaryView.setVisibility(View.VISIBLE);
} else {
additionalSummaryView.setVisibility(View.GONE);
}
} else {
additionalSummaryView.setVisibility(View.GONE);
}
} else {
final TextView summaryView = (TextView) holder.findViewById(android.R.id.summary);
@@ -106,9 +106,9 @@ public class RestrictedSwitchPreference extends SwitchPreference {
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
summaryView.setVisibility(View.VISIBLE);
}
// No need to change the visibility to GONE in the else case here since Preference
// class would have already changed it if there is no summary to display.
}
// No need to change the visibility to GONE in the else case here since Preference class
// would have already changed it if there is no summary to display.
}
}