Settings: Optimize the selected WFD route preference summary
RouteInfo has several status values, such as unavailable status. But according to current logic, unavailable status will be displayed as connnected. it is not reasonable. Update and optimize the route preference summary with the real WFD status value. Change-Id: Iacd10e0133d06ef0b86da38cf763fe7def6ed7de Buganizer: 231656030
This commit is contained in:
@@ -38,6 +38,7 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Slog;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Menu;
|
||||
@@ -678,7 +679,12 @@ public final class WifiDisplaySettings extends SettingsPreferenceFragment implem
|
||||
if (route.isConnecting()) {
|
||||
setSummary(R.string.wifi_display_status_connecting);
|
||||
} else {
|
||||
setSummary(R.string.wifi_display_status_connected);
|
||||
CharSequence status = route.getStatus();
|
||||
if (!TextUtils.isEmpty(status)) {
|
||||
setSummary(status);
|
||||
} else {
|
||||
setSummary(R.string.wifi_display_status_connected);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user