Merge "Widget row should not be cut off on the right, when there is an indent" into ub-launcher3-burnaby
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index d382c6a..802922e 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -18,7 +18,6 @@
<com.android.launcher3.LauncherRootView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
-
android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index 71a9e36..59ad153 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -38,7 +38,7 @@
<string name="all_apps_home_button_label" msgid="252062713717058851">"ഹോം"</string>
<string name="delete_target_label" msgid="1822697352535677073">"നീക്കംചെയ്യുക"</string>
<string name="delete_target_uninstall_label" msgid="5100785476250872595">"അണ്ഇസ്റ്റാളുചെയ്യുക"</string>
- <string name="info_target_label" msgid="8053346143994679532">"അപ്ലിക്കേഷൻ വിവരം"</string>
+ <string name="info_target_label" msgid="8053346143994679532">"ആപ്പ് വിവരം"</string>
<string name="permlab_install_shortcut" msgid="5632423390354674437">"കുറുക്കുവഴികൾ ഇൻസ്റ്റാളുചെയ്യുക"</string>
<string name="permdesc_install_shortcut" msgid="923466509822011139">"ഉപയോക്തൃ ഇടപെടൽ ഇല്ലാതെ കുറുക്കുവഴികൾ ചേർക്കാൻ അപ്ലിക്കേഷനെ അനുവദിക്കുന്നു."</string>
<string name="permlab_read_settings" msgid="1941457408239617576">"ഹോം ക്രമീകരണങ്ങളും കുറുക്കുവഴികളും റീഡുചെയ്യുക"</string>
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index a50540d..62b05b0 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -265,7 +265,7 @@
if (isTablet) {
// Pad the left and right of the workspace to ensure consistent spacing
// between all icons
- int width = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx);
+ int width = getCurrentWidth();
// XXX: If the icon size changes across orientations, we will have to take
// that into account here too.
int gap = (int) ((width - 2 * edgeMarginPx -
@@ -301,12 +301,8 @@
// Pad the left and right of the workspace to ensure consistent spacing
// between all icons
float gapScale = 1f + (dragViewScale - 1f) / 2f;
- int width = isLandscape
- ? Math.max(widthPx, heightPx)
- : Math.min(widthPx, heightPx);
- int height = isLandscape
- ? Math.max(widthPx, heightPx)
- : Math.min(widthPx, heightPx);
+ int width = getCurrentWidth();
+ int height = getCurrentHeight();
int paddingTop = searchBarBounds.bottom;
int paddingBottom = hotseatBarHeightPx + pageIndicatorHeightPx;
int availableWidth = Math.max(0, width - (int) ((inv.numColumns * cellWidthPx) +
@@ -517,4 +513,16 @@
}
}
}
+
+ private int getCurrentWidth() {
+ return isLandscape
+ ? Math.max(widthPx, heightPx)
+ : Math.min(widthPx, heightPx);
+ }
+
+ private int getCurrentHeight() {
+ return isLandscape
+ ? Math.min(widthPx, heightPx)
+ : Math.max(widthPx, heightPx);
+ }
}
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 7414a22..9d2a890 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1999,7 +1999,7 @@
"constructing info for partially restored package",
true);
info = getRestoredItemInfo(c, titleIndex, intent,
- promiseType, cursorIconInfo, context);
+ promiseType, itemType, cursorIconInfo, context);
intent = getRestoredItemIntent(c, context, intent);
} else {
// Don't restore items for other profiles.
@@ -3380,7 +3380,7 @@
* to a package that is not yet installed on the system.
*/
public ShortcutInfo getRestoredItemInfo(Cursor c, int titleIndex, Intent intent,
- int promiseType, CursorIconInfo iconInfo, Context context) {
+ int promiseType, int itemType, CursorIconInfo iconInfo, Context context) {
final ShortcutInfo info = new ShortcutInfo();
info.user = UserHandleCompat.myUserHandle();
@@ -3406,7 +3406,7 @@
}
info.contentDescription = mUserManager.getBadgedLabelForUser(info.title, info.user);
- info.itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
+ info.itemType = itemType;
info.promisedIntent = intent;
info.status = promiseType;
return info;
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index ee72aea..cc5e18b 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -772,7 +772,7 @@
long id = c.getLong(idIndex);
updateStmt.bindLong(1, id);
- updateStmt.execute();
+ updateStmt.executeUpdateDelete();
}
db.setTransactionSuccessful();
} catch (SQLException ex) {