Enable orientation in SetupWizard

Change-Id: I45e30c652feab1d30c4f0379379f8ca4e455fa02
This commit is contained in:
Daisuke Miyakawa
2011-02-01 14:39:17 -08:00
parent f5a2a5eba1
commit f3bfc89ce5
7 changed files with 352 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ import com.android.settings.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.NetworkInfo.DetailedState;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
@@ -670,7 +671,8 @@ public class WifiSettingsForSetupWizardXL extends Activity implements OnClickLis
* Replace the current background with a new background whose id is resId if needed.
*/
private void trySetBackground(int resId) {
if (mBackgroundId != resId) {
final int orientation = getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_LANDSCAPE && mBackgroundId != resId) {
getWindow().setBackgroundDrawable(getResources().getDrawable(resId));
mBackgroundId = resId;
}