summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-06-16 13:52:10 -0700
committerJeff Sharkey <jsharkey@android.com>2015-06-16 15:28:49 -0700
commit8e987d9bfb9c69daf306c52d84d8ea480eb4d73a (patch)
tree351b8c1c4c4e8c9e5764635e6d14f7a0663438d2
parente9ec307a057618ff40b9988684761a778f9301d4 (diff)
downloadpackages_apps_Settings-8e987d9bfb9c69daf306c52d84d8ea480eb4d73a.zip
packages_apps_Settings-8e987d9bfb9c69daf306c52d84d8ea480eb4d73a.tar.gz
packages_apps_Settings-8e987d9bfb9c69daf306c52d84d8ea480eb4d73a.tar.bz2
Finish storage wizard theming.
Storage wizard screens now have updated assets from UX, and various assets are tinted consistently. We're using our own navigation bar and wholesale replacing the layout from upstream. Fix text colors in night mode. Tell SystemUI when we're finished with the wizard flow. Bug: 21830731 Change-Id: Ic8d09cc152bfb4dcc6089b5c61d28cbdd4be3ee9
-rw-r--r--res/color/storage_wizard_button.xml22
-rw-r--r--res/color/storage_wizard_button_red.xml22
-rw-r--r--res/drawable-hdpi/bg_internal_storage_header.pngbin0 -> 38885 bytes
-rw-r--r--res/drawable-hdpi/bg_portable_storage_header.pngbin0 -> 38232 bytes
-rw-r--r--res/drawable-hdpi/bg_tile.pngbin0 -> 6397 bytes
-rw-r--r--res/drawable-mdpi/bg_internal_storage_header.pngbin0 -> 19121 bytes
-rw-r--r--res/drawable-mdpi/bg_portable_storage_header.pngbin0 -> 18813 bytes
-rw-r--r--res/drawable-mdpi/bg_tile.pngbin0 -> 3191 bytes
-rw-r--r--res/drawable-xhdpi/bg_internal_storage_header.pngbin0 -> 61765 bytes
-rw-r--r--res/drawable-xhdpi/bg_portable_storage_header.pngbin0 -> 60763 bytes
-rw-r--r--res/drawable-xhdpi/bg_tile.pngbin0 -> 10041 bytes
-rw-r--r--res/drawable-xxhdpi/bg_internal_storage_header.pngbin0 -> 120799 bytes
-rw-r--r--res/drawable-xxhdpi/bg_portable_storage_header.pngbin0 -> 118776 bytes
-rw-r--r--res/drawable-xxhdpi/bg_tile.pngbin0 -> 17946 bytes
-rw-r--r--res/drawable-xxxhdpi/bg_internal_storage_header.pngbin0 -> 187831 bytes
-rw-r--r--res/drawable-xxxhdpi/bg_portable_storage_header.pngbin0 -> 184627 bytes
-rw-r--r--res/drawable-xxxhdpi/bg_tile.pngbin0 -> 24733 bytes
-rw-r--r--res/layout/preference_storage_action.xml1
-rw-r--r--res/layout/storage_summary.xml2
-rw-r--r--res/layout/storage_wizard_generic.xml4
-rw-r--r--res/layout/storage_wizard_init.xml6
-rw-r--r--res/layout/storage_wizard_migrate.xml4
-rw-r--r--res/layout/storage_wizard_navigation.xml52
-rw-r--r--res/layout/storage_wizard_progress.xml4
-rw-r--r--res/layout/storage_wizard_ready.xml4
-rw-r--r--res/values/styles.xml4
-rw-r--r--src/com/android/settings/deviceinfo/StorageVolumePreference.java1
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardBase.java79
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardFormatConfirm.java3
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java1
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardInit.java3
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardMigrate.java5
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java1
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java10
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardMoveConfirm.java1
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardMoveProgress.java1
-rw-r--r--src/com/android/settings/deviceinfo/StorageWizardReady.java3
37 files changed, 186 insertions, 47 deletions
diff --git a/res/color/storage_wizard_button.xml b/res/color/storage_wizard_button.xml
new file mode 100644
index 0000000..38c7d52
--- /dev/null
+++ b/res/color/storage_wizard_button.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:alpha="?android:attr/disabledAlpha"
+ android:color="?android:attr/colorAccent" />
+ <item android:color="?android:attr/colorAccent" />
+</selector>
diff --git a/res/color/storage_wizard_button_red.xml b/res/color/storage_wizard_button_red.xml
new file mode 100644
index 0000000..9e9a908
--- /dev/null
+++ b/res/color/storage_wizard_button_red.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:alpha="?android:attr/disabledAlpha"
+ android:color="#fff4511e" />
+ <item android:color="#fff4511e" />
+</selector>
diff --git a/res/drawable-hdpi/bg_internal_storage_header.png b/res/drawable-hdpi/bg_internal_storage_header.png
new file mode 100644
index 0000000..ccb5951
--- /dev/null
+++ b/res/drawable-hdpi/bg_internal_storage_header.png
Binary files differ
diff --git a/res/drawable-hdpi/bg_portable_storage_header.png b/res/drawable-hdpi/bg_portable_storage_header.png
new file mode 100644
index 0000000..fa640f0
--- /dev/null
+++ b/res/drawable-hdpi/bg_portable_storage_header.png
Binary files differ
diff --git a/res/drawable-hdpi/bg_tile.png b/res/drawable-hdpi/bg_tile.png
new file mode 100644
index 0000000..0680c57
--- /dev/null
+++ b/res/drawable-hdpi/bg_tile.png
Binary files differ
diff --git a/res/drawable-mdpi/bg_internal_storage_header.png b/res/drawable-mdpi/bg_internal_storage_header.png
new file mode 100644
index 0000000..a4f263d
--- /dev/null
+++ b/res/drawable-mdpi/bg_internal_storage_header.png
Binary files differ
diff --git a/res/drawable-mdpi/bg_portable_storage_header.png b/res/drawable-mdpi/bg_portable_storage_header.png
new file mode 100644
index 0000000..9b21825
--- /dev/null
+++ b/res/drawable-mdpi/bg_portable_storage_header.png
Binary files differ
diff --git a/res/drawable-mdpi/bg_tile.png b/res/drawable-mdpi/bg_tile.png
new file mode 100644
index 0000000..bd361f0
--- /dev/null
+++ b/res/drawable-mdpi/bg_tile.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_internal_storage_header.png b/res/drawable-xhdpi/bg_internal_storage_header.png
new file mode 100644
index 0000000..289b31c
--- /dev/null
+++ b/res/drawable-xhdpi/bg_internal_storage_header.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_portable_storage_header.png b/res/drawable-xhdpi/bg_portable_storage_header.png
new file mode 100644
index 0000000..76154ff
--- /dev/null
+++ b/res/drawable-xhdpi/bg_portable_storage_header.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_tile.png b/res/drawable-xhdpi/bg_tile.png
new file mode 100644
index 0000000..dc5b24c
--- /dev/null
+++ b/res/drawable-xhdpi/bg_tile.png
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_internal_storage_header.png b/res/drawable-xxhdpi/bg_internal_storage_header.png
new file mode 100644
index 0000000..ed01721
--- /dev/null
+++ b/res/drawable-xxhdpi/bg_internal_storage_header.png
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_portable_storage_header.png b/res/drawable-xxhdpi/bg_portable_storage_header.png
new file mode 100644
index 0000000..df6b38e
--- /dev/null
+++ b/res/drawable-xxhdpi/bg_portable_storage_header.png
Binary files differ
diff --git a/res/drawable-xxhdpi/bg_tile.png b/res/drawable-xxhdpi/bg_tile.png
new file mode 100644
index 0000000..bf28300
--- /dev/null
+++ b/res/drawable-xxhdpi/bg_tile.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/bg_internal_storage_header.png b/res/drawable-xxxhdpi/bg_internal_storage_header.png
new file mode 100644
index 0000000..26cae96
--- /dev/null
+++ b/res/drawable-xxxhdpi/bg_internal_storage_header.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/bg_portable_storage_header.png b/res/drawable-xxxhdpi/bg_portable_storage_header.png
new file mode 100644
index 0000000..78003f8
--- /dev/null
+++ b/res/drawable-xxxhdpi/bg_portable_storage_header.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/bg_tile.png b/res/drawable-xxxhdpi/bg_tile.png
new file mode 100644
index 0000000..7d22170
--- /dev/null
+++ b/res/drawable-xxxhdpi/bg_tile.png
Binary files differ
diff --git a/res/layout/preference_storage_action.xml b/res/layout/preference_storage_action.xml
index 19d7763..5a37871 100644
--- a/res/layout/preference_storage_action.xml
+++ b/res/layout/preference_storage_action.xml
@@ -30,6 +30,7 @@
android:layout_gravity="center"
android:gravity="center"
android:src="@drawable/ic_eject_24dp"
+ android:tint="?android:attr/textColorSecondary"
android:background="?android:attr/selectableItemBackground" />
</LinearLayout>
diff --git a/res/layout/storage_summary.xml b/res/layout/storage_summary.xml
index cd63671..96a0cee 100644
--- a/res/layout/storage_summary.xml
+++ b/res/layout/storage_summary.xml
@@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Body1"
- android:textColor="#8a000000"
+ android:textColor="?android:attr/textColorSecondaryNoDisable"
android:maxLines="10" />
<ProgressBar
diff --git a/res/layout/storage_wizard_generic.xml b/res/layout/storage_wizard_generic.xml
index 4f0cef9..6b5890a 100644
--- a/res/layout/storage_wizard_generic.xml
+++ b/res/layout/storage_wizard_generic.xml
@@ -20,9 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:suwBackgroundTile="@drawable/illustration_tile"
- app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
- app:suwIllustrationImage="@drawable/illustration_generic">
+ app:suwBackgroundTile="@drawable/bg_tile">
<LinearLayout
style="@style/SuwContentFrame"
diff --git a/res/layout/storage_wizard_init.xml b/res/layout/storage_wizard_init.xml
index 421477c..6b69dd6 100644
--- a/res/layout/storage_wizard_init.xml
+++ b/res/layout/storage_wizard_init.xml
@@ -20,11 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:suwBackgroundTile="@drawable/illustration_tile"
- app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
- app:suwIllustrationImage="@drawable/illustration_generic">
-
- <!-- android:layout="@layout/suw_template_short" -->
+ app:suwBackgroundTile="@drawable/bg_tile">
<LinearLayout
style="@style/SuwContentFrame"
diff --git a/res/layout/storage_wizard_migrate.xml b/res/layout/storage_wizard_migrate.xml
index 827a5d2..d78f4f9 100644
--- a/res/layout/storage_wizard_migrate.xml
+++ b/res/layout/storage_wizard_migrate.xml
@@ -20,9 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:suwBackgroundTile="@drawable/illustration_tile"
- app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
- app:suwIllustrationImage="@drawable/illustration_generic">
+ app:suwBackgroundTile="@drawable/bg_tile">
<LinearLayout
style="@style/SuwContentFrame"
diff --git a/res/layout/storage_wizard_navigation.xml b/res/layout/storage_wizard_navigation.xml
new file mode 100644
index 0000000..94f9baf
--- /dev/null
+++ b/res/layout/storage_wizard_navigation.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/suw_layout_navigation_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <Button
+ android:id="@+id/suw_navbar_back"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:visibility="gone" />
+
+ <View
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ <Button
+ android:id="@+id/suw_navbar_more"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:visibility="gone" />
+
+ <Button
+ android:id="@+id/suw_navbar_next"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="16dp"
+ android:layout_marginEnd="16dp"
+ android:text="@string/wizard_next"
+ android:textColor="@android:color/white"
+ android:backgroundTint="@color/storage_wizard_button" />
+
+</LinearLayout>
diff --git a/res/layout/storage_wizard_progress.xml b/res/layout/storage_wizard_progress.xml
index 52fd203..114635d 100644
--- a/res/layout/storage_wizard_progress.xml
+++ b/res/layout/storage_wizard_progress.xml
@@ -20,9 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:suwBackgroundTile="@drawable/illustration_tile"
- app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
- app:suwIllustrationImage="@drawable/illustration_generic">
+ app:suwBackgroundTile="@drawable/bg_tile">
<LinearLayout
style="@style/SuwContentFrame"
diff --git a/res/layout/storage_wizard_ready.xml b/res/layout/storage_wizard_ready.xml
index 5cb2e33..83ad03c 100644
--- a/res/layout/storage_wizard_ready.xml
+++ b/res/layout/storage_wizard_ready.xml
@@ -20,9 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:suwBackgroundTile="@drawable/illustration_tile"
- app:suwIllustrationHorizontalTile="@drawable/illustration_horizontal"
- app:suwIllustrationImage="@drawable/illustration_generic">
+ app:suwBackgroundTile="@drawable/bg_tile">
<LinearLayout
style="@style/SuwContentFrame"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index d24337f..ef1dbc8 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -343,4 +343,8 @@
<item name="android:textSize">16sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
+
+ <style name="SetupWizardStorageStyle" parent="@style/SuwThemeMaterial.Light">
+ <item name="android:colorAccent">#ff009688</item>
+ </style>
</resources>
diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreference.java b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
index f535b85..bc7972a 100644
--- a/src/com/android/settings/deviceinfo/StorageVolumePreference.java
+++ b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
@@ -101,7 +101,6 @@ public class StorageVolumePreference extends Preference {
protected void onBindView(View view) {
final ImageView unmount = (ImageView) view.findViewById(R.id.unmount);
if (unmount != null) {
- unmount.getDrawable().setTint(Color.parseColor("#8a000000"));
unmount.setOnClickListener(mUnmountListener);
}
diff --git a/src/com/android/settings/deviceinfo/StorageWizardBase.java b/src/com/android/settings/deviceinfo/StorageWizardBase.java
index 294df95..1d91e6b 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardBase.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardBase.java
@@ -16,6 +16,7 @@
package com.android.settings.deviceinfo;
+import android.annotation.LayoutRes;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
@@ -23,9 +24,10 @@ import android.os.storage.DiskInfo;
import android.os.storage.StorageEventListener;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
-import android.os.storage.VolumeRecord;
import android.text.TextUtils;
import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ProgressBar;
@@ -33,19 +35,20 @@ import android.widget.TextView;
import com.android.settings.R;
import com.android.setupwizardlib.SetupWizardLayout;
-import com.android.setupwizardlib.view.NavigationBar;
-import com.android.setupwizardlib.view.NavigationBar.NavigationBarListener;
import java.text.NumberFormat;
import java.util.List;
import java.util.Objects;
-public abstract class StorageWizardBase extends Activity implements NavigationBarListener {
+public abstract class StorageWizardBase extends Activity {
protected StorageManager mStorage;
protected VolumeInfo mVolume;
protected DiskInfo mDisk;
+ private View mCustomNav;
+ private Button mCustomNext;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -64,7 +67,7 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
mDisk = mVolume.getDisk();
}
- setTheme(R.style.SuwThemeMaterial_Light);
+ setTheme(R.style.SetupWizardStorageStyle);
if (mDisk != null) {
mStorage.registerListener(mStorageListener);
@@ -72,20 +75,54 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
}
@Override
+ public void setContentView(@LayoutRes int layoutResID) {
+ super.setContentView(layoutResID);
+
+ // Our wizard is a unique flower, so it has custom buttons
+ final ViewGroup navParent = (ViewGroup) findViewById(R.id.suw_layout_navigation_bar)
+ .getParent();
+ mCustomNav = getLayoutInflater().inflate(R.layout.storage_wizard_navigation,
+ navParent, false);
+
+ mCustomNext = (Button) mCustomNav.findViewById(R.id.suw_navbar_next);
+ mCustomNext.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ onNavigateNext();
+ }
+ });
+
+ // Swap our custom navigation bar into place
+ for (int i = 0; i < navParent.getChildCount(); i++) {
+ if (navParent.getChildAt(i).getId() == R.id.suw_layout_navigation_bar) {
+ navParent.removeViewAt(i);
+ navParent.addView(mCustomNav, i);
+ break;
+ }
+ }
+ }
+
+ @Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
+ final Window window = getWindow();
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
+ window.setStatusBarColor(Color.TRANSPARENT);
- getNavigationBar().setSystemUiVisibility(
+ mCustomNav.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
- getWindow().setStatusBarColor(Color.TRANSPARENT);
+ final View scrollView = findViewById(R.id.suw_bottom_scroll_view);
+ scrollView.setVerticalFadingEdgeEnabled(true);
+ scrollView.setFadingEdgeLength(scrollView.getVerticalFadingEdgeLength() * 2);
- getNavigationBar().setNavigationBarListener(this);
- getBackButton().setVisibility(View.GONE);
+ // Our header assets already have padding baked in
+ final View title = findViewById(R.id.suw_layout_title);
+ title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(),
+ title.getPaddingBottom());
}
@Override
@@ -94,16 +131,8 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
super.onDestroy();
}
- protected NavigationBar getNavigationBar() {
- return (NavigationBar) findViewById(R.id.suw_layout_navigation_bar);
- }
-
- protected Button getBackButton() {
- return getNavigationBar().getBackButton();
- }
-
protected Button getNextButton() {
- return getNavigationBar().getNextButton();
+ return mCustomNext;
}
protected SetupWizardLayout getSetupWizardLayout() {
@@ -135,12 +164,16 @@ public abstract class StorageWizardBase extends Activity implements NavigationBa
secondBody.setVisibility(View.VISIBLE);
}
- @Override
- public void onNavigateBack() {
- throw new UnsupportedOperationException();
+ protected void setIllustrationInternal(boolean internal) {
+ if (internal) {
+ getSetupWizardLayout().setIllustration(R.drawable.bg_internal_storage_header,
+ android.R.color.transparent);
+ } else {
+ getSetupWizardLayout().setIllustration(R.drawable.bg_portable_storage_header,
+ android.R.color.transparent);
+ }
}
- @Override
public void onNavigateNext() {
throw new UnsupportedOperationException();
}
diff --git a/src/com/android/settings/deviceinfo/StorageWizardFormatConfirm.java b/src/com/android/settings/deviceinfo/StorageWizardFormatConfirm.java
index b35b8ec..ed01c51 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardFormatConfirm.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardFormatConfirm.java
@@ -38,6 +38,7 @@ public class StorageWizardFormatConfirm extends StorageWizardBase {
setContentView(R.layout.storage_wizard_generic);
mFormatPrivate = getIntent().getBooleanExtra(EXTRA_FORMAT_PRIVATE, false);
+ setIllustrationInternal(mFormatPrivate);
if (mFormatPrivate) {
setHeaderText(R.string.storage_wizard_format_confirm_title);
@@ -49,8 +50,8 @@ public class StorageWizardFormatConfirm extends StorageWizardBase {
mDisk.getDescription());
}
- // TODO: make this a big red scary button
getNextButton().setText(R.string.storage_wizard_format_confirm_next);
+ getNextButton().setBackgroundTintList(getColorStateList(R.color.storage_wizard_button_red));
}
@Override
diff --git a/src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java b/src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java
index 75d1758..e117c26 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardFormatProgress.java
@@ -51,6 +51,7 @@ public class StorageWizardFormatProgress extends StorageWizardBase {
mFormatPrivate = getIntent().getBooleanExtra(
StorageWizardFormatConfirm.EXTRA_FORMAT_PRIVATE, false);
+ setIllustrationInternal(mFormatPrivate);
setHeaderText(R.string.storage_wizard_format_progress_title, mDisk.getDescription());
setBodyText(R.string.storage_wizard_format_progress_body, mDisk.getDescription());
diff --git a/src/com/android/settings/deviceinfo/StorageWizardInit.java b/src/com/android/settings/deviceinfo/StorageWizardInit.java
index b0211bf..3c33dfd 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardInit.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardInit.java
@@ -39,6 +39,7 @@ public class StorageWizardInit extends StorageWizardBase {
}
setContentView(R.layout.storage_wizard_init);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_init_title, mDisk.getDescription());
mRadioExternal = (RadioButton) findViewById(R.id.storage_wizard_init_external_title);
@@ -70,8 +71,10 @@ public class StorageWizardInit extends StorageWizardBase {
if (isChecked) {
if (buttonView == mRadioExternal) {
mRadioInternal.setChecked(false);
+ setIllustrationInternal(false);
} else if (buttonView == mRadioInternal) {
mRadioExternal.setChecked(false);
+ setIllustrationInternal(true);
}
getNextButton().setEnabled(true);
}
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMigrate.java b/src/com/android/settings/deviceinfo/StorageWizardMigrate.java
index 574408d..c12ae4a 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMigrate.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMigrate.java
@@ -23,7 +23,6 @@ import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RadioButton;
-import com.android.internal.util.Preconditions;
import com.android.settings.R;
public class StorageWizardMigrate extends StorageWizardBase {
@@ -41,6 +40,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
}
setContentView(R.layout.storage_wizard_migrate);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_migrate_title, mDisk.getDescription());
setBodyText(R.string.memory_calculating_size);
@@ -50,7 +50,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
mRadioNow.setOnCheckedChangeListener(mRadioListener);
mRadioLater.setOnCheckedChangeListener(mRadioListener);
- mRadioNow.setChecked(true);
+ getNextButton().setEnabled(false);
mEstimate = new MigrateEstimateTask(this) {
@Override
@@ -73,6 +73,7 @@ public class StorageWizardMigrate extends StorageWizardBase {
} else if (buttonView == mRadioLater) {
mRadioNow.setChecked(false);
}
+ getNextButton().setEnabled(true);
}
}
};
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
index ff74ea2..607cc6f 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMigrateConfirm.java
@@ -45,6 +45,7 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
final String sourceDescrip = mStorage.getBestVolumeDescription(sourceVol);
final String targetDescrip = mStorage.getBestVolumeDescription(mVolume);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_migrate_confirm_title, targetDescrip);
setBodyText(R.string.memory_calculating_size);
setSecondaryBodyText(R.string.storage_wizard_migrate_details, targetDescrip);
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java b/src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java
index 4446c51..941f6b9 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMigrateProgress.java
@@ -30,10 +30,11 @@ import android.util.Log;
import android.view.View;
import android.widget.Toast;
-import com.android.internal.util.Preconditions;
import com.android.settings.R;
public class StorageWizardMigrateProgress extends StorageWizardBase {
+ private static final String ACTION_FINISH_WIZARD = "com.android.systemui.action.FINISH_WIZARD";
+
private int mMoveId;
@Override
@@ -48,6 +49,7 @@ public class StorageWizardMigrateProgress extends StorageWizardBase {
mMoveId = getIntent().getIntExtra(EXTRA_MOVE_ID, -1);
final String descrip = mStorage.getBestVolumeDescription(mVolume);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_migrate_progress_title, descrip);
setBodyText(R.string.storage_wizard_migrate_details, descrip);
@@ -68,6 +70,12 @@ public class StorageWizardMigrateProgress extends StorageWizardBase {
Log.d(TAG, "Finished with status " + status);
if (status == PackageManager.MOVE_SUCCEEDED) {
if (mDisk != null) {
+ // Kinda lame, but tear down that shiny finished
+ // notification, since user is still in wizard flow
+ final Intent finishIntent = new Intent(ACTION_FINISH_WIZARD);
+ finishIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ sendBroadcast(finishIntent);
+
final Intent intent = new Intent(context, StorageWizardReady.class);
intent.putExtra(DiskInfo.EXTRA_DISK_ID, mDisk.getId());
startActivity(intent);
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMoveConfirm.java b/src/com/android/settings/deviceinfo/StorageWizardMoveConfirm.java
index 429b03c..e835b15 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMoveConfirm.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMoveConfirm.java
@@ -56,6 +56,7 @@ public class StorageWizardMoveConfirm extends StorageWizardBase {
final String appName = getPackageManager().getApplicationLabel(mApp).toString();
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_move_confirm_title, appName);
setBodyText(R.string.storage_wizard_move_confirm_body, appName, volumeName);
diff --git a/src/com/android/settings/deviceinfo/StorageWizardMoveProgress.java b/src/com/android/settings/deviceinfo/StorageWizardMoveProgress.java
index 660f85c..8b3c6da 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardMoveProgress.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardMoveProgress.java
@@ -46,6 +46,7 @@ public class StorageWizardMoveProgress extends StorageWizardBase {
final String appName = getIntent().getStringExtra(EXTRA_TITLE);
final String volumeName = mStorage.getBestVolumeDescription(mVolume);
+ setIllustrationInternal(true);
setHeaderText(R.string.storage_wizard_move_progress_title, appName);
setBodyText(R.string.storage_wizard_move_progress_body, volumeName, appName);
diff --git a/src/com/android/settings/deviceinfo/StorageWizardReady.java b/src/com/android/settings/deviceinfo/StorageWizardReady.java
index d6ea5e4..2b6387d 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardReady.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardReady.java
@@ -19,7 +19,6 @@ package com.android.settings.deviceinfo;
import android.os.Bundle;
import android.os.storage.VolumeInfo;
-import com.android.internal.util.Preconditions;
import com.android.settings.R;
public class StorageWizardReady extends StorageWizardBase {
@@ -39,9 +38,11 @@ public class StorageWizardReady extends StorageWizardBase {
final VolumeInfo publicVol = findFirstVolume(VolumeInfo.TYPE_PUBLIC);
final VolumeInfo privateVol = findFirstVolume(VolumeInfo.TYPE_PRIVATE);
if (publicVol != null) {
+ setIllustrationInternal(false);
setBodyText(R.string.storage_wizard_ready_external_body,
mDisk.getDescription());
} else if (privateVol != null) {
+ setIllustrationInternal(true);
setBodyText(R.string.storage_wizard_ready_internal_body,
mDisk.getDescription());
}