summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 000000000..38c7d523e
--- /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 000000000..9e9a90845
--- /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 000000000..ccb595159
--- /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 000000000..fa640f08f
--- /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 000000000..0680c57f5
--- /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 000000000..a4f263d9b
--- /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 000000000..9b21825aa
--- /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 000000000..bd361f0f4
--- /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 000000000..289b31cbf
--- /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 000000000..76154ff8c
--- /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 000000000..dc5b24c31
--- /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 000000000..ed01721c1
--- /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 000000000..df6b38e83
--- /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 000000000..bf28300ab
--- /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 000000000..26cae965e
--- /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 000000000..78003f820
--- /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 000000000..7d221707c
--- /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 19d776324..5a378713a 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 cd63671b1..96a0ceedc 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 4f0cef976..6b5890ae9 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 421477c3c..6b69dd61a 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 827a5d2cf..d78f4f9ed 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 000000000..94f9bafef
--- /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 52fd2035f..114635ded 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 5cb2e3321..83ad03c31 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 d24337fde..ef1dbc8b9 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 f535b85be..bc7972a46 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 294df95d7..1d91e6b75 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 b35b8ecb2..ed01c51ff 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 75d175886..e117c2640 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 b0211bfac..3c33dfd59 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 574408d97..c12ae4a06 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 ff74ea21e..607cc6f5c 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 4446c513a..941f6b9f1 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 429b03c42..e835b151a 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 660f85ccc..8b3c6daa1 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 d6ea5e4a9..2b6387d00 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());
}