Merge "Show the menu title instead of the application name if it is available"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
old mode 100644
new mode 100755
index 668a99e..a273554
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -81,12 +81,12 @@
         </activity>
         <activity android:name="StkDialogActivity"
             android:configChanges="orientation|locale|screenSize|keyboardHidden"
-            android:theme="@android:style/Theme.Dialog"
+            android:theme="@android:style/Theme.DeviceDefault.Dialog"
             android:taskAffinity="android.task.stk.StkLauncherActivity">
         </activity>
 
         <activity android:name="ToneDialog"
-            android:theme="@android:style/Theme.Dialog">
+            android:theme="@android:style/Theme.DeviceDefault.Dialog">
         </activity>
 
         <!-- SIM Toolkit settings activity -->
diff --git a/res/layout/stk_msg_dialog.xml b/res/layout/stk_msg_dialog.xml
old mode 100644
new mode 100755
index 1838337..731d74c
--- a/res/layout/stk_msg_dialog.xml
+++ b/res/layout/stk_msg_dialog.xml
@@ -46,15 +46,14 @@
         android:layout_height="wrap_content"
         android:minHeight="54dip"
         android:orientation="vertical" >
-        <LinearLayout
+        <LinearLayout style="?android:attr/buttonBarStyle"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="horizontal"
-            android:background="@color/ltgrey"
             android:paddingTop="4dip"
             android:paddingLeft="2dip"
             android:paddingRight="2dip" >
-            <Button
+            <Button style="?android:attr/buttonBarButtonStyle"
                 android:id="@+id/button_cancel"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -62,7 +61,7 @@
                 android:layout_weight="1"
                 android:maxLines="2"
                 android:text="@string/button_cancel" />
-            <Button
+            <Button style="?android:attr/buttonBarButtonStyle"
                 android:id="@+id/button_ok"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 0b19f9e..ccf5a20 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -916,6 +916,13 @@
             launchEventMessage(slotId);
             break;
         case LAUNCH_BROWSER:
+            // The device setup process should not be interrupted by launching browser.
+            if (Settings.Global.getInt(mContext.getContentResolver(),
+                    Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
+                CatLog.d(this, "The command is not performed if the setup has not been completed.");
+                sendScreenBusyResponse(slotId);
+                break;
+            }
             TextMessage alphaId = mStkContext[slotId].mCurrentCmd.geTextMessage();
             if ((mStkContext[slotId].mCurrentCmd.getBrowserSettings().mode
                     == LaunchBrowserMode.LAUNCH_IF_NOT_ALREADY_LAUNCHED) &&