dragon: Finalize DragonFirmwareKeyboardUpdater update confirmation page

This CL polishes the update confirmation page of DragonFirmwareKeyboardUpdater.
The design follows the same style as system update page.

BUG=b/25369339
TEST=build, run the service and check UI of the target page

Change-Id: Ida963d1e632472e20b449b681336a0e4df2985d3
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/Android.mk b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/Android.mk
index 691f812..04771c9 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/Android.mk
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/Android.mk
@@ -26,5 +26,6 @@
 LOCAL_PACKAGE_NAME := DragonKeyboardFirmwareUpdater
 LOCAL_AAPT_FLAGS := --auto-add-overlay
 LOCAL_AAPT_FLAGS += --extra-packages no.nordicsemi.android.dfu
+include frameworks/opt/setupwizard/library/common.mk
 
 include $(BUILD_PACKAGE)
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/AndroidManifest.xml b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/AndroidManifest.xml
index 6bc885b..8521dbc 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/AndroidManifest.xml
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/AndroidManifest.xml
@@ -30,8 +30,7 @@
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:supportsRtl="true"
-        android:persistent="true"
-        android:theme="@style/AppTheme">
+        android:persistent="true">
 
         <receiver android:name=".BootCompletedBroadcastReceiver">
             <intent-filter>
@@ -46,6 +45,7 @@
                  android:exported="false" />
 
         <activity android:name=".UpdateConfirmationActivity"
+                  android:theme="@style/AppTheme"
                   android:excludeFromRecents="true" />
 
         <activity android:name=".NotificationActivity"
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_header_tile.png b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_header_tile.png
new file mode 100644
index 0000000..a062028
--- /dev/null
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_header_tile.png
Binary files differ
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_tile.png b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_tile.png
new file mode 100644
index 0000000..38187bd
--- /dev/null
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxhdpi/bg_tile.png
Binary files differ
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_header_tile.png b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_header_tile.png
new file mode 100644
index 0000000..2e65b58
--- /dev/null
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_header_tile.png
Binary files differ
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_tile.png b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_tile.png
new file mode 100644
index 0000000..e8460fd
--- /dev/null
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/drawable-xxxhdpi/bg_tile.png
Binary files differ
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/layout/activity_update_confirmation.xml b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/layout/activity_update_confirmation.xml
index 6348bde..f71e52a 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/layout/activity_update_confirmation.xml
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/layout/activity_update_confirmation.xml
@@ -13,33 +13,36 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<LinearLayout
+<com.android.setupwizardlib.SetupWizardLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/update_confirmation_activity_layout"
     android:layout_height="match_parent"
-    android:paddingLeft="16dp"
-    android:paddingRight="16dp"
-    android:orientation="vertical"
-    tools:context="com.android.dragonkeyboardfirmwareupdater.UpdateConfirmationActivity">
-    <LinearLayout
+    android:layout_width="match_parent"
+    android:layout="@layout/suw_template"
+    app:suwHeaderText="@string/app_name"
+    app:suwIllustrationImage="@drawable/bg_keyboard_header"
+    app:suwIllustrationHorizontalTile="@drawable/bg_header_tile"
+    app:suwBackgroundTile="@drawable/bg_tile">
+
+    <FrameLayout
+        android:id="@+id/content_frame"
+        style="@style/SuwContentFrame"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:layout_margin="15dp">
+        android:layout_height="match_parent">
         <TextView
             android:id="@+id/confirmation_update_info"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:text="@string/confirmation_update_info"
-            android:textSize="15sp"/>
+            style="@style/SuwDescription" />
         <Button
             android:id="@+id/confirmation_install_button"
+            android:layout_gravity="bottom|end"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="bottom|end"
-            android:layout_margin="5dp"
-            android:textSize="15sp"
-            android:text="@string/confirmation_install"/>
-    </LinearLayout>
-</LinearLayout>
+            android:text="@string/confirmation_install"
+            style="@android:style/Widget.Material.Button.Borderless.Colored" />
+    </FrameLayout>
+
+</com.android.setupwizardlib.SetupWizardLayout>
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/values/styles.xml b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/values/styles.xml
index 6a4f2e3..3e4b6a3 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/values/styles.xml
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/res/values/styles.xml
@@ -16,11 +16,6 @@
 <resources>
 
     <!-- Base application theme. -->
-    <style name="AppTheme" parent="android:Theme.Material">
-        <!-- Customize your theme here. -->
-        <item name="android:colorPrimary">@color/colorPrimary</item>
-        <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
-        <item name="android:colorAccent">@color/colorAccent</item>
-    </style>
+    <style name="AppTheme" parent="SuwThemeMaterial.Light"></style>
 
 </resources>
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/UpdateConfirmationActivity.java b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/UpdateConfirmationActivity.java
index a8b6b1b..e5e47de 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/UpdateConfirmationActivity.java
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/UpdateConfirmationActivity.java
@@ -24,6 +24,9 @@
 import android.widget.Button;
 import android.widget.TextView;
 
+import com.android.setupwizardlib.SetupWizardLayout;
+import com.android.setupwizardlib.view.NavigationBar;
+
 public class UpdateConfirmationActivity extends Activity {
     private final static String TAG = UpdateConfirmationActivity.class.getSimpleName();
 
@@ -34,6 +37,10 @@
 
         setContentView(R.layout.activity_update_confirmation);
 
+        SetupWizardLayout layout = (SetupWizardLayout) findViewById(R.id.update_confirmation_activity_layout);
+        layout.getNavigationBar().setVisibility(View.GONE);
+        layout.requestLayout();
+
         final Button installButton = (Button) findViewById(R.id.confirmation_install_button);
         installButton.setVisibility(View.VISIBLE);
         installButton.setOnClickListener(new View.OnClickListener() {