Loading packages/SettingsLib/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ <declare-styleable name="WifiEncryptionState"> <attr name="state_encrypted" format="boolean" /> </declare-styleable> <declare-styleable name="WifiMeteredState"> <attr name="state_metered" format="boolean" /> </declare-styleable> <declare-styleable name="WifiSavedState"> <attr name="state_saved" format="boolean" /> </declare-styleable> Loading packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java +6 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,10 @@ public class AccessPointPreference extends Preference { R.attr.state_encrypted }; private static final int[] STATE_METERED = { R.attr.state_metered }; private static final int[] wifi_friction_attributes = { R.attr.wifi_friction }; private final StateListDrawable mFrictionSld; Loading Loading @@ -179,6 +183,8 @@ public class AccessPointPreference extends Preference { } if (mAccessPoint.getSecurity() != AccessPoint.SECURITY_NONE) { mFrictionSld.setState(STATE_SECURED); } else if (mAccessPoint.getConfig() != null && mAccessPoint.getConfig().meteredHint) { mFrictionSld.setState(STATE_METERED); } Drawable drawable = mFrictionSld.getCurrent(); frictionImageView.setImageDrawable(drawable); Loading Loading
packages/SettingsLib/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ <declare-styleable name="WifiEncryptionState"> <attr name="state_encrypted" format="boolean" /> </declare-styleable> <declare-styleable name="WifiMeteredState"> <attr name="state_metered" format="boolean" /> </declare-styleable> <declare-styleable name="WifiSavedState"> <attr name="state_saved" format="boolean" /> </declare-styleable> Loading
packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java +6 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,10 @@ public class AccessPointPreference extends Preference { R.attr.state_encrypted }; private static final int[] STATE_METERED = { R.attr.state_metered }; private static final int[] wifi_friction_attributes = { R.attr.wifi_friction }; private final StateListDrawable mFrictionSld; Loading Loading @@ -179,6 +183,8 @@ public class AccessPointPreference extends Preference { } if (mAccessPoint.getSecurity() != AccessPoint.SECURITY_NONE) { mFrictionSld.setState(STATE_SECURED); } else if (mAccessPoint.getConfig() != null && mAccessPoint.getConfig().meteredHint) { mFrictionSld.setState(STATE_METERED); } Drawable drawable = mFrictionSld.getCurrent(); frictionImageView.setImageDrawable(drawable); Loading