Fix BandMode Dialog Crash on Open due to Style
This sidesteps an error saying that the radio
BandMode activity must inherit from an AppCompat
style. Instead the window is now full-screen and
matches the theme of the RadioInfo menu.
Bug: 117571514
Test: manual - open the activity without a crash and
verify that the new style change is effective.
Change-Id: I6e49d731e039709db43dfa6531723781e9e48640
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 17f8303..6532f19 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2172,9 +2172,8 @@
</intent-filter>
</activity>
- <!-- TODO: Is this needed? -->
<activity android:name="BandMode"
- android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"
+ android:label="@string/band_mode_title"
android:process="com.android.phone">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/res/layout/band_mode.xml b/res/layout/band_mode.xml
index ddbc7ae..b43dd1d 100644
--- a/res/layout/band_mode.xml
+++ b/res/layout/band_mode.xml
@@ -19,7 +19,7 @@
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="wrap_content">
<ListView android:id="@+id/band"
android:layout_width="match_parent"
diff --git a/src/com/android/settings/BandMode.java b/src/com/android/settings/BandMode.java
index b130295..e172a5c 100644
--- a/src/com/android/settings/BandMode.java
+++ b/src/com/android/settings/BandMode.java
@@ -73,13 +73,8 @@
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-
setContentView(R.layout.band_mode);
- setTitle(getString(R.string.band_mode_title));
- getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT,
- WindowManager.LayoutParams.WRAP_CONTENT);
-
mPhone = PhoneFactory.getDefaultPhone();
mBandList = (ListView) findViewById(R.id.band);