summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Reynolds <juliacr@google.com> 2016-06-14 20:42:14 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-06-14 20:42:15 +0000
commita64e3a0844d6a02e89e6f73f17ffaa37de5ac0c7 (patch)
tree6c2a1991a1bf1f5730755888db15b7678c0adf68
parent2f4636a33357d9b2a4acf652f85873845c2e7d02 (diff)
parent8897a5044b6e2612c80fecb72de031027229c2a0 (diff)
Merge "Revert "Announce access point changes."" into nyc-dev
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
index e071f6a07170..284827b57929 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
@@ -28,13 +28,10 @@ import android.support.v7.preference.PreferenceViewHolder;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.SparseArray;
-import android.view.View;
import android.widget.TextView;
import com.android.settingslib.R;
-import java.util.Objects;
-
public class AccessPointPreference extends Preference {
private static final int[] STATE_SECURED = {
@@ -111,7 +108,6 @@ public class AccessPointPreference extends Preference {
mTitleView.setCompoundDrawablePadding(mBadgePadding);
}
view.itemView.setContentDescription(mContentDescription);
- view.itemView.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_POLITE);
}
protected void updateIcon(int level, Context context) {
@@ -152,7 +148,6 @@ public class AccessPointPreference extends Preference {
* Updates the title and summary; may indirectly call notifyChanged().
*/
public void refresh() {
- boolean updated = false;
if (mForSavedNetworks) {
setTitle(mAccessPoint.getConfigName());
} else {
@@ -164,28 +159,21 @@ public class AccessPointPreference extends Preference {
if (level != mLevel) {
mLevel = level;
updateIcon(mLevel, context);
- updated = true;
+ notifyChanged();
}
updateBadge(context);
setSummary(mForSavedNetworks ? mAccessPoint.getSavedNetworkSummary()
: mAccessPoint.getSettingsSummary());
- CharSequence contentDescription = getTitle();
+ mContentDescription = getTitle();
if (getSummary() != null) {
- contentDescription = TextUtils.concat(contentDescription, ",", getSummary());
+ mContentDescription = TextUtils.concat(mContentDescription, ",", getSummary());
}
if (level >= 0 && level < WIFI_CONNECTION_STRENGTH.length) {
- contentDescription = TextUtils.concat(contentDescription, ",",
+ mContentDescription = TextUtils.concat(mContentDescription, ",",
getContext().getString(WIFI_CONNECTION_STRENGTH[level]));
}
- if (!Objects.equals(contentDescription, mContentDescription)) {
- mContentDescription = contentDescription;
- updated = true;
- }
- if (updated) {
- notifyChanged();
- }
}
@Override