diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2014-10-17 14:06:22 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2014-10-17 14:06:22 -0700 |
commit | 44db45ac11c024dfd5aff9ce3af82ef8049394cb (patch) | |
tree | a9c49ae327b6597e42d8d700fe51e844a48d70d7 /src | |
parent | 1bc996532ca5c53efaaa5718d7ba4d0ad9710571 (diff) | |
download | packages_apps_Settings-44db45ac11c024dfd5aff9ce3af82ef8049394cb.tar.gz packages_apps_Settings-44db45ac11c024dfd5aff9ce3af82ef8049394cb.tar.bz2 packages_apps_Settings-44db45ac11c024dfd5aff9ce3af82ef8049394cb.zip |
Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, convert Trusted Credentials CheckBoxes to Switches
Change-Id: If878e8c10454a212ba9052280e3cbb17c0fdeeca
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/TrustedCredentialsSettings.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/settings/TrustedCredentialsSettings.java b/src/com/android/settings/TrustedCredentialsSettings.java index 14c4936e9..427e9d319 100644 --- a/src/com/android/settings/TrustedCredentialsSettings.java +++ b/src/com/android/settings/TrustedCredentialsSettings.java @@ -43,12 +43,12 @@ import android.widget.ArrayAdapter; import android.widget.BaseAdapter; import android.widget.BaseExpandableListAdapter; import android.widget.Button; -import android.widget.CheckBox; import android.widget.ExpandableListView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.Spinner; +import android.widget.Switch; import android.widget.TabHost; import android.widget.TextView; @@ -90,17 +90,17 @@ public class TrustedCredentialsSettings extends Fragment { private final int mProgress; private final int mList; private final int mExpandableList; - private final boolean mCheckbox; + private final boolean mSwitch; private Tab(String tag, int label, int view, int progress, int list, int expandableList, - boolean checkbox) { + boolean withSwitch) { mTag = tag; mLabel = label; mView = view; mProgress = progress; mList = list; mExpandableList = expandableList; - mCheckbox = checkbox; + mSwitch = withSwitch; } private List<ParcelableString> getAliases(IKeyChainService service) throws RemoteException { @@ -148,7 +148,7 @@ public class TrustedCredentialsSettings extends Fragment { } private void postOperationUpdate(boolean ok, CertHolder certHolder) { if (ok) { - if (certHolder.mTab.mCheckbox) { + if (certHolder.mTab.mSwitch) { certHolder.mDeleted = !certHolder.mDeleted; } else { certHolder.mAdapter.remove(certHolder); @@ -586,7 +586,7 @@ public class TrustedCredentialsSettings extends Fragment { convertView.findViewById(R.id.trusted_credential_subject_primary); holder.mSubjectSecondaryView = (TextView) convertView.findViewById(R.id.trusted_credential_subject_secondary); - holder.mCheckBox = (CheckBox) convertView.findViewById( + holder.mSwitch = (Switch) convertView.findViewById( R.id.trusted_credential_status); convertView.setTag(holder); } else { @@ -594,9 +594,9 @@ public class TrustedCredentialsSettings extends Fragment { } holder.mSubjectPrimaryView.setText(certHolder.mSubjectPrimary); holder.mSubjectSecondaryView.setText(certHolder.mSubjectSecondary); - if (mTab.mCheckbox) { - holder.mCheckBox.setChecked(!certHolder.mDeleted); - holder.mCheckBox.setVisibility(View.VISIBLE); + if (mTab.mSwitch) { + holder.mSwitch.setChecked(!certHolder.mDeleted); + holder.mSwitch.setVisibility(View.VISIBLE); } return convertView; } @@ -604,7 +604,7 @@ public class TrustedCredentialsSettings extends Fragment { private static class ViewHolder { private TextView mSubjectPrimaryView; private TextView mSubjectSecondaryView; - private CheckBox mCheckBox; + private Switch mSwitch; } private void showCertDialog(final CertHolder certHolder) { |