Loading AndroidManifest.xml +10 −0 Original line number Diff line number Diff line Loading @@ -2514,6 +2514,16 @@ android:excludeFromRecents="true"> </activity> <activity android:name=".wifi.WifiDialogActivity" android:theme="@style/Transparent" android:excludeFromRecents="true" android:exported="true"> <intent-filter> <action android:name="com.android.settings.WIFI_DIALOG" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".sim.SimDialogActivity" android:theme="@android:style/Theme.Material.Light.Dialog.NoActionBar" android:label="@string/sim_settings_title" Loading res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ </style> <style name="Transparent"> <item name="android:alertDialogTheme">@style/Theme.AlertDialog</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsFloating">true</item> Loading src/com/android/settings/wifi/SavedAccessPointsWifiSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class SavedAccessPointsWifiSettings extends SettingsPreferenceFragment final boolean hideForgetButton = WifiSettings.isEditabilityLockedDown(getActivity(), mDlgAccessPoint.getConfig()); mDialog = new WifiDialog(getActivity(), this, mDlgAccessPoint, false /* not editting */, false, true /* hide the submit button */, WifiConfigUiBase.MODE_VIEW, true /* hide the submit button */, hideForgetButton); return mDialog; Loading src/com/android/settings/wifi/WifiConfigController.java +15 −16 Original line number Diff line number Diff line Loading @@ -144,23 +144,20 @@ public class WifiConfigController implements TextWatcher, private StaticIpConfiguration mStaticIpConfiguration = null; private String[] mLevels; private boolean mEdit; private boolean mModify; private int mMode; private TextView mSsidView; private Context mContext; public WifiConfigController( WifiConfigUiBase parent, View view, AccessPoint accessPoint, boolean edit, boolean modify) { public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint, int mode) { mConfigUi = parent; mView = view; mAccessPoint = accessPoint; mAccessPointSecurity = (accessPoint == null) ? AccessPoint.SECURITY_NONE : accessPoint.getSecurity(); mEdit = edit; mModify = modify; mMode = mode; mTextViewChangedHandler = new Handler(); mContext = mConfigUi.getContext(); Loading Loading @@ -238,7 +235,7 @@ public class WifiConfigController implements TextWatcher, } if ((!mAccessPoint.isSaved() && !mAccessPoint.isActive()) || mEdit) { || mMode != WifiConfigUiBase.MODE_VIEW) { showSecurityFields(); showIpConfigFields(); showProxyFields(); Loading @@ -251,8 +248,10 @@ public class WifiConfigController implements TextWatcher, } } if (mModify) { if (mMode == WifiConfigUiBase.MODE_MODIFY) { mConfigUi.setSubmitButton(res.getString(R.string.wifi_save)); } else if (mMode == WifiConfigUiBase.MODE_CONNECT) { mConfigUi.setSubmitButton(res.getString(R.string.wifi_connect)); } else { final DetailedState state = mAccessPoint.getDetailedState(); final String signalLevel = getSignalString(); Loading Loading @@ -376,7 +375,7 @@ public class WifiConfigController implements TextWatcher, } /* package */ WifiConfiguration getConfig() { if (!mEdit) { if (mMode == WifiConfigUiBase.MODE_VIEW) { return null; } Loading Loading @@ -966,12 +965,8 @@ public class WifiConfigController implements TextWatcher, } } public boolean isEdit() { return mEdit; } public boolean isModify() { return mModify; public int getMode() { return mMode; } @Override Loading Loading @@ -1066,4 +1061,8 @@ public class WifiConfigController implements TextWatcher, InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD : InputType.TYPE_TEXT_VARIATION_PASSWORD)); } public AccessPoint getAccessPoint() { return mAccessPoint; } } src/com/android/settings/wifi/WifiConfigUiBase.java +17 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,26 @@ import android.widget.Button; * Foundation interface glues between Activities and UIs like {@link WifiDialog}. */ public interface WifiConfigUiBase { /** * Viewing mode for a Wi-Fi access point. Data is displayed in non-editable mode. */ int MODE_VIEW = 0; /** * Connect mode. Data is displayed in editable mode, and a connect button will be shown. */ int MODE_CONNECT = 1; /** * Modify mode. All data is displayed in editable fields, and a "save" button is shown instead * of "connect". Clients are expected to only save but not connect to the access point in this * mode. */ int MODE_MODIFY = 2; public Context getContext(); public WifiConfigController getController(); public LayoutInflater getLayoutInflater(); public boolean isEdit(); public int getMode(); public void dispatchSubmit(); Loading Loading
AndroidManifest.xml +10 −0 Original line number Diff line number Diff line Loading @@ -2514,6 +2514,16 @@ android:excludeFromRecents="true"> </activity> <activity android:name=".wifi.WifiDialogActivity" android:theme="@style/Transparent" android:excludeFromRecents="true" android:exported="true"> <intent-filter> <action android:name="com.android.settings.WIFI_DIALOG" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name=".sim.SimDialogActivity" android:theme="@android:style/Theme.Material.Light.Dialog.NoActionBar" android:label="@string/sim_settings_title" Loading
res/values/styles.xml +1 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ </style> <style name="Transparent"> <item name="android:alertDialogTheme">@style/Theme.AlertDialog</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsFloating">true</item> Loading
src/com/android/settings/wifi/SavedAccessPointsWifiSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class SavedAccessPointsWifiSettings extends SettingsPreferenceFragment final boolean hideForgetButton = WifiSettings.isEditabilityLockedDown(getActivity(), mDlgAccessPoint.getConfig()); mDialog = new WifiDialog(getActivity(), this, mDlgAccessPoint, false /* not editting */, false, true /* hide the submit button */, WifiConfigUiBase.MODE_VIEW, true /* hide the submit button */, hideForgetButton); return mDialog; Loading
src/com/android/settings/wifi/WifiConfigController.java +15 −16 Original line number Diff line number Diff line Loading @@ -144,23 +144,20 @@ public class WifiConfigController implements TextWatcher, private StaticIpConfiguration mStaticIpConfiguration = null; private String[] mLevels; private boolean mEdit; private boolean mModify; private int mMode; private TextView mSsidView; private Context mContext; public WifiConfigController( WifiConfigUiBase parent, View view, AccessPoint accessPoint, boolean edit, boolean modify) { public WifiConfigController(WifiConfigUiBase parent, View view, AccessPoint accessPoint, int mode) { mConfigUi = parent; mView = view; mAccessPoint = accessPoint; mAccessPointSecurity = (accessPoint == null) ? AccessPoint.SECURITY_NONE : accessPoint.getSecurity(); mEdit = edit; mModify = modify; mMode = mode; mTextViewChangedHandler = new Handler(); mContext = mConfigUi.getContext(); Loading Loading @@ -238,7 +235,7 @@ public class WifiConfigController implements TextWatcher, } if ((!mAccessPoint.isSaved() && !mAccessPoint.isActive()) || mEdit) { || mMode != WifiConfigUiBase.MODE_VIEW) { showSecurityFields(); showIpConfigFields(); showProxyFields(); Loading @@ -251,8 +248,10 @@ public class WifiConfigController implements TextWatcher, } } if (mModify) { if (mMode == WifiConfigUiBase.MODE_MODIFY) { mConfigUi.setSubmitButton(res.getString(R.string.wifi_save)); } else if (mMode == WifiConfigUiBase.MODE_CONNECT) { mConfigUi.setSubmitButton(res.getString(R.string.wifi_connect)); } else { final DetailedState state = mAccessPoint.getDetailedState(); final String signalLevel = getSignalString(); Loading Loading @@ -376,7 +375,7 @@ public class WifiConfigController implements TextWatcher, } /* package */ WifiConfiguration getConfig() { if (!mEdit) { if (mMode == WifiConfigUiBase.MODE_VIEW) { return null; } Loading Loading @@ -966,12 +965,8 @@ public class WifiConfigController implements TextWatcher, } } public boolean isEdit() { return mEdit; } public boolean isModify() { return mModify; public int getMode() { return mMode; } @Override Loading Loading @@ -1066,4 +1061,8 @@ public class WifiConfigController implements TextWatcher, InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD : InputType.TYPE_TEXT_VARIATION_PASSWORD)); } public AccessPoint getAccessPoint() { return mAccessPoint; } }
src/com/android/settings/wifi/WifiConfigUiBase.java +17 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,26 @@ import android.widget.Button; * Foundation interface glues between Activities and UIs like {@link WifiDialog}. */ public interface WifiConfigUiBase { /** * Viewing mode for a Wi-Fi access point. Data is displayed in non-editable mode. */ int MODE_VIEW = 0; /** * Connect mode. Data is displayed in editable mode, and a connect button will be shown. */ int MODE_CONNECT = 1; /** * Modify mode. All data is displayed in editable fields, and a "save" button is shown instead * of "connect". Clients are expected to only save but not connect to the access point in this * mode. */ int MODE_MODIFY = 2; public Context getContext(); public WifiConfigController getController(); public LayoutInflater getLayoutInflater(); public boolean isEdit(); public int getMode(); public void dispatchSubmit(); Loading