Remove unnecessary codes around WifiSettings.
Bug: 3321110 Change-Id: Iaac35a507b8e46e2d4702f0e5cda7b515a57db67
This commit is contained in:
@@ -116,17 +116,6 @@
|
|||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<!-- TODO: should be removed -->
|
|
||||||
<Button android:id="@+id/wifi_setup_detail"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/wifi_config_ui"
|
|
||||||
android:layout_alignLeft="@id/wifi_config_ui"
|
|
||||||
android:gravity="left|center_vertical"
|
|
||||||
android:text="@string/wifi_setup_detail"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/right_buttons"
|
android:id="@+id/right_buttons"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@@ -356,15 +356,6 @@ public class WifiSettings extends SettingsPreferenceFragment
|
|||||||
mDialog.show();
|
mDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called from {@link WifiSettingsForSetupWizardXL} when the object wants to open
|
|
||||||
* {@link WifiDialog} anyway, though usually it prepares its own simplified UI for
|
|
||||||
* configuring a wifi network.
|
|
||||||
*/
|
|
||||||
/* package */ void showDialogForSelectedPreference() {
|
|
||||||
showDialog(mSelectedAccessPoint, mEdit);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean requireKeyStore(WifiConfiguration config) {
|
private boolean requireKeyStore(WifiConfiguration config) {
|
||||||
if (WifiConfigController.requireKeyStore(config) &&
|
if (WifiConfigController.requireKeyStore(config) &&
|
||||||
KeyStore.getInstance().test() != KeyStore.NO_ERROR) {
|
KeyStore.getInstance().test() != KeyStore.NO_ERROR) {
|
||||||
|
@@ -77,9 +77,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
private Button mForgetButton;
|
private Button mForgetButton;
|
||||||
private Button mBackButton;
|
private Button mBackButton;
|
||||||
|
|
||||||
// Not used now.
|
|
||||||
private Button mDetailButton;
|
|
||||||
|
|
||||||
// true when a user already pressed "Connect" button and waiting for connection.
|
// true when a user already pressed "Connect" button and waiting for connection.
|
||||||
// Also true when the device is already connected to a wifi network on launch.
|
// Also true when the device is already connected to a wifi network on launch.
|
||||||
private boolean mAfterConnectAction;
|
private boolean mAfterConnectAction;
|
||||||
@@ -98,6 +95,7 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
// To let users exit this Activity, we enable the button after waiting for a moment.
|
// To let users exit this Activity, we enable the button after waiting for a moment.
|
||||||
private final int DELAYED_SKIP_ENABLE_TIME = 10000; // Unit: millis
|
private final int DELAYED_SKIP_ENABLE_TIME = 10000; // Unit: millis
|
||||||
private final Runnable mSkipButtonEnabler = new Runnable() {
|
private final Runnable mSkipButtonEnabler = new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (DEBUG) Log.d(TAG, "Delayed skip enabler starts running.");
|
if (DEBUG) Log.d(TAG, "Delayed skip enabler starts running.");
|
||||||
mSkipOrNextButton.setEnabled(true);
|
mSkipOrNextButton.setEnabled(true);
|
||||||
@@ -145,8 +143,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
mForgetButton.setOnClickListener(this);
|
mForgetButton.setOnClickListener(this);
|
||||||
mBackButton = (Button)findViewById(R.id.wifi_setup_cancel);
|
mBackButton = (Button)findViewById(R.id.wifi_setup_cancel);
|
||||||
mBackButton.setOnClickListener(this);
|
mBackButton.setOnClickListener(this);
|
||||||
mDetailButton = (Button)findViewById(R.id.wifi_setup_detail);
|
|
||||||
mDetailButton.setOnClickListener(this);
|
|
||||||
|
|
||||||
// At first, Wifi module doesn't return SCANNING state (it's too early), so we manually
|
// At first, Wifi module doesn't return SCANNING state (it's too early), so we manually
|
||||||
// show it.
|
// show it.
|
||||||
@@ -161,7 +157,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
mConnectButton.setVisibility(View.GONE);
|
mConnectButton.setVisibility(View.GONE);
|
||||||
mForgetButton.setVisibility(View.GONE);
|
mForgetButton.setVisibility(View.GONE);
|
||||||
mBackButton.setVisibility(View.GONE);
|
mBackButton.setVisibility(View.GONE);
|
||||||
mDetailButton.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -191,9 +186,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
} else if (view == mBackButton) {
|
} else if (view == mBackButton) {
|
||||||
if (DEBUG) Log.d(TAG, "Back button pressed");
|
if (DEBUG) Log.d(TAG, "Back button pressed");
|
||||||
onBackButtonPressed();
|
onBackButtonPressed();
|
||||||
} else if (view == mDetailButton) {
|
|
||||||
if (DEBUG) Log.d(TAG, "Detail button pressed");
|
|
||||||
mWifiSettings.showDialogForSelectedPreference();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,8 +284,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
// onConfigUiShown() will be called.
|
// onConfigUiShown() will be called.
|
||||||
mWifiSettings.onAddNetworkPressed();
|
mWifiSettings.onAddNetworkPressed();
|
||||||
|
|
||||||
// We don't need detail button since all the details are in the main screen.
|
|
||||||
mDetailButton.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -338,8 +328,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
mRefreshButton.setVisibility(View.GONE);
|
mRefreshButton.setVisibility(View.GONE);
|
||||||
mSkipOrNextButton.setVisibility(View.GONE);
|
mSkipOrNextButton.setVisibility(View.GONE);
|
||||||
mBackButton.setVisibility(View.VISIBLE);
|
mBackButton.setVisibility(View.VISIBLE);
|
||||||
// TODO: remove this after UI fix.
|
|
||||||
// mDetailButton.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// May be called when user press "connect" button in WifiDialog
|
// May be called when user press "connect" button in WifiDialog
|
||||||
@@ -366,7 +354,6 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
|
|||||||
mConnectButton.setVisibility(View.GONE);
|
mConnectButton.setVisibility(View.GONE);
|
||||||
mAddNetworkButton.setVisibility(View.GONE);
|
mAddNetworkButton.setVisibility(View.GONE);
|
||||||
mRefreshButton.setVisibility(View.GONE);
|
mRefreshButton.setVisibility(View.GONE);
|
||||||
mDetailButton.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// May be called when user press "forget" button in WifiDialog
|
// May be called when user press "forget" button in WifiDialog
|
||||||
|
Reference in New Issue
Block a user