Fix action-bar title for cropping wallpaper.
bug:6513495
Change-Id: I97b76c948d5c9fa0bb11f2fe89a0d10f490dbe14
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1474004..f369df9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -91,6 +91,8 @@
<!-- Displayed in the title of the dialog for things to do with a picture
that is to be "set as" (e.g. set as contact photo or set as wallpaper) -->
<string name="set_image">Set picture as</string>
+ <!-- Activity title for cropping picture and setting it as wallpaper [CHAR LIMIT=20] -->
+ <string name="set_wallpaper">Set wallpaper</string>
<!-- Toast/alert after saving wallpaper -->
<string name="wallpaper">Setting wallpaper\u2026</string>
<string name="camera_setas_wallpaper">Wallpaper</string>
diff --git a/src/com/android/gallery3d/app/CropImage.java b/src/com/android/gallery3d/app/CropImage.java
index 3935e8f..835970b 100644
--- a/src/com/android/gallery3d/app/CropImage.java
+++ b/src/com/android/gallery3d/app/CropImage.java
@@ -165,6 +165,10 @@
ActionBar actionBar = getActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE,
ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE);
+ Bundle extra = getIntent().getExtras();
+ if (extra != null && extra.getBoolean(KEY_SET_AS_WALLPAPER, false)) {
+ actionBar.setTitle(R.string.set_wallpaper);
+ }
mMainHandler = new SynchronizedHandler(getGLRoot()) {
@Override