keep history after reset to ub-now-lunchbox-release@1069658
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 36fa4c1..d4cd6a2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -25,7 +25,7 @@
<permission
android:name="com.android.launcher3.permission.PRELOAD_WORKSPACE"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signatureOrSystem" />
<permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
@@ -47,7 +47,7 @@
<permission
android:name="com.android.launcher3.permission.WRITE_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="normal"
+ android:protectionLevel="signatureOrSystem"
android:label="@string/permlab_write_settings"
android:description="@string/permdesc_write_settings"/>
@@ -106,7 +106,7 @@
<activity
android:name="com.android.launcher3.LauncherWallpaperPickerActivity"
- android:theme="@style/Theme.WallpaperCropper"
+ android:theme="@style/Theme.WallpaperPicker"
android:label="@string/pick_wallpaper"
android:icon="@mipmap/ic_launcher_wallpaper"
android:finishOnCloseSystemDialogs="true"
diff --git a/WallpaperPicker/res/layout/actionbar_set_wallpaper.xml b/WallpaperPicker/res/layout/actionbar_set_wallpaper.xml
index 1622742..8e349b7 100644
--- a/WallpaperPicker/res/layout/actionbar_set_wallpaper.xml
+++ b/WallpaperPicker/res/layout/actionbar_set_wallpaper.xml
@@ -18,17 +18,15 @@
*/
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- style="?android:actionButtonStyle"
+<com.android.launcher3.AlphaDisableableButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/ActionBarSetWallpaperStyle"
+ android:id="@+id/set_wallpaper_button"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
- <TextView style="?android:actionBarTabTextStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="start|center_vertical"
- android:paddingRight="20dp"
- android:drawableLeft="@drawable/ic_actionbar_accept"
- android:drawablePadding="8dp"
- android:gravity="center_vertical"
- android:text="@string/wallpaper_instructions" />
-</FrameLayout>
+ android:layout_height="match_parent"
+ android:paddingRight="20dp"
+ android:drawableLeft="@drawable/ic_actionbar_accept"
+ android:drawablePadding="8dp"
+ android:gravity="start|center_vertical"
+ android:text="@string/wallpaper_instructions">
+</com.android.launcher3.AlphaDisableableButton>
diff --git a/WallpaperPicker/res/values-sw720dp-v19/styles.xml b/WallpaperPicker/res/values-sw720dp-v19/styles.xml
new file mode 100644
index 0000000..9107851
--- /dev/null
+++ b/WallpaperPicker/res/values-sw720dp-v19/styles.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2013 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.
+*/
+-->
+
+<resources>
+ <style name="Theme" parent="android:Theme.Holo.Wallpaper.NoTitleBar">
+ <item name="android:windowActionModeOverlay">true</item>
+ <item name="android:windowTranslucentStatus">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+</resources>
diff --git a/WallpaperPicker/res/values-sw720dp/styles.xml b/WallpaperPicker/res/values-sw720dp/styles.xml
index 9107851..b489090 100644
--- a/WallpaperPicker/res/values-sw720dp/styles.xml
+++ b/WallpaperPicker/res/values-sw720dp/styles.xml
@@ -20,7 +20,5 @@
<resources>
<style name="Theme" parent="android:Theme.Holo.Wallpaper.NoTitleBar">
<item name="android:windowActionModeOverlay">true</item>
- <item name="android:windowTranslucentStatus">true</item>
- <item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>
diff --git a/WallpaperPicker/res/values-v19/styles.xml b/WallpaperPicker/res/values-v19/styles.xml
new file mode 100644
index 0000000..85a989d
--- /dev/null
+++ b/WallpaperPicker/res/values-v19/styles.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2013 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.
+*/
+-->
+
+<resources>
+ <style name="Theme.WallpaperCropper" parent="@android:style/Theme.Holo">
+ <item name="android:actionBarStyle">@style/WallpaperCropperActionBar</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBarOverlay">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+
+ <style name="Theme" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
+ <item name="android:windowTranslucentStatus">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+</resources>
diff --git a/WallpaperPicker/res/values/styles.xml b/WallpaperPicker/res/values/styles.xml
index 0e48dda..16b11f2 100644
--- a/WallpaperPicker/res/values/styles.xml
+++ b/WallpaperPicker/res/values/styles.xml
@@ -22,7 +22,12 @@
<item name="android:actionBarStyle">@style/WallpaperCropperActionBar</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowActionBarOverlay">true</item>
- <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+
+ <style name="Theme.WallpaperPicker" parent="Theme.WallpaperCropper">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowShowWallpaper">true</item>
</style>
<style name="WallpaperCropperActionBar" parent="android:style/Widget.Holo.ActionBar">
@@ -31,7 +36,9 @@
</style>
<style name="Theme" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
- <item name="android:windowTranslucentStatus">true</item>
- <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+
+ <style name="ActionBarSetWallpaperStyle" parent="@android:style/Widget.Holo.ActionButton">
+ <item name="android:textColor">#ffffffff</item>
</style>
</resources>
diff --git a/WallpaperPicker/src/com/android/launcher3/AlphaDisableableButton.java b/WallpaperPicker/src/com/android/launcher3/AlphaDisableableButton.java
new file mode 100644
index 0000000..f0796c3
--- /dev/null
+++ b/WallpaperPicker/src/com/android/launcher3/AlphaDisableableButton.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2014 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
+ */
+
+package com.android.launcher3;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.Button;
+
+/**
+ * A Button which becomes translucent when it is disabled
+ */
+public class AlphaDisableableButton extends Button {
+ public static float DISABLED_ALPHA_VALUE = 0.4f;
+ public AlphaDisableableButton(Context context) {
+ this(context, null);
+ }
+
+ public AlphaDisableableButton(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public AlphaDisableableButton(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ setLayerType(LAYER_TYPE_HARDWARE, null);
+ }
+
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if(enabled) {
+ setAlpha(1.0f);
+ } else {
+ setAlpha(DISABLED_ALPHA_VALUE);
+ }
+ }
+}
diff --git a/WallpaperPicker/src/com/android/launcher3/LiveWallpaperListAdapter.java b/WallpaperPicker/src/com/android/launcher3/LiveWallpaperListAdapter.java
index 60b2537..88f4461 100644
--- a/WallpaperPicker/src/com/android/launcher3/LiveWallpaperListAdapter.java
+++ b/WallpaperPicker/src/com/android/launcher3/LiveWallpaperListAdapter.java
@@ -122,7 +122,7 @@
Intent preview = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER);
preview.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT,
mInfo.getComponent());
- a.onLiveWallpaperPickerLaunch();
+ a.onLiveWallpaperPickerLaunch(mInfo);
a.startActivityForResultSafely(preview, WallpaperPickerActivity.PICK_LIVE_WALLPAPER);
}
}
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
index ee7b819..561c4bb 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java
@@ -75,6 +75,7 @@
protected CropView mCropView;
protected Uri mUri;
+ protected View mSetWallpaperButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -111,10 +112,12 @@
cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone);
}
});
+ mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);
// Load image in background
final BitmapRegionTileSource.UriBitmapSource bitmapSource =
new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024);
+ mSetWallpaperButton.setEnabled(false);
Runnable onLoad = new Runnable() {
public void run() {
if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) {
@@ -122,6 +125,8 @@
getString(R.string.wallpaper_load_fail),
Toast.LENGTH_LONG).show();
finish();
+ } else {
+ mSetWallpaperButton.setEnabled(true);
}
}
};
@@ -271,6 +276,9 @@
}
} catch (IOException e) {
Log.w(LOGTAG, "Getting exif data failed", e);
+ } catch (NullPointerException e) {
+ // Sometimes the ExifInterface has an internal NPE if Exif data isn't valid
+ Log.w(LOGTAG, "Getting exif data failed", e);
} finally {
Utils.closeSilently(bis);
Utils.closeSilently(is);
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index c54e477..013606a 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -16,7 +16,6 @@
package com.android.launcher3;
-import android.animation.Animator;
import android.animation.LayoutTransition;
import android.app.ActionBar;
import android.app.Activity;
@@ -33,7 +32,6 @@
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
-import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.Rect;
@@ -60,6 +58,7 @@
import android.view.ViewPropertyAnimator;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.BaseAdapter;
@@ -88,6 +87,7 @@
private static final String SELECTED_INDEX = "SELECTED_INDEX";
private static final String OLD_DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb.jpg";
private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb2.jpg";
+ private static final int FLAG_POST_DELAY_MILLIS = 200;
private View mSelectedTile;
private boolean mIgnoreNextTap;
@@ -104,7 +104,8 @@
ArrayList<Uri> mTempWallpaperTiles = new ArrayList<Uri>();
private SavedWallpaperImages mSavedImages;
private WallpaperInfo mLiveWallpaperInfoOnPickerLaunch;
- private int mSelectedIndex;
+ private int mSelectedIndex = -1;
+ private WallpaperInfo mLastClickedLiveWallpaperInfo;
public static abstract class WallpaperTileInfo {
protected View mView;
@@ -146,11 +147,13 @@
onLoad = null;
} else {
mFirstClick = false;
+ a.mSetWallpaperButton.setEnabled(false);
onLoad = new Runnable() {
public void run() {
if (mBitmapSource != null &&
mBitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
a.selectTile(mView);
+ a.mSetWallpaperButton.setEnabled(true);
} else {
ViewGroup parent = (ViewGroup) mView.getParent();
if (parent != null) {
@@ -217,6 +220,7 @@
wallpaperSize.x, wallpaperSize.y, false);
v.setScale(wallpaperSize.x / crop.width());
v.setTouchEnabled(false);
+ a.setSystemWallpaperVisiblity(false);
}
@Override
public void onSave(WallpaperPickerActivity a) {
@@ -245,15 +249,23 @@
Drawable defaultWallpaper = WallpaperManager.getInstance(a).getBuiltInDrawable(
c.getWidth(), c.getHeight(), false, 0.5f, 0.5f);
+ if (defaultWallpaper == null) {
+ Log.w(TAG, "Null default wallpaper encountered.");
+ c.setTileSource(null, null);
+ return;
+ }
+
c.setTileSource(
new DrawableTileSource(a, defaultWallpaper, DrawableTileSource.MAX_PREVIEW_SIZE), null);
c.setScale(1f);
c.setTouchEnabled(false);
+ a.setSystemWallpaperVisiblity(false);
}
@Override
public void onSave(WallpaperPickerActivity a) {
try {
WallpaperManager.getInstance(a).clear();
+ a.setResult(RESULT_OK);
} catch (IOException e) {
Log.w("Setting wallpaper to default threw exception", e);
}
@@ -273,11 +285,70 @@
mWallpaperStrip.setPadding(0, 0, 0, (int) offset);
}
+ /**
+ * shows the system wallpaper behind the window and hides the {@link
+ * #mCropView} if visible
+ * @param visible should the system wallpaper be shown
+ */
+ protected void setSystemWallpaperVisiblity(final boolean visible) {
+ // hide our own wallpaper preview if necessary
+ if(!visible) {
+ mCropView.setVisibility(View.VISIBLE);
+ } else {
+ changeWallpaperFlags(visible);
+ }
+ // the change of the flag must be delayed in order to avoid flickering,
+ // a simple post / double post does not suffice here
+ mCropView.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ if(!visible) {
+ changeWallpaperFlags(visible);
+ } else {
+ mCropView.setVisibility(View.INVISIBLE);
+ }
+ }
+ }, FLAG_POST_DELAY_MILLIS);
+ }
+
+ private void changeWallpaperFlags(boolean visible) {
+ int desiredWallpaperFlag = visible ? WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER : 0;
+ int currentWallpaperFlag = getWindow().getAttributes().flags
+ & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
+ if (desiredWallpaperFlag != currentWallpaperFlag) {
+ getWindow().setFlags(desiredWallpaperFlag,
+ WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
+ }
+ }
+
+ @Override
+ public void setCropViewTileSource(BitmapSource bitmapSource,
+ boolean touchEnabled,
+ boolean moveToLeft,
+ final Runnable postExecute) {
+ // we also want to show our own wallpaper instead of the one in the background
+ Runnable showPostExecuteRunnable = new Runnable() {
+ @Override
+ public void run() {
+ if(postExecute != null) {
+ postExecute.run();
+ }
+ setSystemWallpaperVisiblity(false);
+ }
+ };
+ super.setCropViewTileSource(bitmapSource,
+ touchEnabled,
+ moveToLeft,
+ showPostExecuteRunnable);
+ }
+
// called by onCreate; this is subclassed to overwrite WallpaperCropActivity
protected void init() {
setContentView(R.layout.wallpaper_picker);
mCropView = (CropView) findViewById(R.id.cropView);
+ mCropView.setVisibility(View.INVISIBLE);
+
mWallpaperStrip = findViewById(R.id.wallpaper_strip);
mCropView.setTouchCallback(new CropView.TouchCallback() {
ViewPropertyAnimator mAnim;
@@ -331,6 +402,7 @@
}
return;
}
+ mSetWallpaperButton.setEnabled(true);
WallpaperTileInfo info = (WallpaperTileInfo) v.getTag();
if (info.isSelectable() && v.getVisibility() == View.VISIBLE) {
selectTile(v);
@@ -415,13 +487,15 @@
// Add a tile for the default wallpaper
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
DefaultWallpaperInfo defaultWallpaperInfo = getDefaultWallpaper();
- FrameLayout defaultWallpaperTile = (FrameLayout) createImageTileView(
- getLayoutInflater(), 0, null, mWallpapersView, defaultWallpaperInfo.mThumb);
- setWallpaperItemPaddingToZero(defaultWallpaperTile);
- defaultWallpaperTile.setTag(defaultWallpaperInfo);
- mWallpapersView.addView(defaultWallpaperTile, 0);
- defaultWallpaperTile.setOnClickListener(mThumbnailOnClickListener);
- defaultWallpaperInfo.setView(defaultWallpaperTile);
+ if (defaultWallpaperInfo != null) {
+ FrameLayout defaultWallpaperTile = (FrameLayout) createImageTileView(
+ getLayoutInflater(), 0, null, mWallpapersView, defaultWallpaperInfo.mThumb);
+ setWallpaperItemPaddingToZero(defaultWallpaperTile);
+ defaultWallpaperTile.setTag(defaultWallpaperInfo);
+ mWallpapersView.addView(defaultWallpaperTile, 0);
+ defaultWallpaperTile.setOnClickListener(mThumbnailOnClickListener);
+ defaultWallpaperInfo.setView(defaultWallpaperTile);
+ }
}
// Select the first item; wait for a layout pass so that we initialize the dimensions of
@@ -434,6 +508,7 @@
if (mSelectedIndex >= 0 && mSelectedIndex < mWallpapersView.getChildCount()) {
mThumbnailOnClickListener.onClick(
mWallpapersView.getChildAt(mSelectedIndex));
+ setSystemWallpaperVisiblity(false);
}
v.removeOnLayoutChangeListener(this);
}
@@ -463,9 +538,14 @@
if (mSelectedTile != null) {
WallpaperTileInfo info = (WallpaperTileInfo) mSelectedTile.getTag();
info.onSave(WallpaperPickerActivity.this);
+ } else {
+ // no tile was selected, so we just finish the activity and go back
+ setResult(Activity.RESULT_OK);
+ finish();
}
}
});
+ mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);
// CAB for deleting items
mActionModeCallback = new ActionMode.Callback() {
@@ -512,6 +592,7 @@
if (itemId == R.id.menu_delete) {
int childCount = mWallpapersView.getChildCount();
ArrayList<View> viewsToRemove = new ArrayList<View>();
+ boolean selectedTileRemoved = false;
for (int i = 0; i < childCount; i++) {
CheckableFrameLayout c =
(CheckableFrameLayout) mWallpapersView.getChildAt(i);
@@ -519,11 +600,19 @@
WallpaperTileInfo info = (WallpaperTileInfo) c.getTag();
info.onDelete(WallpaperPickerActivity.this);
viewsToRemove.add(c);
+ if (i == mSelectedIndex) {
+ selectedTileRemoved = true;
+ }
}
}
for (View v : viewsToRemove) {
mWallpapersView.removeView(v);
}
+ if (selectedTileRemoved) {
+ mSelectedIndex = -1;
+ mSelectedTile = null;
+ setSystemWallpaperVisiblity(true);
+ }
updateTileIndices();
mode.finish(); // Action picked, so close the CAB
return true;
@@ -540,7 +629,9 @@
CheckableFrameLayout c = (CheckableFrameLayout) mWallpapersView.getChildAt(i);
c.setChecked(false);
}
- mSelectedTile.setSelected(true);
+ if (mSelectedTile != null) {
+ mSelectedTile.setSelected(true);
+ }
mActionMode = null;
}
};
@@ -612,7 +703,7 @@
for (Uri uri : uris) {
addTemporaryWallpaperTile(uri, true);
}
- mSelectedIndex = savedInstanceState.getInt(SELECTED_INDEX, 0);
+ mSelectedIndex = savedInstanceState.getInt(SELECTED_INDEX, -1);
}
private void populateWallpapersFromAdapter(ViewGroup parent, BaseAdapter adapter,
@@ -770,11 +861,15 @@
} else if (requestCode == PICK_LIVE_WALLPAPER) {
WallpaperManager wm = WallpaperManager.getInstance(this);
final WallpaperInfo oldLiveWallpaper = mLiveWallpaperInfoOnPickerLaunch;
+ final WallpaperInfo clickedWallpaper = mLastClickedLiveWallpaperInfo;
WallpaperInfo newLiveWallpaper = wm.getWallpaperInfo();
// Try to figure out if a live wallpaper was set;
if (newLiveWallpaper != null &&
- (oldLiveWallpaper == null ||
- !oldLiveWallpaper.getComponent().equals(newLiveWallpaper.getComponent()))) {
+ (oldLiveWallpaper == null
+ || !oldLiveWallpaper.getComponent()
+ .equals(newLiveWallpaper.getComponent())
+ || clickedWallpaper.getComponent()
+ .equals(oldLiveWallpaper.getComponent()))) {
// Return if a live wallpaper was set
setResult(RESULT_OK);
finish();
@@ -934,7 +1029,8 @@
return mSavedImages;
}
- public void onLiveWallpaperPickerLaunch() {
+ public void onLiveWallpaperPickerLaunch(WallpaperInfo info) {
+ mLastClickedLiveWallpaperInfo = info;
mLiveWallpaperInfoOnPickerLaunch = WallpaperManager.getInstance(this).getWallpaperInfo();
}
diff --git a/WallpaperPicker/src/com/android/photos/BitmapRegionTileSource.java b/WallpaperPicker/src/com/android/photos/BitmapRegionTileSource.java
index cdc5cdc..764156d 100644
--- a/WallpaperPicker/src/com/android/photos/BitmapRegionTileSource.java
+++ b/WallpaperPicker/src/com/android/photos/BitmapRegionTileSource.java
@@ -245,6 +245,9 @@
try {
ei.readExif(mPath);
return true;
+ } catch (NullPointerException e) {
+ Log.w("BitmapRegionTileSource", "reading exif failed", e);
+ return false;
} catch (IOException e) {
Log.w("BitmapRegionTileSource", "getting decoder failed", e);
return false;
@@ -311,6 +314,9 @@
} catch (IOException e) {
Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
return false;
+ } catch (NullPointerException e) {
+ Log.e("BitmapRegionTileSource", "Failed to read EXIF for URI " + mUri, e);
+ return false;
} finally {
Utils.closeSilently(is);
}
diff --git a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
index af4199c..94063b0 100644
--- a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
+++ b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
@@ -112,6 +112,18 @@
//setTileSource(new ColoredTiles());
}
+ @Override
+ public void setVisibility(int visibility) {
+ super.setVisibility(visibility);
+ // need to update inner view's visibility because it seems like we're causing it to draw
+ // from {@link #dispatchDraw} or {@link #invalidate} even if we are invisible.
+ if (USE_TEXTURE_VIEW) {
+ mTextureView.setVisibility(visibility);
+ } else {
+ mGLSurfaceView.setVisibility(visibility);
+ }
+ }
+
public void destroy() {
if (!IS_SUPPORTED) {
return;
diff --git a/res/layout-land/migration_workspace_cling.xml b/res/layout-land/migration_workspace_cling.xml
index 2d71940..1148be4 100644
--- a/res/layout-land/migration_workspace_cling.xml
+++ b/res/layout-land/migration_workspace_cling.xml
@@ -25,6 +25,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:paddingEnd="60dp"
+ android:paddingRight="60dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/migration_workspace_cling_bubble"
diff --git a/res/layout/custom_workspace_cling.xml b/res/layout/custom_workspace_cling.xml
deleted file mode 100644
index 3744f2e..0000000
--- a/res/layout/custom_workspace_cling.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-<!-- dummy layout, to be replaced in overlays -->
-<com.android.launcher3.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- launcher:drawIdentifier="workspace_custom">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="20dp"
- android:textColor="@android:color/holo_blue_light"
- android:text="@string/dummy_custom_cling_error_message"
- android:gravity="start"
- android:layout_gravity="bottom|start"
- />
-</com.android.launcher3.Cling>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 53b5b5a..b5c17c5 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Vouer is gesluit"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Vouer hernoem na <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Vouer: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Legstukke"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Muurpapiere"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Instellings"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index b0c862d..ea64f6f 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"አቃፊ ተዘግቷል"</string>
<string name="folder_renamed" msgid="1794088362165669656">"አቃፊ <xliff:g id="NAME">%1$s</xliff:g> ተብሎ ዳግም ተሰይሟል"</string>
<string name="folder_name_format" msgid="6629239338071103179">"አቃፊ፦ <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ፍርግሞች"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"የግድግዳ ወረቀቶች"</string>
<string name="settings_button_text" msgid="8119458837558863227">"ቅንብሮች"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 98dce5f..7eb37d3 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"تم إغلاق المجلد"</string>
<string name="folder_renamed" msgid="1794088362165669656">"تمت إعادة تسمية المجلد إلى <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"المجلد: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"الأدوات"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"الخلفيات"</string>
<string name="settings_button_text" msgid="8119458837558863227">"الإعدادات"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 2465534..2015158 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -26,6 +26,27 @@
<!-- no translation found for uid_name (7820867637514617527) -->
<skip />
<string name="folder_name" msgid="7371454440695724752"></string>
+ <!-- no translation found for wallpaper_instructions (563973358787555519) -->
+ <skip />
+ <!-- no translation found for image_load_fail (2821429163328561136) -->
+ <skip />
+ <!-- no translation found for wallpaper_load_fail (1261270681127096352) -->
+ <skip />
+ <!-- no translation found for number_of_items_selected:zero (7464587177007785408) -->
+ <!-- no translation found for number_of_items_selected:one (142482526010824029) -->
+ <!-- no translation found for number_of_items_selected:other (1418352074806573570) -->
+ <!-- no translation found for wallpaper_accessibility_name (1655953108132967972) -->
+ <skip />
+ <!-- no translation found for announce_selection (8338254712932127413) -->
+ <skip />
+ <!-- no translation found for wallpaper_delete (8095005658756613921) -->
+ <skip />
+ <!-- no translation found for pick_image (1272073934062909527) -->
+ <skip />
+ <!-- no translation found for pick_wallpaper (8179698221502010609) -->
+ <skip />
+ <!-- no translation found for crop_wallpaper (8334345984491368009) -->
+ <skip />
<!-- no translation found for activity_not_found (8071924732094499514) -->
<skip />
<!-- no translation found for widgets_tab_label (2921133187116603919) -->
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 9082929..13c0118 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Папката бе затворена"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Папката е преименувана на „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Папка: „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Приспособления"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Тапети"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Настройки"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 865d0e0..3e6bedb 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Carpeta tancada"</string>
<string name="folder_renamed" msgid="1794088362165669656">"S\'ha canviat el nom de la carpeta a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Carpeta: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fons de pantalla"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Configuració"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 0255709..3a0e672 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Složka je uzavřena"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Složka přejmenována na <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Složka: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgety"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Tapety"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Nastavení"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 68ceb5b..7d41489 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mappen er lukket"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mappen er omdøbt til <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mappe: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Baggrunde"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Indstillinger"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 4bd04b2..c11a651 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Ordner geschlossen"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Ordner umbenannt in <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Ordner: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Hintergründe"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Einstellungen"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index b6a9855..ec05ae5 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Ο φάκελος έκλεισε"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Ο φάκελος μετονομάστηκε σε <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Φάκελος: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Γραφικά στοιχεία"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Ταπετσαρίες"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Ρυθμίσεις"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 9f732e0..cab1707 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folder closed"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Folder renamed to <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Settings"</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 9f732e0..cab1707 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folder closed"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Folder renamed to <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpapers"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Settings"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 95e4a99..278f0d8 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Carpeta cerrada"</string>
<string name="folder_renamed" msgid="1794088362165669656">"El nombre de la carpeta se cambió a <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="folder_name_format" msgid="6629239338071103179">"Carpeta: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fondos de pantalla"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Configuración"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index e5beb90..f9cf809 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Carpeta cerrada"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Se ha cambiado el nombre de la carpeta a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Carpeta: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fondos de pantalla"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Ajustes"</string>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index a2f3125..92985d2 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Kaust on suletud"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Kausta uus nimi: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Kaust: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Vidinad"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Taustapildid"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Seaded"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 9f22f93..a01ea79 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"پوشه بسته شد"</string>
<string name="folder_renamed" msgid="1794088362165669656">"نام پوشه به <xliff:g id="NAME">%1$s</xliff:g> تغییر کرد"</string>
<string name="folder_name_format" msgid="6629239338071103179">"پوشه: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ابزارکها"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"کاغذدیواریها"</string>
<string name="settings_button_text" msgid="8119458837558863227">"تنظیمات"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index af461a5..9a48ab3 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Kansio on suljettu"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Kansion nimeksi vaihdettiin <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Kansio: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgetit"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Taustakuvat"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Asetukset"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 0334351..92c5cc4 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Dossier fermé"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Nouveau nom du dossier : <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Dossier : <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fonds d\'écran"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Paramètres"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 5f0607e..18732f8 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Dossier fermé"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Nouveau nom du dossier : <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Dossier \"<xliff:g id="NAME">%1$s</xliff:g>\""</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fonds d\'écran"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Paramètres"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 058f534..a5481a1 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"फ़ोल्डर बंद किया गया"</string>
<string name="folder_renamed" msgid="1794088362165669656">"फ़ोल्डर का नाम बदलकर <xliff:g id="NAME">%1$s</xliff:g> किया गया"</string>
<string name="folder_name_format" msgid="6629239338071103179">"फ़ोल्डर: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"विजेट"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"वॉलपेपर"</string>
<string name="settings_button_text" msgid="8119458837558863227">"सेटिंग"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 52a91a3..32f3feb 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mapa je zatvorena"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mapa je preimenovana u <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mapa: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgeti"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Pozadinske slike"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Postavke"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 38b6b5c..37d5059 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mappa lezárva"</string>
<string name="folder_renamed" msgid="1794088362165669656">"A mappa új neve: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mappa: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Modulok"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Háttérképek"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Beállítások"</string>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index 1faae76..6e9491b 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Թղթապանակը փակ է"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Թղթապանակը վերանվանվեց <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Թղթապանակ՝ <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Վիջեթներ"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Պաստառներ"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Կարգավորումներ"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 732dd45..d5df63b 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folder ditutup"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Folder diganti namanya menjadi <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widget"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpaper"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Setelan"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index f379ae7..20451d1 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Cartella chiusa"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Nome della cartella sostituito con <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Cartella: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widget"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Sfondi"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Impostazioni"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index af853a8..08d9653 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"התיקיה נסגרה"</string>
<string name="folder_renamed" msgid="1794088362165669656">"שם התיקיה שונה ל-<xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"תיקיה: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"רכיבי ווידג\'ט"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"טפטים"</string>
<string name="settings_button_text" msgid="8119458837558863227">"הגדרות"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index b396893..ad5e8ff 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"フォルダは閉じています"</string>
<string name="folder_renamed" msgid="1794088362165669656">"フォルダの名前を「<xliff:g id="NAME">%1$s</xliff:g>」に変更しました"</string>
<string name="folder_name_format" msgid="6629239338071103179">"フォルダ: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ウィジェット"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"壁紙"</string>
<string name="settings_button_text" msgid="8119458837558863227">"設定"</string>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index 4c53cc8..086df72 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"საქაღალდე დაიხურა"</string>
<string name="folder_renamed" msgid="1794088362165669656">"საქაღალდეს შეეცვალა სახელი „<xliff:g id="NAME">%1$s</xliff:g>“-ად"</string>
<string name="folder_name_format" msgid="6629239338071103179">"საქაღალდე: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ვიჯეტები"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"ფონები"</string>
<string name="settings_button_text" msgid="8119458837558863227">"პარამეტრები"</string>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index eb30a16..bf2f01c 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"បានបិទថត"</string>
<string name="folder_renamed" msgid="1794088362165669656">"បានប្ដូរឈ្មោះថតជា <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"ថត៖ <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ធាតុក្រាហ្វិក"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"ផ្ទាំងរូបភាព"</string>
<string name="settings_button_text" msgid="8119458837558863227">"ការកំណត់"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 656c972..dde4eb7 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"폴더 닫음"</string>
<string name="folder_renamed" msgid="1794088362165669656">"폴더 이름 변경: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"폴더: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"위젯"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"배경화면"</string>
<string name="settings_button_text" msgid="8119458837558863227">"설정"</string>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index 5ced01a..092098b 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"ປິດໂຟນເດີແລ້ວ"</string>
<string name="folder_renamed" msgid="1794088362165669656">"ປ່ຽນຊື່ໂຟນເດີເປັນ <xliff:g id="NAME">%1$s</xliff:g> ແລ້ວ"</string>
<string name="folder_name_format" msgid="6629239338071103179">"ໂຟນເດີ: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"ວິດເຈັດ"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"ພາບພື້ນຫຼັງ"</string>
<string name="settings_button_text" msgid="8119458837558863227">"ການຕັ້ງຄ່າ"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index aed0e84..aba231d 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Aplankas uždarytas"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Aplankas pervardytas kaip „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Aplankas: „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Valdikliai"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Ekrano fonai"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Nustatymai"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 74ae7a4..6d4888d 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mape aizvērta"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mape pārdēvēta par: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mape: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Logrīki"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Fona tapetes"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Iestatījumi"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index 0430ac5..db92a5c 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Фолдер хаагдав"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Фолдерын нэр <xliff:g id="NAME">%1$s</xliff:g> болов"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Фолдер: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Виджет"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Ханын зураг"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Тохиргоо"</string>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 802aa95..678eeb4 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folder ditutup"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Folder dinamakan semula kepada <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widget"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Kertas dinding"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Tetapan"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 0e16375..dd89a4f 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mappen ble lukket"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mappen heter nå <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mappe: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Moduler"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Bakgrunner"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Innstillinger"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index f6c1b09..d39c1ea 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Map gesloten"</string>
<string name="folder_renamed" msgid="1794088362165669656">"De naam van de map is gewijzigd in <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Map: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Achtergronden"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Instellingen"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 5a2efbf..b428a95 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folder zamknięty"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Nazwa folderu zmieniona na <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widżety"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Tapety"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Ustawienia"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index c6f5710..b8e51d6 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Pasta fechada"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Nome de pasta alterado para <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Pasta: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Imagens de fundo"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Definições"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 0252d61..03c621a 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Pasta fechada"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Pasta renomeada para <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Pasta: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Planos de fundo"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Configurações"</string>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index 8563d7d..3600095 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -186,10 +186,6 @@
<skip />
<!-- no translation found for folder_name_format (6629239338071103179) -->
<skip />
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<!-- no translation found for widget_button_text (2880537293434387943) -->
<skip />
<!-- no translation found for wallpaper_button_text (8404103075899945851) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 75479ed..a667ffd 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Dosar închis"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Dosar redenumit <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Dosar: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgeturi"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Imagini de fundal"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Setări"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index a93583d..c2e8bc7 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Папка закрыта"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Папка переименована в \"<xliff:g id="NAME">%1$s</xliff:g>\""</string>
<string name="folder_name_format" msgid="6629239338071103179">"Папка: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Виджеты"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Обои"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Настройки"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 485a2ec..acd8e05 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Priečinok je uzavretý"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Priečinok bol premenovaný na <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Priečinok: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Miniaplikácie"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Tapety"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Nastavenia"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index dfd63e2..afbd620 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mapa je zaprta"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mapa je preimenovana v <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mapa: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Pripomočki"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Ozadja"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Nastavitve"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index dd28fa3..bf71b28 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Директоријум је затворен"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Директоријум је преименован у <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Директоријум: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Виџети"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Позадине"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Подешавања"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 4005b7e..5825eec 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Mappen är stängd"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Mappen har bytt namn till <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Mapp: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widgetar"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Bakgrunder"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Inställningar"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 4397d3b..37d0708 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -106,10 +106,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Folda imefungwa"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Folda imebadilishwa jina kuwa <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folda: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Wijeti"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Mandhari"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Mipangilio"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 413c78a..87e8237 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"โฟลเดอร์ปิดอยู่"</string>
<string name="folder_renamed" msgid="1794088362165669656">"เปลี่ยนชื่อโฟลเดอร์เป็น <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"โฟลเดอร์: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"วิดเจ็ต"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"วอลเปเปอร์"</string>
<string name="settings_button_text" msgid="8119458837558863227">"การตั้งค่า"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 897631a..5be9d85 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Nakasara ang folder"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Pinalitan ang pangalan ng folder ng <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Folder: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Mga Widget"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Mga Wallpaper"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Mga Setting"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 42fa172..01f79a2 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Klasör kapatıldı"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Klasörün adı <xliff:g id="NAME">%1$s</xliff:g> olarak değiştirildi"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Klasör: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Widget\'lar"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Duvar Kağıtları"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Ayarlar"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 7cef321..f266eea 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Папку закрито"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Папку перейменовано на <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Папка <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Віджети"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Фонові малюнки"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Налаштування"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 20a9b3a..9d4ed41 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Đã đóng thư mục"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Đã đổi tên thư mục thành <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Thư mục: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Tiện ích con"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Hình nền"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Cài đặt"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 540291e..3a2638e 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"文件夹已关闭"</string>
<string name="folder_renamed" msgid="1794088362165669656">"已将文件夹重命名为“<xliff:g id="NAME">%1$s</xliff:g>”"</string>
<string name="folder_name_format" msgid="6629239338071103179">"文件夹:<xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"小部件"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"壁纸"</string>
<string name="settings_button_text" msgid="8119458837558863227">"设置"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index c1486ef..cad95f2 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"已關閉資料夾"</string>
<string name="folder_renamed" msgid="1794088362165669656">"資料夾已重新命名為「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
<string name="folder_name_format" msgid="6629239338071103179">"資料夾:<xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"小工具"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"桌布"</string>
<string name="settings_button_text" msgid="8119458837558863227">"設定"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index d4acb20..5f48243 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"資料夾已關閉"</string>
<string name="folder_renamed" msgid="1794088362165669656">"已將資料夾重新命名為「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
<string name="folder_name_format" msgid="6629239338071103179">"資料夾:<xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"小工具"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"桌布"</string>
<string name="settings_button_text" msgid="8119458837558863227">"設定"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index c07f6a9..e982eb4 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -104,10 +104,6 @@
<string name="folder_closed" msgid="4100806530910930934">"Ifolda ivaliwe"</string>
<string name="folder_renamed" msgid="1794088362165669656">"Ifolda iqanjwe kabusha ngo-<xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="folder_name_format" msgid="6629239338071103179">"Ifolda: <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="custom_workspace_cling_title_1" msgid="3750880082935033085"></string>
- <string name="custom_workspace_cling_description_1" msgid="939966842147696724"></string>
- <string name="custom_workspace_cling_title_2" msgid="662588444436552198"></string>
- <string name="custom_workspace_cling_description_2" msgid="8097921091798539310"></string>
<string name="widget_button_text" msgid="2880537293434387943">"Amawijethi"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"Izithombe zangemuva"</string>
<string name="settings_button_text" msgid="8119458837558863227">"Izilungiselelo"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2c6306a..9cb6c29 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -252,18 +252,6 @@
<!-- Folder name format -->
<string name="folder_name_format">Folder: <xliff:g id="name" example="Games">%1$s</xliff:g></string>
- <!-- Strings used in device overlays -->
-
- <!-- Clings -->
- <!-- Dummy string [CHAR_LIMIT=40] -->
- <string name="custom_workspace_cling_title_1"></string>
- <!-- Dummy string [CHAR_LIMIT=60] -->
- <string name="custom_workspace_cling_description_1"></string>
- <!-- Dummy string [CHAR_LIMIT=40] -->
- <string name="custom_workspace_cling_title_2"></string>
- <!-- Dummy string [CHAR_LIMIT=60] -->
- <string name="custom_workspace_cling_description_2"></string>
-
<!-- Debug-only activity name. [DO NOT TRANSLATE] -->
<string name="debug_memory_activity">* HPROF</string>
diff --git a/src/com/android/launcher3/AllAppsList.java b/src/com/android/launcher3/AllAppsList.java
index b641eb5..89b291f 100644
--- a/src/com/android/launcher3/AllAppsList.java
+++ b/src/com/android/launcher3/AllAppsList.java
@@ -32,7 +32,7 @@
*/
class AllAppsList {
public static final int DEFAULT_APPLICATIONS_NUMBER = 42;
-
+
/** The list off all apps. */
public ArrayList<AppInfo> data =
new ArrayList<AppInfo>(DEFAULT_APPLICATIONS_NUMBER);
@@ -115,8 +115,7 @@
data.remove(i);
}
}
- // This is more aggressive than it needs to be.
- mIconCache.flush();
+ mIconCache.remove(packageName);
}
/**
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java
index d5a7769..da222f1 100644
--- a/src/com/android/launcher3/AppInfo.java
+++ b/src/com/android/launcher3/AppInfo.java
@@ -64,6 +64,10 @@
return intent;
}
+ protected Intent getRestoredIntent() {
+ return null;
+ }
+
/**
* Must not hold the Context.
*/
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 49b12b1..251ae21 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -817,7 +817,7 @@
*/
private void endDragging(View target, boolean isFlingToDelete, boolean success) {
if (isFlingToDelete || !success || (target != mLauncher.getWorkspace() &&
- !(target instanceof DeleteDropTarget))) {
+ !(target instanceof DeleteDropTarget) && !(target instanceof Folder))) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
mLauncher.getWorkspace().removeExtraEmptyScreen(true, new Runnable() {
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java
index ab0469d..862ceca 100644
--- a/src/com/android/launcher3/DragLayer.java
+++ b/src/com/android/launcher3/DragLayer.java
@@ -65,8 +65,6 @@
private boolean mHoverPointClosesFolder = false;
private Rect mHitRect = new Rect();
- private int mWorkspaceIndex = -1;
- private int mQsbIndex = -1;
public static final int ANIMATION_END_DISAPPEAR = 0;
public static final int ANIMATION_END_FADE_OUT = 1;
public static final int ANIMATION_END_REMAIN_VISIBLE = 2;
@@ -75,6 +73,8 @@
private final Rect mInsets = new Rect();
+ private int mDragViewIndex;
+
/**
* Used to create a new DragLayer from XML.
*
@@ -771,31 +771,26 @@
}
private void updateChildIndices() {
- if (mLauncher != null) {
- mWorkspaceIndex = indexOfChild(mLauncher.getWorkspace());
- mQsbIndex = indexOfChild(mLauncher.getSearchBar());
+ mDragViewIndex = -1;
+ int childCount = getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ if (getChildAt(i) instanceof DragView) {
+ mDragViewIndex = i;
+ }
}
}
@Override
protected int getChildDrawingOrder(int childCount, int i) {
- // TODO: We have turned off this custom drawing order because it now effects touch
- // dispatch order. We need to sort that issue out and then decide how to go about this.
- if (true || LauncherAppState.isScreenLandscape(getContext()) ||
- mWorkspaceIndex == -1 || mQsbIndex == -1 ||
- mLauncher.getWorkspace().isDrawingBackgroundGradient()) {
+ if (mDragViewIndex == -1) {
return i;
- }
-
- // This ensures that the workspace is drawn above the hotseat and qsb,
- // except when the workspace is drawing a background gradient, in which
- // case we want the workspace to stay behind these elements.
- if (i == mQsbIndex) {
- return mWorkspaceIndex;
- } else if (i == mWorkspaceIndex) {
- return mQsbIndex;
+ } else if (i == mDragViewIndex) {
+ return getChildCount()-1;
+ } else if (i < mDragViewIndex) {
+ return i;
} else {
- return i;
+ // i > mDragViewIndex
+ return i-1;
}
}
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index a9134e1..b4c3992 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -24,7 +24,6 @@
import android.content.res.Resources;
import android.graphics.PointF;
import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
import android.os.SystemClock;
import android.support.v4.widget.AutoScrollHelper;
import android.text.InputType;
@@ -70,6 +69,8 @@
static final int STATE_ANIMATING = 1;
static final int STATE_OPEN = 2;
+ private static final int CLOSE_FOLDER_DELAY_MS = 150;
+
private int mExpandDuration;
protected CellLayout mContent;
private ScrollView mScrollView;
@@ -85,10 +86,10 @@
private int mMaxCountY;
private int mMaxNumItems;
private ArrayList<View> mItemsInReadingOrder = new ArrayList<View>();
- private Drawable mIconDrawable;
boolean mItemsInvalidated = false;
private ShortcutInfo mCurrentDragInfo;
private View mCurrentDragView;
+ private boolean mIsExternalDrag;
boolean mSuppressOnAdd = false;
private int[] mTargetCell = new int[2];
private int[] mPreviousTargetCell = new int[2];
@@ -242,7 +243,6 @@
mLauncher.getWorkspace().onDragStartedWithItem(v);
mLauncher.getWorkspace().beginDragShared(v, this);
- mIconDrawable = ((TextView) v).getCompoundDrawables()[1];
mCurrentDragInfo = item;
mEmptyCell[0] = item.cellX;
@@ -303,10 +303,6 @@
return mFolderName;
}
- public Drawable getDragDrawable() {
- return mIconDrawable;
- }
-
/**
* We need to handle touch events to prevent them from falling through to the workspace below.
*/
@@ -381,7 +377,7 @@
int count = 0;
for (int i = 0; i < children.size(); i++) {
ShortcutInfo child = (ShortcutInfo) children.get(i);
- if (!createAndAddShortcut(child)) {
+ if (createAndAddShortcut(child) == null) {
overflow.add(child);
} else {
count++;
@@ -466,11 +462,15 @@
public void onAnimationEnd(Animator animation) {
mState = STATE_OPEN;
setLayerType(LAYER_TYPE_NONE, null);
- Cling cling = mLauncher.getLauncherClings().showFoldersCling();
- if (cling != null) {
- cling.bringScrimToFront();
- bringToFront();
- cling.bringToFront();
+
+ // Only show cling if we are not in the middle of a drag - this would be quite jarring.
+ if (!mDragController.isDragging()) {
+ Cling cling = mLauncher.getLauncherClings().showFoldersCling();
+ if (cling != null) {
+ cling.bringScrimToFront();
+ bringToFront();
+ cling.bringToFront();
+ }
}
setFocusOnFirstChild();
}
@@ -478,6 +478,23 @@
oa.setDuration(mExpandDuration);
setLayerType(LAYER_TYPE_HARDWARE, null);
oa.start();
+
+ // Make sure the folder picks up the last drag move even if the finger doesn't move.
+ if (mDragController.isDragging()) {
+ mDragController.forceTouchMove();
+ }
+ }
+
+ public void beginExternalDrag(ShortcutInfo item) {
+ setupContentForNumItems(getItemCount() + 1);
+ findAndSetEmptyCells(item);
+
+ mCurrentDragInfo = item;
+ mEmptyCell[0] = item.cellX;
+ mEmptyCell[1] = item.cellY;
+ mIsExternalDrag = true;
+
+ mDragInProgress = true;
}
private void sendCustomAccessibilityEvent(int type, String text) {
@@ -544,7 +561,7 @@
}
}
- protected boolean createAndAddShortcut(ShortcutInfo item) {
+ protected View createAndAddShortcut(ShortcutInfo item) {
final BubbleTextView textView =
(BubbleTextView) mInflater.inflate(R.layout.application, this, false);
textView.setCompoundDrawables(null,
@@ -565,7 +582,7 @@
// This shouldn't happen, log it.
Log.e(TAG, "Folder order not properly persisted during bind");
if (!findAndSetEmptyCells(item)) {
- return false;
+ return null;
}
}
@@ -574,7 +591,7 @@
boolean insert = false;
textView.setOnKeyListener(new FolderKeyEventListener());
mContent.addViewToCellLayout(textView, insert ? 0 : -1, (int)item.id, lp, true);
- return true;
+ return textView;
}
public void onDragEnter(DragObject d) {
@@ -723,6 +740,7 @@
mCurrentDragView = null;
mSuppressOnAdd = false;
mRearrangeOnClose = true;
+ mIsExternalDrag = false;
}
public void onDragExit(DragObject d) {
@@ -756,7 +774,7 @@
success && (!beingCalledAfterUninstall || mUninstallSuccessful);
if (successfulDrop) {
- if (mDeleteFolderOnDropCompleted && !mItemAddedBackToSelfViaIcon) {
+ if (mDeleteFolderOnDropCompleted && !mItemAddedBackToSelfViaIcon && target != this) {
replaceFolderWithFinalItem();
}
} else {
@@ -1152,34 +1170,75 @@
}
public void onDrop(DragObject d) {
- ShortcutInfo item;
- if (d.dragInfo instanceof AppInfo) {
- // Came from all apps -- make a copy
- item = ((AppInfo) d.dragInfo).makeShortcut();
- item.spanX = 1;
- item.spanY = 1;
- } else {
- item = (ShortcutInfo) d.dragInfo;
+ Runnable cleanUpRunnable = null;
+
+ // If we are coming from All Apps space, we need to remove the extra empty screen (which is
+ // normally done in Workspace#onDropExternal, as well zoom back in and close the folder.
+ if (d.dragSource != mLauncher.getWorkspace() && !(d.dragSource instanceof Folder)) {
+ cleanUpRunnable = new Runnable() {
+ @Override
+ public void run() {
+ mLauncher.getWorkspace().removeExtraEmptyScreen(false, new Runnable() {
+ @Override
+ public void run() {
+ mLauncher.closeFolder();
+ mLauncher.exitSpringLoadedDragModeDelayed(true,
+ Launcher.EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT_FOLDER_CLOSE,
+ null);
+ }
+ }, CLOSE_FOLDER_DELAY_MS, false);
+ }
+ };
}
- // Dragged from self onto self, currently this is the only path possible, however
- // we keep this as a distinct code path.
- if (item == mCurrentDragInfo) {
- ShortcutInfo si = (ShortcutInfo) mCurrentDragView.getTag();
- CellLayout.LayoutParams lp = (CellLayout.LayoutParams) mCurrentDragView.getLayoutParams();
+
+ View currentDragView;
+ ShortcutInfo si = mCurrentDragInfo;
+ if (mIsExternalDrag) {
+ si.cellX = mEmptyCell[0];
+ si.cellY = mEmptyCell[1];
+ currentDragView = createAndAddShortcut(si);
+ } else {
+ currentDragView = mCurrentDragView;
+ CellLayout.LayoutParams lp = (CellLayout.LayoutParams) currentDragView.getLayoutParams();
si.cellX = lp.cellX = mEmptyCell[0];
si.cellX = lp.cellY = mEmptyCell[1];
- mContent.addViewToCellLayout(mCurrentDragView, -1, (int)item.id, lp, true);
- if (d.dragView.hasDrawn()) {
- mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, mCurrentDragView);
- } else {
- d.deferDragViewCleanupPostAnimation = false;
- mCurrentDragView.setVisibility(VISIBLE);
- }
- mItemsInvalidated = true;
- setupContentDimensions(getItemCount());
- mSuppressOnAdd = true;
+ mContent.addViewToCellLayout(currentDragView, -1, (int) si.id, lp, true);
}
- mInfo.add(item);
+
+ if (d.dragView.hasDrawn()) {
+
+ // Temporarily reset the scale such that the animation target gets calculated correctly.
+ float scaleX = getScaleX();
+ float scaleY = getScaleY();
+ setScaleX(1.0f);
+ setScaleY(1.0f);
+ mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, currentDragView,
+ cleanUpRunnable, null);
+ setScaleX(scaleX);
+ setScaleY(scaleY);
+ } else {
+ d.deferDragViewCleanupPostAnimation = false;
+ currentDragView.setVisibility(VISIBLE);
+ }
+ mItemsInvalidated = true;
+ setupContentDimensions(getItemCount());
+
+ // Actually move the item in the database if it was an external drag.
+ if (mIsExternalDrag) {
+ LauncherModel.addOrMoveItemInDatabase(
+ mLauncher, si, mInfo.id, 0, si.cellX, si.cellY);
+
+ // We only need to update the locations if it doesn't get handled in #onDropCompleted.
+ if (d.dragSource != this) {
+ updateItemLocationsInDatabaseBatch();
+ }
+ mIsExternalDrag = false;
+ }
+
+ // Temporarily suppress the listener, as we did all the work already here.
+ mSuppressOnAdd = true;
+ mInfo.add(si);
+ mSuppressOnAdd = false;
}
// This is used so the item doesn't immediately appear in the folder when added. In one case
diff --git a/src/com/android/launcher3/FolderIcon.java b/src/com/android/launcher3/FolderIcon.java
index 644db47..78026f1 100644
--- a/src/com/android/launcher3/FolderIcon.java
+++ b/src/com/android/launcher3/FolderIcon.java
@@ -75,10 +75,16 @@
// Flag as to whether or not to draw an outer ring. Currently none is designed.
public static final boolean HAS_OUTER_RING = true;
+ // Flag whether the folder should open itself when an item is dragged over is enabled.
+ public static final boolean SPRING_LOADING_ENABLED = true;
+
// The degree to which the item in the back of the stack is scaled [0...1]
// (0 means it's not scaled at all, 1 means it's scaled to nothing)
private static final float PERSPECTIVE_SCALE_FACTOR = 0.35f;
+ // Delay when drag enters until the folder opens, in miliseconds.
+ private static final int ON_OPEN_DELAY = 800;
+
public static Drawable sSharedFolderLeaveBehind = null;
private ImageView mPreviewBackground;
@@ -103,6 +109,9 @@
private PreviewItemDrawingParams mAnimParams = new PreviewItemDrawingParams(0, 0, 0, 0);
private ArrayList<ShortcutInfo> mHiddenItems = new ArrayList<ShortcutInfo>();
+ private Alarm mOpenAlarm = new Alarm();
+ private ItemInfo mDragInfo;
+
public FolderIcon(Context context, AttributeSet attrs) {
super(context, attrs);
init();
@@ -331,11 +340,32 @@
mFolderRingAnimator.setCellLayout(layout);
mFolderRingAnimator.animateToAcceptState();
layout.showFolderAccept(mFolderRingAnimator);
+ mOpenAlarm.setOnAlarmListener(mOnOpenListener);
+ if (SPRING_LOADING_ENABLED) {
+ mOpenAlarm.setAlarm(ON_OPEN_DELAY);
+ }
+ mDragInfo = (ItemInfo) dragInfo;
}
public void onDragOver(Object dragInfo) {
}
+ OnAlarmListener mOnOpenListener = new OnAlarmListener() {
+ public void onAlarm(Alarm alarm) {
+ ShortcutInfo item;
+ if (mDragInfo instanceof AppInfo) {
+ // Came from all apps -- make a copy.
+ item = ((AppInfo) mDragInfo).makeShortcut();
+ item.spanX = 1;
+ item.spanY = 1;
+ } else {
+ item = (ShortcutInfo) mDragInfo;
+ }
+ mFolder.beginExternalDrag(item);
+ mLauncher.openFolder(FolderIcon.this);
+ }
+ };
+
public void performCreateAnimation(final ShortcutInfo destInfo, final View destView,
final ShortcutInfo srcInfo, final DragView srcView, Rect dstRect,
float scaleRelativeToDragLayer, Runnable postAnimationRunnable) {
@@ -371,6 +401,7 @@
public void onDragExit() {
mFolderRingAnimator.animateToNaturalState();
+ mOpenAlarm.cancelAlarm();
}
private void onDrop(final ShortcutInfo item, DragView animateView, Rect finalRect,
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index a55fce0..827718b 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -16,6 +16,8 @@
package com.android.launcher3;
+import com.android.launcher3.backup.BackupProtos;
+
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -25,10 +27,20 @@
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.graphics.Canvas;
+import android.graphics.Paint;
import android.graphics.drawable.Drawable;
+import android.util.Log;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
@@ -40,6 +52,9 @@
private static final String TAG = "Launcher.IconCache";
private static final int INITIAL_ICON_CACHE_CAPACITY = 50;
+ private static final String RESOURCE_FILE_PREFIX = "icon_";
+
+ private static final boolean DEBUG = true;
private static class CacheEntry {
public Bitmap icon;
@@ -115,6 +130,7 @@
return getFullResIcon(resources, iconId);
}
}
+
return getFullResDefaultActivityIcon();
}
@@ -140,6 +156,21 @@
}
/**
+ * Remove any records for the supplied package name.
+ */
+ public void remove(String packageName) {
+ HashSet<ComponentName> forDeletion = new HashSet<ComponentName>();
+ for (ComponentName componentName: mCache.keySet()) {
+ if (componentName.getPackageName().equals(packageName)) {
+ forDeletion.add(componentName);
+ }
+ }
+ for (ComponentName condemned: forDeletion) {
+ remove(condemned);
+ }
+ }
+
+ /**
* Empty out the cache.
*/
public void flush() {
@@ -177,15 +208,22 @@
}
public Bitmap getIcon(Intent intent) {
+ return getIcon(intent, null);
+ }
+
+ public Bitmap getIcon(Intent intent, String title) {
synchronized (mCache) {
final ResolveInfo resolveInfo = mPackageManager.resolveActivity(intent, 0);
ComponentName component = intent.getComponent();
- if (resolveInfo == null || component == null) {
+ if (component == null) {
return mDefaultIcon;
}
CacheEntry entry = cacheLocked(component, resolveInfo, null);
+ if (title != null) {
+ entry.title = title;
+ }
return entry.icon;
}
}
@@ -214,21 +252,35 @@
mCache.put(componentName, entry);
- ComponentName key = LauncherModel.getComponentNameFromResolveInfo(info);
- if (labelCache != null && labelCache.containsKey(key)) {
- entry.title = labelCache.get(key).toString();
+ if (info != null) {
+ ComponentName key = LauncherModel.getComponentNameFromResolveInfo(info);
+ if (labelCache != null && labelCache.containsKey(key)) {
+ entry.title = labelCache.get(key).toString();
+ } else {
+ entry.title = info.loadLabel(mPackageManager).toString();
+ if (labelCache != null) {
+ labelCache.put(key, entry.title);
+ }
+ }
+ if (entry.title == null) {
+ entry.title = info.activityInfo.name;
+ }
+
+ entry.icon = Utilities.createIconBitmap(
+ getFullResIcon(info), mContext);
} else {
- entry.title = info.loadLabel(mPackageManager).toString();
- if (labelCache != null) {
- labelCache.put(key, entry.title);
+ entry.title = "";
+ Bitmap preloaded = getPreloadedIcon(componentName);
+ if (preloaded != null) {
+ if (DEBUG) Log.d(TAG, "using preloaded icon for " +
+ componentName.toShortString());
+ entry.icon = preloaded;
+ } else {
+ if (DEBUG) Log.d(TAG, "using default icon for " +
+ componentName.toShortString());
+ entry.icon = mDefaultIcon;
}
}
- if (entry.title == null) {
- entry.title = info.activityInfo.name;
- }
-
- entry.icon = Utilities.createIconBitmap(
- getFullResIcon(info), mContext);
}
return entry;
}
@@ -243,4 +295,137 @@
return set;
}
}
+
+ /**
+ * Pre-load an icon into the persistent cache.
+ *
+ * <P>Queries for a component that does not exist in the package manager
+ * will be answered by the persistent cache.
+ *
+ * @param context application context
+ * @param componentName the icon should be returned for this component
+ * @param icon the icon to be persisted
+ * @param dpi the native density of the icon
+ */
+ public static void preloadIcon(Context context, ComponentName componentName, Bitmap icon,
+ int dpi) {
+ // TODO rescale to the correct native DPI
+ try {
+ PackageManager packageManager = context.getPackageManager();
+ packageManager.getActivityIcon(componentName);
+ // component is present on the system already, do nothing
+ return;
+ } catch (PackageManager.NameNotFoundException e) {
+ // pass
+ }
+
+ final String key = componentName.flattenToString();
+ FileOutputStream resourceFile = null;
+ try {
+ resourceFile = context.openFileOutput(getResourceFilename(componentName),
+ Context.MODE_PRIVATE);
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ if (icon.compress(android.graphics.Bitmap.CompressFormat.PNG, 75, os)) {
+ byte[] buffer = os.toByteArray();
+ resourceFile.write(buffer, 0, buffer.length);
+ } else {
+ Log.w(TAG, "failed to encode cache for " + key);
+ return;
+ }
+ } catch (FileNotFoundException e) {
+ Log.w(TAG, "failed to pre-load cache for " + key, e);
+ } catch (IOException e) {
+ Log.w(TAG, "failed to pre-load cache for " + key, e);
+ } finally {
+ if (resourceFile != null) {
+ try {
+ resourceFile.close();
+ } catch (IOException e) {
+ Log.d(TAG, "failed to save restored icon for: " + key, e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Read a pre-loaded icon from the persistent icon cache.
+ *
+ * @param componentName the component that should own the icon
+ * @returns a bitmap if one is cached, or null.
+ */
+ private Bitmap getPreloadedIcon(ComponentName componentName) {
+ final String key = componentName.flattenToShortString();
+
+ if (DEBUG) Log.v(TAG, "looking for pre-load icon for " + key);
+ Bitmap icon = null;
+ FileInputStream resourceFile = null;
+ try {
+ resourceFile = mContext.openFileInput(getResourceFilename(componentName));
+ byte[] buffer = new byte[1024];
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ int bytesRead = 0;
+ while(bytesRead >= 0) {
+ bytes.write(buffer, 0, bytesRead);
+ bytesRead = resourceFile.read(buffer, 0, buffer.length);
+ }
+ if (DEBUG) Log.d(TAG, "read " + bytes.size());
+ icon = BitmapFactory.decodeByteArray(bytes.toByteArray(), 0, bytes.size());
+ if (icon == null) {
+ Log.w(TAG, "failed to decode pre-load icon for " + key);
+ }
+ } catch (FileNotFoundException e) {
+ if (DEBUG) Log.d(TAG, "there is no restored icon for: " + key, e);
+ } catch (IOException e) {
+ Log.w(TAG, "failed to read pre-load icon for: " + key, e);
+ } finally {
+ if(resourceFile != null) {
+ try {
+ resourceFile.close();
+ } catch (IOException e) {
+ Log.d(TAG, "failed to manage pre-load icon file: " + key, e);
+ }
+ }
+ }
+
+ if (icon != null) {
+ // TODO: handle alpha mask in the view layer
+ Bitmap b = Bitmap.createBitmap(Math.max(icon.getWidth(), 1),
+ Math.max(icon.getHeight(), 1),
+ Bitmap.Config.ARGB_8888);
+ Canvas c = new Canvas(b);
+ Paint paint = new Paint();
+ paint.setAlpha(127);
+ c.drawBitmap(icon, 0, 0, paint);
+ c.setBitmap(null);
+ icon.recycle();
+ icon = b;
+ }
+
+ return icon;
+ }
+
+ /**
+ * Remove a pre-loaded icon from the persistent icon cache.
+ *
+ * @param componentName the component that should own the icon
+ * @returns true on success
+ */
+ public boolean deletePreloadedIcon(ComponentName componentName) {
+ if (componentName == null) {
+ return false;
+ }
+ if (mCache.remove(componentName) != null) {
+ if (DEBUG) Log.d(TAG, "removed pre-loaded icon from the in-memory cache");
+ }
+ boolean success = mContext.deleteFile(getResourceFilename(componentName));
+ if (DEBUG && success) Log.d(TAG, "removed pre-loaded icon from persistent cache");
+
+ return success;
+ }
+
+ private static String getResourceFilename(ComponentName component) {
+ String resourceName = component.flattenToShortString();
+ String filename = resourceName.replace(File.separatorChar, '_');
+ return RESOURCE_FILE_PREFIX + filename;
+ }
}
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 7ab4e04..28cef13 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -304,7 +304,7 @@
// Add the new apps to the model and bind them
if (!addShortcuts.isEmpty()) {
LauncherAppState app = LauncherAppState.getInstance();
- app.getModel().addAndBindAddedApps(context, addShortcuts, new ArrayList<AppInfo>());
+ app.getModel().addAndBindAddedWorkspaceApps(context, addShortcuts);
}
}
}
diff --git a/src/com/android/launcher3/ItemInfo.java b/src/com/android/launcher3/ItemInfo.java
index 36ba6c1..3dc92c9 100644
--- a/src/com/android/launcher3/ItemInfo.java
+++ b/src/com/android/launcher3/ItemInfo.java
@@ -122,6 +122,10 @@
throw new RuntimeException("Unexpected Intent");
}
+ protected Intent getRestoredIntent() {
+ throw new RuntimeException("Unexpected Intent");
+ }
+
/**
* Write the fields of this item to the DB
*
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 50bbe51..c22a6bf 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -210,6 +210,7 @@
static final int APPWIDGET_HOST_ID = 1024;
public static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 300;
+ public static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT_FOLDER_CLOSE = 400;
private static final int ON_ACTIVITY_RESULT_ANIMATION_DELAY = 500;
private static final Object sLock = new Object();
@@ -505,11 +506,11 @@
}
/**
- * To be overridden by subclasses to create the custom content and call
+ * To be overridden by subclasses to populate the custom content container and call
* {@link #addToCustomContentPage}. This will only be invoked if
* {@link #hasCustomContentToLeft()} is {@code true}.
*/
- protected void addCustomContentToLeft() {
+ protected void populateCustomContentContainer() {
}
/**
@@ -539,8 +540,8 @@
if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) {
// Create the custom content page and call the subclass to populate it.
- mWorkspace.createCustomContentPage();
- addCustomContentToLeft();
+ mWorkspace.createCustomContentContainer();
+ populateCustomContentContainer();
} else if (mWorkspace.hasCustomContent() && !hasCustomContentToLeft()) {
mWorkspace.removeCustomContentPage();
}
@@ -1033,12 +1034,6 @@
}
}
- protected void onFinishBindingItems() {
- if (mWorkspace != null && hasCustomContentToLeft() && mWorkspace.hasCustomContent()) {
- addCustomContentToLeft();
- }
- }
-
QSBScroller mQsbScroller = new QSBScroller() {
int scrollY = 0;
@@ -2050,18 +2045,24 @@
}
}
+ public boolean isOnCustomContent() {
+ return mWorkspace.isOnOrMovingToCustomContent();
+ }
+
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
- // Close any open folders
- closeFolder();
- // Stop resizing any widgets
- mWorkspace.exitWidgetResizeMode();
- if (!mWorkspace.isInOverviewMode()) {
- // Show the overview mode
- showOverviewMode(true);
- } else {
- showWorkspace(true);
+ if (!isOnCustomContent()) {
+ // Close any open folders
+ closeFolder();
+ // Stop resizing any widgets
+ mWorkspace.exitWidgetResizeMode();
+ if (!mWorkspace.isInOverviewMode()) {
+ // Show the overview mode
+ showOverviewMode(true);
+ } else {
+ showWorkspace(true);
+ }
}
return false;
}
@@ -2077,6 +2078,10 @@
return mWorkspaceLoading || mWaitingForResult;
}
+ public boolean isWorkspaceLoading() {
+ return mWorkspaceLoading;
+ }
+
private void resetAddInfo() {
mPendingAddInfo.container = ItemInfo.NO_ID;
mPendingAddInfo.screenId = -1;
@@ -2373,7 +2378,7 @@
final String shortcutClass = intent.getComponent().getClassName();
if (shortcutClass.equals(WidgetAdder.class.getName())) {
- showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true);
+ onClickAddWidgetButton();
return;
} else if (shortcutClass.equals(MemoryDumpActivity.class.getName())) {
MemoryDumpActivity.startDump(this);
@@ -2466,6 +2471,14 @@
showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false);
}
+ /**
+ * Event handler for the (Add) Widgets button that appears after a long press
+ * on the home screen.
+ */
+ protected void onClickAddWidgetButton() {
+ showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true);
+ }
+
public void onTouchDownAllAppsButton(View v) {
// Provide the same haptic feedback that the system offers for virtual keys.
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
@@ -2522,7 +2535,8 @@
String packageName = componentName.getPackageName();
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.fromParts("package", packageName, null));
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK |
+ Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivitySafely(null, intent, "startApplicationDetailsActivity");
}
@@ -3761,6 +3775,8 @@
* Implementation of the method from LauncherModel.Callbacks.
*/
public void startBinding() {
+ mWorkspaceLoading = true;
+
// If we're starting binding all over again, clear any bind calls we'd postponed in
// the past (see waitUntilResume) -- we don't need them since we're starting binding
// from scratch again
@@ -3787,9 +3803,9 @@
// Create the custom content page (this call updates mDefaultScreen which calls
// setCurrentPage() so ensure that all pages are added before calling this).
- // The actual content of the custom page will be added during onFinishBindingItems().
- if (!mWorkspace.hasCustomContent() && hasCustomContentToLeft()) {
- mWorkspace.createCustomContentPage();
+ if (hasCustomContentToLeft()) {
+ mWorkspace.createCustomContentContainer();
+ populateCustomContentContainer();
}
}
@@ -3843,15 +3859,17 @@
}
// Add the new screens
- bindAddScreens(newScreens);
+ if (newScreens != null) {
+ bindAddScreens(newScreens);
+ }
// We add the items without animation on non-visible pages, and with
// animations on the new page (which we will try and snap to).
- if (!addNotAnimated.isEmpty()) {
+ if (addNotAnimated != null && !addNotAnimated.isEmpty()) {
bindItems(addNotAnimated, 0,
addNotAnimated.size(), false);
}
- if (!addAnimated.isEmpty()) {
+ if (addAnimated != null && !addAnimated.isEmpty()) {
bindItems(addAnimated, 0,
addAnimated.size(), true);
}
@@ -4071,13 +4089,6 @@
mWorkspace.getUniqueComponents(true, null);
mIntentsOnWorkspaceFromUpgradePath = mWorkspace.getUniqueComponents(true, null);
}
-
- mWorkspace.post(new Runnable() {
- @Override
- public void run() {
- onFinishBindingItems();
- }
- });
}
public boolean isAllAppsButtonRank(int rank) {
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index 57cdfb9..62e6f31 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -136,6 +136,8 @@
private static final int SCREEN_RANK_INDEX = 2;
+ private static IconCache mIconCache;
+
private final Context mContext;
private final boolean mRestoreEnabled;
@@ -184,16 +186,20 @@
Log.v(TAG, "lastBackupTime = " + lastBackupTime);
ArrayList<Key> keys = new ArrayList<Key>();
- try {
- backupFavorites(in, data, out, keys);
- backupScreens(in, data, out, keys);
- backupIcons(in, data, out, keys);
- backupWidgets(in, data, out, keys);
- } catch (IOException e) {
- Log.e(TAG, "launcher backup has failed", e);
+ if (launcherIsReady()) {
+ try {
+ backupFavorites(in, data, out, keys);
+ backupScreens(in, data, out, keys);
+ backupIcons(in, data, out, keys);
+ backupWidgets(in, data, out, keys);
+ } catch (IOException e) {
+ Log.e(TAG, "launcher backup has failed", e);
+ }
+ out.key = keys.toArray(new BackupProtos.Key[keys.size()]);
+ } else {
+ out = in;
}
- out.key = keys.toArray(BackupProtos.Key.EMPTY_ARRAY);
writeJournal(newState, out);
Log.v(TAG, "onBackup: wrote " + out.bytes + "b in " + out.rows + " rows.");
}
@@ -266,7 +272,7 @@
// will catch any changes the restore process might have made
Journal out = new Journal();
out.t = 0;
- out.key = mKeys.toArray(BackupProtos.Key.EMPTY_ARRAY);
+ out.key = mKeys.toArray(new BackupProtos.Key[mKeys.size()]);
writeJournal(newState, out);
Log.v(TAG, "onRestore: read " + mKeys.size() + " rows");
mKeys.clear();
@@ -441,14 +447,12 @@
private void backupIcons(Journal in, BackupDataOutput data, Journal out,
ArrayList<Key> keys) throws IOException {
// persist icons that haven't been persisted yet
- final LauncherAppState appState = LauncherAppState.getInstanceNoCreate();
- if (appState == null) {
+ if (!initializeIconCache()) {
dataChanged(); // try again later
if (DEBUG) Log.d(TAG, "Launcher is not initialized, delaying icon backup");
return;
}
final ContentResolver cr = mContext.getContentResolver();
- final IconCache iconCache = appState.getIconCache();
final int dpi = mContext.getResources().getDisplayMetrics().densityDpi;
// read the old ID set
@@ -487,9 +491,9 @@
if (DEBUG) Log.d(TAG, "I can count this high: " + out.rows);
if ((out.rows - startRows) < MAX_ICONS_PER_PASS) {
if (VERBOSE) Log.v(TAG, "saving icon " + backupKey);
- Bitmap icon = iconCache.getIcon(intent);
+ Bitmap icon = mIconCache.getIcon(intent);
keys.add(key);
- if (icon != null && !iconCache.isDefaultIcon(icon)) {
+ if (icon != null && !mIconCache.isDefaultIcon(icon)) {
byte[] blob = packIcon(dpi, icon);
writeRowToBackup(key, blob, out, data);
}
@@ -530,25 +534,33 @@
if (VERBOSE) Log.v(TAG, "unpacking icon " + key.id);
if (DEBUG) Log.d(TAG, "read (" + buffer.length + "): " +
Base64.encodeToString(buffer, 0, dataSize, Base64.NO_WRAP));
+
try {
Resource res = unpackIcon(buffer, 0, dataSize);
- if (DEBUG) Log.d(TAG, "unpacked " + res.dpi + " dpi icon");
- if (DEBUG_PAYLOAD) Log.d(TAG, "read " +
- Base64.encodeToString(res.data, 0, res.data.length,
- Base64.NO_WRAP));
+ if (DEBUG) {
+ Log.d(TAG, "unpacked " + res.dpi + " dpi icon");
+ }
+ if (DEBUG_PAYLOAD) {
+ Log.d(TAG, "read " +
+ Base64.encodeToString(res.data, 0, res.data.length,
+ Base64.NO_WRAP));
+ }
Bitmap icon = BitmapFactory.decodeByteArray(res.data, 0, res.data.length);
if (icon == null) {
Log.w(TAG, "failed to unpack icon for " + key.name);
}
if (!mRestoreEnabled) {
- if (VERBOSE) Log.v(TAG, "restore not enabled: skipping database mutation");
+ if (VERBOSE) {
+ Log.v(TAG, "restore not enabled: skipping database mutation");
+ }
return;
} else {
- // future site of icon cache mutation
+ IconCache.preloadIcon(mContext, ComponentName.unflattenFromString(key.name),
+ icon, res.dpi);
}
- } catch (InvalidProtocolBufferNanoException e) {
- Log.e(TAG, "failed to decode icon", e);
+ } catch (IOException e) {
+ Log.d(TAG, "failed to save restored icon for: " + key.name, e);
}
}
@@ -566,15 +578,13 @@
ArrayList<Key> keys) throws IOException {
// persist static widget info that hasn't been persisted yet
final LauncherAppState appState = LauncherAppState.getInstanceNoCreate();
- if (appState == null) {
- dataChanged(); // try again later
- if (DEBUG) Log.d(TAG, "Launcher is not initialized, delaying widget backup");
+ if (appState == null || !initializeIconCache()) {
+ Log.w(TAG, "Failed to get icon cache during restore");
return;
}
final ContentResolver cr = mContext.getContentResolver();
final WidgetPreviewLoader previewLoader = new WidgetPreviewLoader(mContext);
final PagedViewCellLayout widgetSpacingLayout = new PagedViewCellLayout(mContext);
- final IconCache iconCache = appState.getIconCache();
final int dpi = mContext.getResources().getDisplayMetrics().densityDpi;
final DeviceProfile profile = appState.getDynamicGrid().getDeviceProfile();
if (DEBUG) Log.d(TAG, "cellWidthPx: " + profile.cellWidthPx);
@@ -617,7 +627,7 @@
if (VERBOSE) Log.v(TAG, "saving widget " + backupKey);
previewLoader.setPreviewSize(spanX * profile.cellWidthPx,
spanY * profile.cellHeightPx, widgetSpacingLayout);
- byte[] blob = packWidget(dpi, previewLoader, iconCache, provider);
+ byte[] blob = packWidget(dpi, previewLoader, mIconCache, provider);
keys.add(key);
writeRowToBackup(key, blob, out, data);
@@ -842,6 +852,10 @@
}
values.put(Favorites.APPWIDGET_ID, favorite.appWidgetId);
}
+
+ // Let LauncherModel know we've been here.
+ values.put(LauncherSettings.Favorites.RESTORED, 1);
+
return values;
}
@@ -878,7 +892,7 @@
}
/** Deserialize an icon resource from persistence, after verifying checksum wrapper. */
- private Resource unpackIcon(byte[] buffer, int offset, int dataSize)
+ private static Resource unpackIcon(byte[] buffer, int offset, int dataSize)
throws InvalidProtocolBufferNanoException {
Resource res = new Resource();
MessageNano.mergeFrom(res, readCheckedBytes(buffer, offset, dataSize));
@@ -1076,7 +1090,7 @@
}
/** Unwrap a proto message from a CheckedMessage, verifying the checksum. */
- private byte[] readCheckedBytes(byte[] buffer, int offset, int dataSize)
+ private static byte[] readCheckedBytes(byte[] buffer, int offset, int dataSize)
throws InvalidProtocolBufferNanoException {
CheckedMessage wrapper = new CheckedMessage();
MessageNano.mergeFrom(wrapper, buffer, offset, dataSize);
@@ -1100,6 +1114,43 @@
return mWidgetMap.get(component);
}
+
+ private boolean initializeIconCache() {
+ if (mIconCache != null) {
+ return true;
+ }
+
+ final LauncherAppState appState = LauncherAppState.getInstanceNoCreate();
+ if (appState == null) {
+ Throwable stackTrace = new Throwable();
+ stackTrace.fillInStackTrace();
+ Log.w(TAG, "Failed to get app state during backup/restore", stackTrace);
+ return false;
+ }
+ mIconCache = appState.getIconCache();
+ return mIconCache != null;
+ }
+
+
+ // check if the launcher is in a state to support backup
+ private boolean launcherIsReady() {
+ ContentResolver cr = mContext.getContentResolver();
+ Cursor cursor = cr.query(Favorites.CONTENT_URI, FAVORITE_PROJECTION, null, null, null);
+ if (cursor == null) {
+ // launcher data has been wiped, do nothing
+ return false;
+ }
+ cursor.close();
+
+ if (!initializeIconCache()) {
+ // launcher services are unavailable, try again later
+ dataChanged();
+ return false;
+ }
+
+ return true;
+ }
+
private class KeyParsingException extends Throwable {
private KeyParsingException(Throwable cause) {
super(cause);
diff --git a/src/com/android/launcher3/LauncherClings.java b/src/com/android/launcher3/LauncherClings.java
index 00711fe..952edfd 100644
--- a/src/com/android/launcher3/LauncherClings.java
+++ b/src/com/android/launcher3/LauncherClings.java
@@ -41,7 +41,6 @@
private static final String FOLDER_CLING_DISMISSED_KEY = "cling_gel.folder.dismissed";
private static final boolean DISABLE_CLINGS = false;
- private static final boolean DISABLE_CUSTOM_CLINGS = true;
private static final int SHOW_CLING_DURATION = 250;
private static final int DISMISS_CLING_DURATION = 200;
@@ -196,8 +195,7 @@
SharedPreferences sharedPrefs = mLauncher.getSharedPrefs();
return areClingsEnabled() &&
!sharedPrefs.getBoolean(FIRST_RUN_CLING_DISMISSED_KEY, false) &&
- !sharedPrefs.getBoolean(MIGRATION_CLING_DISMISSED_KEY, false) &&
- LauncherAppState.getLauncherProvider().wasNewDbCreated();
+ !sharedPrefs.getBoolean(MIGRATION_CLING_DISMISSED_KEY, false);
}
public void removeFirstRunAndMigrationClings() {
@@ -213,24 +211,6 @@
*/
public void showFirstRunCling() {
if (!skipCustomClingIfNoAccounts()) {
- SharedPreferences sharedPrefs = mLauncher.getSharedPrefs();
- // If we're not using the default workspace layout, replace workspace cling
- // with a custom workspace cling (usually specified in an overlay)
- // For now, only do this on tablets
- if (!DISABLE_CUSTOM_CLINGS) {
- if (sharedPrefs.getInt(LauncherProvider.DEFAULT_WORKSPACE_RESOURCE_ID, 0) != 0 &&
- mLauncher.getResources().getBoolean(R.bool.config_useCustomClings)) {
- // Use a custom cling
- View cling = mLauncher.findViewById(R.id.workspace_cling);
- ViewGroup clingParent = (ViewGroup) cling.getParent();
- int clingIndex = clingParent.indexOfChild(cling);
- clingParent.removeViewAt(clingIndex);
- View customCling = mInflater.inflate(R.layout.custom_workspace_cling,
- clingParent, false);
- clingParent.addView(customCling, clingIndex);
- customCling.setId(R.id.workspace_cling);
- }
- }
Cling cling = (Cling) mLauncher.findViewById(R.id.first_run_cling);
if (cling != null) {
String sbHintStr = mLauncher.getFirstRunClingSearchBarHint();
@@ -292,6 +272,7 @@
removeCling(R.id.workspace_cling);
}
}
+
public Cling showFoldersCling() {
SharedPreferences sharedPrefs = mLauncher.getSharedPrefs();
// Enable the clings only if they have not been dismissed before
@@ -314,6 +295,20 @@
}
}
+ public static void synchonouslyMarkFirstRunClingDismissed(Context ctx) {
+ SharedPreferences prefs = ctx.getSharedPreferences(
+ LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE);
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putBoolean(LauncherClings.FIRST_RUN_CLING_DISMISSED_KEY, true);
+ editor.commit();
+ }
+
+ public void markFolderClingDismissed() {
+ SharedPreferences.Editor editor = mLauncher.getSharedPrefs().edit();
+ editor.putBoolean(LauncherClings.FOLDER_CLING_DISMISSED_KEY, true);
+ editor.apply();
+ }
+
/** Removes the cling outright from the DragLayer */
private void removeCling(int id) {
final View cling = mLauncher.findViewById(id);
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 2102a1f..007fd7a 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -292,17 +292,58 @@
return null;
}
- public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> workspaceApps,
- final ArrayList<AppInfo> allAppsApps) {
- Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
- addAndBindAddedApps(context, workspaceApps, cb, allAppsApps);
+ public void addAppsToAllApps(final Context ctx, final ArrayList<AppInfo> allAppsApps) {
+ final Callbacks callbacks = mCallbacks != null ? mCallbacks.get() : null;
+
+ if (allAppsApps == null) {
+ throw new RuntimeException("allAppsApps must not be null");
+ }
+ if (allAppsApps.isEmpty()) {
+ return;
+ }
+
+ final ArrayList<AppInfo> restoredAppsFinal = new ArrayList<AppInfo>();
+ Iterator<AppInfo> iter = allAppsApps.iterator();
+ while (iter.hasNext()) {
+ ItemInfo a = iter.next();
+ if (LauncherModel.appWasRestored(ctx, a.getIntent())) {
+ restoredAppsFinal.add((AppInfo) a);
+ }
+ }
+
+ // Process the newly added applications and add them to the database first
+ Runnable r = new Runnable() {
+ public void run() {
+ runOnMainThread(new Runnable() {
+ public void run() {
+ Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
+ if (callbacks == cb && cb != null) {
+ if (!restoredAppsFinal.isEmpty()) {
+ for (AppInfo info : restoredAppsFinal) {
+ final Intent intent = info.getIntent();
+ if (intent != null) {
+ mIconCache.deletePreloadedIcon(intent.getComponent());
+ }
+ }
+ callbacks.bindAppsUpdated(restoredAppsFinal);
+ }
+ callbacks.bindAppsAdded(null, null, null, allAppsApps);
+ }
+ }
+ });
+ }
+ };
+ runOnWorkerThread(r);
}
- public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> workspaceApps,
- final Callbacks callbacks, final ArrayList<AppInfo> allAppsApps) {
- if (workspaceApps == null || allAppsApps == null) {
+
+ public void addAndBindAddedWorkspaceApps(final Context context,
+ final ArrayList<ItemInfo> workspaceApps) {
+ final Callbacks callbacks = mCallbacks != null ? mCallbacks.get() : null;
+
+ if (workspaceApps == null) {
throw new RuntimeException("workspaceApps and allAppsApps must not be null");
}
- if (workspaceApps.isEmpty() && allAppsApps.isEmpty()) {
+ if (workspaceApps.isEmpty()) {
return;
}
// Process the newly added applications and add them to the database first
@@ -310,6 +351,7 @@
public void run() {
final ArrayList<ItemInfo> addedShortcutsFinal = new ArrayList<ItemInfo>();
final ArrayList<Long> addedWorkspaceScreensFinal = new ArrayList<Long>();
+ final ArrayList<AppInfo> restoredAppsFinal = new ArrayList<AppInfo>();
// Get the list of workspace screens. We need to append to this list and
// can not use sBgWorkspaceScreens because loadWorkspace() may not have been
@@ -330,6 +372,11 @@
// Short-circuit this logic if the icon exists somewhere on the workspace
if (LauncherModel.shortcutExists(context, name, launchIntent)) {
+ // Only InstallShortcutReceiver sends us shortcutInfos, ignore them
+ if (a instanceof AppInfo &&
+ LauncherModel.appWasRestored(context, launchIntent)) {
+ restoredAppsFinal.add((AppInfo) a);
+ }
continue;
}
@@ -385,7 +432,7 @@
// Update the workspace screens
updateWorkspaceScreenOrder(context, workspaceScreens);
- if (!addedShortcutsFinal.isEmpty() || !allAppsApps.isEmpty()) {
+ if (!addedShortcutsFinal.isEmpty()) {
runOnMainThread(new Runnable() {
public void run() {
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
@@ -404,7 +451,10 @@
}
}
callbacks.bindAppsAdded(addedWorkspaceScreensFinal,
- addNotAnimated, addAnimated, allAppsApps);
+ addNotAnimated, addAnimated, null);
+ if (!restoredAppsFinal.isEmpty()) {
+ callbacks.bindAppsUpdated(restoredAppsFinal);
+ }
}
}
});
@@ -770,6 +820,30 @@
}
/**
+ * Returns true if the shortcuts already exists in the database.
+ * we identify a shortcut by the component name of the intent.
+ */
+ static boolean appWasRestored(Context context, Intent intent) {
+ final ContentResolver cr = context.getContentResolver();
+ final ComponentName component = intent.getComponent();
+ if (component == null) {
+ return false;
+ }
+ String componentName = component.flattenToString();
+ final String where = "intent glob \"*component=" + componentName + "*\" and restored = 1";
+ Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI,
+ new String[]{"intent", "restored"}, where, null, null);
+ boolean result = false;
+ try {
+ result = c.moveToFirst();
+ } finally {
+ c.close();
+ }
+ Log.d(TAG, "shortcutWasRestored is " + result + " for " + componentName);
+ return result;
+ }
+
+ /**
* Returns an ItemInfo array containing all the items in the LauncherModel.
* The ItemInfo.id is not set through this function.
*/
@@ -995,18 +1069,23 @@
Runnable r = new Runnable() {
@Override
public void run() {
+ ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
// Clear the table
- cr.delete(uri, null, null);
+ ops.add(ContentProviderOperation.newDelete(uri).build());
int count = screensCopy.size();
- ContentValues[] values = new ContentValues[count];
for (int i = 0; i < count; i++) {
ContentValues v = new ContentValues();
long screenId = screensCopy.get(i);
v.put(LauncherSettings.WorkspaceScreens._ID, screenId);
v.put(LauncherSettings.WorkspaceScreens.SCREEN_RANK, i);
- values[i] = v;
+ ops.add(ContentProviderOperation.newInsert(uri).withValues(v).build());
}
- cr.bulkInsert(uri, values);
+
+ try {
+ cr.applyBatch(LauncherProvider.AUTHORITY, ops);
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
synchronized (sBgLock) {
sBgWorkspaceScreens.clear();
@@ -1561,8 +1640,7 @@
}
}
if (!added.isEmpty()) {
- Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
- addAndBindAddedApps(context, added, cb, new ArrayList<AppInfo>());
+ addAndBindAddedWorkspaceApps(context, added);
}
}
@@ -1714,6 +1792,7 @@
clearSBgDataStructures();
final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
+ final ArrayList<Long> restoredRows = new ArrayList<Long>();
final Uri contentUri = LauncherSettings.Favorites.CONTENT_URI;
if (DEBUG_LOADERS) Log.d(TAG, "loading model from " + contentUri);
final Cursor c = contentResolver.query(contentUri, null, null, null, null);
@@ -1754,6 +1833,8 @@
(LauncherSettings.Favorites.SPANX);
final int spanYIndex = c.getColumnIndexOrThrow(
LauncherSettings.Favorites.SPANY);
+ final int restoredIndex = c.getColumnIndexOrThrow(
+ LauncherSettings.Favorites.RESTORED);
//final int uriIndex = c.getColumnIndexOrThrow(LauncherSettings.Favorites.URI);
//final int displayModeIndex = c.getColumnIndexOrThrow(
// LauncherSettings.Favorites.DISPLAY_MODE);
@@ -1769,6 +1850,7 @@
AtomicBoolean deleteOnInvalidPlacement = new AtomicBoolean(false);
try {
int itemType = c.getInt(itemTypeIndex);
+ boolean restored = 0 != c.getInt(restoredIndex);
switch (itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
@@ -1779,24 +1861,44 @@
intent = Intent.parseUri(intentDescription, 0);
ComponentName cn = intent.getComponent();
if (cn != null && !isValidPackageComponent(manager, cn)) {
- if (!mAppsCanBeOnRemoveableStorage) {
- // Log the invalid package, and remove it from the db
- Launcher.addDumpLog(TAG, "Invalid package removed: " + cn, true);
- itemsToRemove.add(id);
+ if (restored) {
+ // might be installed later
+ Launcher.addDumpLog(TAG,
+ "package not yet restored: " + cn, true);
} else {
- // If apps can be on external storage, then we just
- // leave them for the user to remove (maybe add
- // visual treatment to it)
- Launcher.addDumpLog(TAG, "Invalid package found: " + cn, true);
+ if (!mAppsCanBeOnRemoveableStorage) {
+ // Log the invalid package, and remove it
+ Launcher.addDumpLog(TAG,
+ "Invalid package removed: " + cn, true);
+ itemsToRemove.add(id);
+ } else {
+ // If apps can be on external storage, then we just
+ // leave them for the user to remove (maybe add
+ // visual treatment to it)
+ Launcher.addDumpLog(TAG,
+ "Invalid package found: " + cn, true);
+ }
+ continue;
}
- continue;
+ } else if (restored) {
+ // no special handling necessary for this restored item
+ restoredRows.add(id);
+ restored = false;
}
} catch (URISyntaxException e) {
- Launcher.addDumpLog(TAG, "Invalid uri: " + intentDescription, true);
+ Launcher.addDumpLog(TAG,
+ "Invalid uri: " + intentDescription, true);
continue;
}
- if (itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) {
+ if (restored) {
+ Launcher.addDumpLog(TAG,
+ "constructing info for partially restored package",
+ true);
+ info = getRestoredItemInfo(c, titleIndex, intent);
+ intent = getRestoredItemIntent(c, context, intent);
+ } else if (itemType ==
+ LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) {
info = getShortcutInfo(manager, intent, context, c, iconIndex,
titleIndex, mLabelCache);
} else {
@@ -1890,6 +1992,11 @@
break;
}
+ if (restored) {
+ // no special handling required for restored folders
+ restoredRows.add(id);
+ }
+
sBgItemsIdMap.put(folderInfo.id, folderInfo);
sBgFolders.put(folderInfo.id, folderInfo);
break;
@@ -1990,6 +2097,25 @@
}
}
+ if (restoredRows.size() > 0) {
+ ContentProviderClient updater = contentResolver.acquireContentProviderClient(
+ LauncherSettings.Favorites.CONTENT_URI);
+ // Update restored items that no longer require special handling
+ try {
+ StringBuilder selectionBuilder = new StringBuilder();
+ selectionBuilder.append(LauncherSettings.Favorites._ID);
+ selectionBuilder.append(" IN (");
+ selectionBuilder.append(TextUtils.join(", ", restoredRows));
+ selectionBuilder.append(")");
+ ContentValues values = new ContentValues();
+ values.put(LauncherSettings.Favorites.RESTORED, 0);
+ updater.update(LauncherSettings.Favorites.CONTENT_URI,
+ values, selectionBuilder.toString(), null);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Could not update restored rows");
+ }
+ }
+
if (loadedOldDb) {
long maxScreenId = 0;
// If we're importing we use the old screen order.
@@ -2547,6 +2673,7 @@
case OP_ADD:
for (int i=0; i<N; i++) {
if (DEBUG_LOADERS) Log.d(TAG, "mAllAppsList.addPackage " + packages[i]);
+ mIconCache.remove(packages[i]);
mBgAllAppsList.addPackage(context, packages[i]);
}
break;
@@ -2594,14 +2721,14 @@
if (added != null) {
// Ensure that we add all the workspace applications to the db
- Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
- if (!LauncherAppState.isDisableAllApps()) {
- addAndBindAddedApps(context, new ArrayList<ItemInfo>(), cb, added);
- } else {
+ if (LauncherAppState.isDisableAllApps()) {
final ArrayList<ItemInfo> addedInfos = new ArrayList<ItemInfo>(added);
- addAndBindAddedApps(context, addedInfos, cb, added);
+ addAndBindAddedWorkspaceApps(context, addedInfos);
+ } else {
+ addAppsToAllApps(context, added);
}
}
+
if (modified != null) {
final ArrayList<AppInfo> modifiedFinal = modified;
@@ -2737,6 +2864,41 @@
}
/**
+ * Make an ShortcutInfo object for a restored application or shortcut item that points
+ * to a package that is not yet installed on the system.
+ */
+ public ShortcutInfo getRestoredItemInfo(Cursor cursor, int titleIndex, Intent intent) {
+ final ShortcutInfo info = new ShortcutInfo();
+ if (cursor != null) {
+ info.title = cursor.getString(titleIndex);
+ } else {
+ info.title = "";
+ }
+ info.setIcon(mIconCache.getIcon(intent, info.title.toString()));
+ info.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
+ info.restoredIntent = intent;
+ return info;
+ }
+
+ /**
+ * Make an Intent object for a restored application or shortcut item that points
+ * to the market page for the item.
+ */
+ private Intent getRestoredItemIntent(Cursor c, Context context, Intent intent) {
+ final boolean debug = false;
+ ComponentName componentName = intent.getComponent();
+ Intent marketIntent = new Intent(Intent.ACTION_VIEW);
+ Uri marketUri = new Uri.Builder()
+ .scheme("market")
+ .authority("details")
+ .appendQueryParameter("id", componentName.getPackageName())
+ .build();
+ if (debug) Log.d(TAG, "manufactured intent uri: " + marketUri.toString());
+ marketIntent.setData(marketUri);
+ return marketIntent;
+ }
+
+ /**
* This is called from the code that adds shortcuts from the intent receiver. This
* doesn't have a Cursor, but
*/
@@ -2897,6 +3059,10 @@
Intent.ACTION_MAIN.equals(intent.getAction()) && name != null) {
return true;
}
+ // placeholder shortcuts get special treatment, let them through too.
+ if (info.getRestoredIntent() != null) {
+ return true;
+ }
}
return false;
}
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index 52bcf98..a080dd8 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -22,11 +22,14 @@
import android.appwidget.AppWidgetProviderInfo;
import android.content.ComponentName;
import android.content.ContentProvider;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderResult;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
+import android.content.OperationApplicationException;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
@@ -47,6 +50,7 @@
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.SparseArray;
import android.util.Xml;
import com.android.launcher3.LauncherSettings.Favorites;
@@ -68,7 +72,7 @@
private static final String DATABASE_NAME = "launcher.db";
- private static final int DATABASE_VERSION = 15;
+ private static final int DATABASE_VERSION = 17;
static final String OLD_AUTHORITY = "com.android.launcher2.settings";
static final String AUTHORITY = ProviderConfig.AUTHORITY;
@@ -194,6 +198,20 @@
}
@Override
+ public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
+ throws OperationApplicationException {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ db.beginTransaction();
+ try {
+ ContentProviderResult[] result = super.applyBatch(operations);
+ db.setTransactionSuccessful();
+ return result;
+ } finally {
+ db.endTransaction();
+ }
+ }
+
+ @Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SqlArguments args = new SqlArguments(uri, selection, selectionArgs);
@@ -409,7 +427,8 @@
"uri TEXT," +
"displayMode INTEGER," +
"appWidgetProvider TEXT," +
- "modified INTEGER NOT NULL DEFAULT 0" +
+ "modified INTEGER NOT NULL DEFAULT 0," +
+ "restored INTEGER NOT NULL DEFAULT 0" +
");");
addWorkspacesTable(db);
@@ -716,7 +735,6 @@
}
}
-
if (version < 15) {
db.beginTransaction();
try {
@@ -735,6 +753,33 @@
}
}
+
+ if (version < 16) {
+ db.beginTransaction();
+ try {
+ // Insert new column for holding restore status
+ db.execSQL("ALTER TABLE favorites " +
+ "ADD COLUMN restored INTEGER NOT NULL DEFAULT 0;");
+ db.setTransactionSuccessful();
+ version = 16;
+ } catch (SQLException ex) {
+ // Old version remains, which means we wipe old data
+ Log.e(TAG, ex.getMessage(), ex);
+ } finally {
+ db.endTransaction();
+ }
+ }
+
+ if (version < 17) {
+ // We use the db version upgrade here to identify users who may not have seen
+ // clings yet (because they weren't available), but for whom the clings are now
+ // available (tablet users). Because one of the possible cling flows (migration)
+ // is very destructive (wipes out workspaces), we want to prevent this from showing
+ // until clear data. We do so by marking that the clings have been shown.
+ LauncherClings.synchonouslyMarkFirstRunClingDismissed(mContext);
+ version = 17;
+ }
+
if (version != DATABASE_VERSION) {
Log.w(TAG, "Destroying all old data.");
db.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITES);
@@ -1534,6 +1579,7 @@
final ArrayList<ContentValues> shortcuts = new ArrayList<ContentValues>();
final ArrayList<ContentValues> folders = new ArrayList<ContentValues>();
+ final SparseArray<ContentValues> hotseat = new SparseArray<ContentValues>();
while (c.moveToNext()) {
final int itemType = c.getInt(itemTypeIndex);
@@ -1549,7 +1595,11 @@
int container = c.getInt(containerIndex);
final String intentStr = c.getString(intentIndex);
Launcher.addDumpLog(TAG, "migrating \""
- + c.getString(titleIndex) + "\": " + intentStr, true);
+ + c.getString(titleIndex) + "\" ("
+ + cellX + "," + cellY + "@"
+ + LauncherSettings.Favorites.containerToString(container)
+ + "/" + screen
+ + "): " + intentStr, true);
if (itemType != Favorites.ITEM_TYPE_FOLDER) {
@@ -1610,11 +1660,8 @@
values.put(LauncherSettings.Favorites.DISPLAY_MODE,
c.getInt(displayModeIndex));
- if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT
- && (screen >= hotseatWidth ||
- screen == grid.hotseatAllAppsRank)) {
- // no room for you in the hotseat? it's off to the desktop with you
- container = Favorites.CONTAINER_DESKTOP;
+ if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
+ hotseat.put(screen, values);
}
if (container != LauncherSettings.Favorites.CONTAINER_DESKTOP) {
@@ -1636,6 +1683,31 @@
}
}
+ // Now that we have all the hotseat icons, let's go through them left-right
+ // and assign valid locations for them in the new hotseat
+ final int N = hotseat.size();
+ for (int idx=0; idx<N; idx++) {
+ int hotseatX = hotseat.keyAt(idx);
+ ContentValues values = hotseat.valueAt(idx);
+
+ if (hotseatX == grid.hotseatAllAppsRank) {
+ // let's drop this in the next available hole in the hotseat
+ while (++hotseatX < hotseatWidth) {
+ if (hotseat.get(hotseatX) == null) {
+ // found a spot! move it here
+ values.put(LauncherSettings.Favorites.SCREEN,
+ hotseatX);
+ break;
+ }
+ }
+ }
+ if (hotseatX >= hotseatWidth) {
+ // no room for you in the hotseat? it's off to the desktop with you
+ values.put(LauncherSettings.Favorites.CONTAINER,
+ Favorites.CONTAINER_DESKTOP);
+ }
+ }
+
final ArrayList<ContentValues> allItems = new ArrayList<ContentValues>();
// Folders first
allItems.addAll(folders);
diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java
index 988e5ef..2a768a2 100644
--- a/src/com/android/launcher3/LauncherSettings.java
+++ b/src/com/android/launcher3/LauncherSettings.java
@@ -171,6 +171,14 @@
static final int CONTAINER_DESKTOP = -100;
static final int CONTAINER_HOTSEAT = -101;
+ static final String containerToString(int container) {
+ switch (container) {
+ case CONTAINER_DESKTOP: return "desktop";
+ case CONTAINER_HOTSEAT: return "hotseat";
+ default: return String.valueOf(container);
+ }
+ }
+
/**
* The screen holding the favorite (if container is CONTAINER_DESKTOP)
* <P>Type: INTEGER</P>
@@ -275,5 +283,11 @@
* @see android.provider.LiveFolders#DISPLAY_MODE_LIST
*/
static final String DISPLAY_MODE = "displayMode";
+
+ /**
+ * Boolean indicating that his item was restored and not yet successfully bound.
+ * <P>Type: INTEGER</P>
+ */
+ static final String RESTORED = "restored";
}
}
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index 660f32c..79d114c 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -64,6 +64,12 @@
long firstInstallTime;
int flags = 0;
+ /**
+ * If this shortcut is a placeholder, then intent will be a market intent for the package, and
+ * this will hold the original intent from the database. Otherwise, null.
+ */
+ Intent restoredIntent;
+
ShortcutInfo() {
itemType = LauncherSettings.BaseLauncherColumns.ITEM_TYPE_SHORTCUT;
}
@@ -72,6 +78,21 @@
return intent;
}
+ protected Intent getRestoredIntent() {
+ return restoredIntent;
+ }
+
+ /**
+ * Overwrite placeholder data with restored data, or do nothing if this is not a placeholder.
+ */
+ public void restore() {
+ if (restoredIntent != null) {
+ intent = restoredIntent;
+ restoredIntent = null;
+ }
+ }
+
+
ShortcutInfo(Intent intent, CharSequence title, Bitmap icon) {
this();
this.intent = intent;
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 359fd86..567abfa 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -209,6 +209,10 @@
private boolean mWorkspaceFadeInAdjacentScreens;
WallpaperOffsetInterpolator mWallpaperOffset;
+ private boolean mWallpaperIsLiveWallpaper;
+ private int mNumPagesForWallpaperParallax;
+ private float mLastSetWallpaperOffsetSteps = 0;
+
private Runnable mDelayedResizeRunnable;
private Runnable mDelayedSnapToPageRunnable;
private Point mDisplaySize = new Point();
@@ -421,7 +425,7 @@
setClipChildren(false);
setClipToPadding(false);
setChildrenDrawnWithCacheEnabled(true);
-
+
setMinScale(mOverviewModeShrinkFactor);
setupLayoutTransition();
@@ -562,7 +566,7 @@
return screenId;
}
- public void createCustomContentPage() {
+ public void createCustomContentContainer() {
CellLayout customScreen = (CellLayout)
mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, null);
customScreen.disableBackground();
@@ -859,6 +863,12 @@
// Log to disk
Launcher.addDumpLog(TAG, "11683562 - stripEmptyScreens()", true);
+ if (mLauncher.isWorkspaceLoading()) {
+ // Don't strip empty screens if the workspace is still loading
+ Launcher.addDumpLog(TAG, " - workspace loading, skip", true);
+ return;
+ }
+
if (isPageMoving()) {
mStripScreensOnPageStopMoving = true;
return;
@@ -1347,7 +1357,14 @@
// Don't use up all the wallpaper parallax until you have at least
// MIN_PARALLAX_PAGE_SPAN pages
int numScrollingPages = getNumScreensExcludingEmptyAndCustom();
- int parallaxPageSpan = Math.max(MIN_PARALLAX_PAGE_SPAN, numScrollingPages - 1);
+ int parallaxPageSpan;
+ if (mWallpaperIsLiveWallpaper) {
+ parallaxPageSpan = numScrollingPages - 1;
+ } else {
+ parallaxPageSpan = Math.max(MIN_PARALLAX_PAGE_SPAN, numScrollingPages - 1);
+ }
+ mNumPagesForWallpaperParallax = parallaxPageSpan;
+
// On RTL devices, push the wallpaper offset to the right if we don't have enough
// pages (ie if numScrollingPages < MIN_PARALLAX_PAGE_SPAN)
int padding = isLayoutRtl() ? parallaxPageSpan - numScrollingPages + 1 : 0;
@@ -1391,7 +1408,11 @@
private void setWallpaperOffsetSteps() {
// Set wallpaper offset steps (1 / (number of screens - 1))
- mWallpaperManager.setWallpaperOffsetSteps(1.0f / (getChildCount() - 1), 1.0f);
+ float xOffset = 1.0f / mNumPagesForWallpaperParallax;
+ if (xOffset != mLastSetWallpaperOffsetSteps) {
+ mWallpaperManager.setWallpaperOffsetSteps(xOffset, 1.0f);
+ mLastSetWallpaperOffsetSteps = xOffset;
+ }
}
public void setFinalX(float x) {
@@ -1700,6 +1721,10 @@
if (LauncherAppState.getInstance().hasWallpaperChangedSinceLastCheck()) {
setWallpaperDimension();
}
+ mWallpaperIsLiveWallpaper = mWallpaperManager.getWallpaperInfo() != null;
+ // Force the wallpaper offset steps to be set again, because another app might have changed
+ // them
+ mLastSetWallpaperOffsetSteps = 0f;
}
@Override
@@ -2607,6 +2632,9 @@
if (child instanceof BubbleTextView) {
BubbleTextView icon = (BubbleTextView) child;
icon.clearPressedOrFocusedBackground();
+ } else if (child instanceof FolderIcon) {
+ // Dismiss the folder cling if we haven't already
+ mLauncher.getLauncherClings().markFolderClingDismissed();
}
if (child.getTag() == null || !(child.getTag() instanceof ItemInfo)) {
@@ -2690,12 +2718,13 @@
mTargetCell);
float distance = dropTargetLayout.getDistanceFromCell(mDragViewVisualCenter[0],
mDragViewVisualCenter[1], mTargetCell);
- if (willCreateUserFolder((ItemInfo) d.dragInfo, dropTargetLayout,
- mTargetCell, distance, true)) {
+ if (mCreateUserFolderOnDrop && willCreateUserFolder((ItemInfo) d.dragInfo,
+ dropTargetLayout, mTargetCell, distance, true)) {
return true;
}
- if (willAddToExistingUserFolder((ItemInfo) d.dragInfo, dropTargetLayout,
- mTargetCell, distance)) {
+
+ if (mAddToExistingFolderOnDrop && willAddToExistingUserFolder((ItemInfo) d.dragInfo,
+ dropTargetLayout, mTargetCell, distance)) {
return true;
}
@@ -4593,11 +4622,15 @@
private void updateShortcut(HashMap<ComponentName, AppInfo> appsMap, ItemInfo info,
View child) {
ComponentName cn = info.getIntent().getComponent();
+ if (info.getRestoredIntent() != null) {
+ cn = info.getRestoredIntent().getComponent();
+ }
if (cn != null) {
- AppInfo appInfo = appsMap.get(info.getIntent().getComponent());
+ AppInfo appInfo = appsMap.get(cn);
if ((appInfo != null) && LauncherModel.isShortcutInfoUpdateable(info)) {
ShortcutInfo shortcutInfo = (ShortcutInfo) info;
BubbleTextView shortcut = (BubbleTextView) child;
+ shortcutInfo.restore();
shortcutInfo.updateIcon(mIconCache);
shortcutInfo.title = appInfo.title.toString();
shortcut.applyFromShortcutInfo(shortcutInfo, mIconCache);