Methods Summary |
---|
public int | compareTo(android.preference.Preference another)
if (!(another instanceof AccessPointPreference)) {
// Let normal preferences go before us.
// NOTE: we should only be compared to Preference in our
// category.
return 1;
}
return mState.compareTo(((AccessPointPreference) another).mState);
|
public AccessPointState | getAccessPointState()Returns the {@link AccessPointState} associated with this preference.
return mState;
|
private int | getUiSignalLevel()
return mState != null ? WifiManager.calculateSignalLevel(mState.signal, UI_SIGNAL_LEVELS)
: 0;
|
protected void | onBindView(android.view.View view)
super.onBindView(view);
ImageView signal = (ImageView) view.findViewById(R.id.signal);
if (mState.seen) {
signal.setImageResource(R.drawable.wifi_signal);
signal.setImageState(mState.hasSecurity() ? STATE_ENCRYPTED : STATE_EMPTY, true);
signal.setImageLevel(getUiSignalLevel());
} else {
signal.setImageDrawable(null);
}
|
public void | refresh()
setTitle(mState.getHumanReadableSsid());
setSummary(mState.getSummarizedStatus());
notifyChanged();
|
public void | refreshAccessPointState()
refresh();
// The ordering of access points could have changed due to the state change, so
// re-evaluate ordering
notifyHierarchyChanged();
|