Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f182f14 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Fix additional summary of RestrictedSwitchPreference.

Bug: 27659072
Change-Id: I27fec7d5bf3daeb5525cf45c328aa2f0c93f7490
parent c6184685
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -94,10 +94,10 @@ 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 {
            final TextView summaryView = (TextView) holder.findViewById(android.R.id.summary);
            if (summaryView != null) {
@@ -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.
        }
    }