Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f368d4dc authored by Freeman Ng's avatar Freeman Ng Committed by Android (Google) Code Review
Browse files

Merge "add options to lock suw wifi setup orientation into portrait or...

Merge "add options to lock suw wifi setup orientation into portrait or landscape" into honeycomb-mr2
parents 8f1bd8a7 f54fec59
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.settings.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.net.NetworkInfo.DetailedState;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
@@ -54,6 +55,10 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
    private static final String TAG = "SetupWizard";
    private static final boolean DEBUG = true;

    // lock orientation into landscape or portrait
    private static final String EXTRA_PREFS_LANDSCAPE_LOCK = "extra_prefs_landscape_lock";
    private static final String EXTRA_PREFS_PORTRAIT_LOCK = "extra_prefs_portrait_lock";

    private static final EnumMap<DetailedState, DetailedState> sNetworkStateMap =
            new EnumMap<DetailedState, DetailedState>(DetailedState.class);

@@ -165,10 +170,18 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
    }

    private void initViews() {
        if (getIntent().getBooleanExtra("firstRun", false)) {
        Intent intent = getIntent();

        if (intent.getBooleanExtra("firstRun", false)) {
            final View layoutRoot = findViewById(R.id.layout_root);
            layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
        }
        if (intent.getBooleanExtra(EXTRA_PREFS_LANDSCAPE_LOCK, false)) {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
        }
        if (intent.getBooleanExtra(EXTRA_PREFS_PORTRAIT_LOCK, false)) {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
        }

        mTitleView = (TextView)findViewById(R.id.wifi_setup_title);
        mProgressBar = (ProgressBar)findViewById(R.id.scanning_progress_bar);