Fix bug #15001610 Java crash in settings is observed while adding Google account on wiped device

- update Settings main layout to be able to show the Buttons
- make WifiPickerActivity a SettingsActivity and remove dead code
- fix reference to Buttons for using the Settings IDs instead
of the Framework ones

Change-Id: I23bfd1b8290fc007e6e80aa9a6297e55e7f6004e
This commit is contained in:
Fabrice Di Meglio
2014-05-20 12:55:15 -07:00
parent 38f2b27c0d
commit d2b64f339a
3 changed files with 9 additions and 75 deletions

View File

@@ -515,25 +515,25 @@ public class SettingsActivity extends Activity
Intent intent = getIntent();
if (intent.getBooleanExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)) {
View buttonBar = findViewById(com.android.internal.R.id.button_bar);
View buttonBar = findViewById(R.id.button_bar);
if (buttonBar != null) {
buttonBar.setVisibility(View.VISIBLE);
Button backButton = (Button)findViewById(com.android.internal.R.id.back_button);
Button backButton = (Button)findViewById(R.id.back_button);
backButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_CANCELED);
finish();
}
});
Button skipButton = (Button)findViewById(com.android.internal.R.id.skip_button);
Button skipButton = (Button)findViewById(R.id.skip_button);
skipButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_OK);
finish();
}
});
mNextButton = (Button)findViewById(com.android.internal.R.id.next_button);
mNextButton = (Button)findViewById(R.id.next_button);
mNextButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setResult(RESULT_OK);