Switch to use ThreadUtils.postOnMainThread
Change-Id: I344d25a1a667de9c0b23d6d528d905b4da3a4c40 Fixes: 63896139 Test: rerun tests
This commit is contained in:
@@ -61,6 +61,7 @@ import android.widget.TextView;
|
||||
import com.android.settings.ProxySelector;
|
||||
import com.android.settings.R;
|
||||
import com.android.settingslib.Utils;
|
||||
import com.android.settingslib.utils.ThreadUtils;
|
||||
import com.android.settingslib.wifi.AccessPoint;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
@@ -116,8 +117,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
/* Full list of phase2 methods */
|
||||
private final ArrayAdapter<String> mPhase2FullAdapter;
|
||||
|
||||
private final Handler mTextViewChangedHandler;
|
||||
|
||||
// e.g. AccessPoint.SECURITY_NONE
|
||||
private int mAccessPointSecurity;
|
||||
private TextView mPasswordView;
|
||||
@@ -175,7 +174,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
accessPoint.getSecurity();
|
||||
mMode = mode;
|
||||
|
||||
mTextViewChangedHandler = new Handler();
|
||||
mContext = mConfigUi.getContext();
|
||||
final Resources res = mContext.getResources();
|
||||
|
||||
@@ -1258,12 +1256,10 @@ public class WifiConfigController implements TextWatcher,
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
mTextViewChangedHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
showWarningMessagesIfAppropriate();
|
||||
enableSubmitIfAppropriate();
|
||||
}
|
||||
});
|
||||
ThreadUtils.postOnMainThread(() -> {
|
||||
showWarningMessagesIfAppropriate();
|
||||
enableSubmitIfAppropriate();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user