diff options
author | nebkat <nebkat@teamhacksung.org> | 2013-01-06 16:02:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2013-01-06 08:26:33 -0800 |
commit | 7add60c57e728267fcf77c730029fdc3eeeb8081 (patch) | |
tree | 598950f407e64ae62461e3a9067fdc09f5241193 /src | |
parent | 3642fc08b3e2eaaa0e34faec34bb6529b70a3501 (diff) | |
download | packages_apps_trebuchet-7add60c57e728267fcf77c730029fdc3eeeb8081.zip packages_apps_trebuchet-7add60c57e728267fcf77c730029fdc3eeeb8081.tar.gz packages_apps_trebuchet-7add60c57e728267fcf77c730029fdc3eeeb8081.tar.bz2 |
Workspace: Remove resize any widget preference
Change-Id: Ia8876584e008d359bfecc85412ea03f8d7bb450f
Diffstat (limited to 'src')
3 files changed, 7 insertions, 27 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppWidgetResizeFrame.java b/src/com/cyanogenmod/trebuchet/AppWidgetResizeFrame.java index 0493f76..5b868c1 100644 --- a/src/com/cyanogenmod/trebuchet/AppWidgetResizeFrame.java +++ b/src/com/cyanogenmod/trebuchet/AppWidgetResizeFrame.java @@ -13,8 +13,6 @@ import android.view.Gravity; import android.widget.FrameLayout; import android.widget.ImageView; -import com.cyanogenmod.trebuchet.preference.PreferencesProvider; - public class AppWidgetResizeFrame extends FrameLayout { private LauncherAppWidgetHostView mWidgetView; private CellLayout mCellLayout; @@ -120,19 +118,9 @@ public class AppWidgetResizeFrame extends FrameLayout { mWidgetPaddingBottom = p.bottom; // Resize any widget - if (PreferencesProvider.Interface.Homescreen.getResizeAnyWidget()) { - mResizeMode = AppWidgetProviderInfo.RESIZE_BOTH; - mMinHSpan = 1; - mMinVSpan = 1; - } - - if (mResizeMode == AppWidgetProviderInfo.RESIZE_HORIZONTAL) { - mTopHandle.setVisibility(GONE); - mBottomHandle.setVisibility(GONE); - } else if (mResizeMode == AppWidgetProviderInfo.RESIZE_VERTICAL) { - mLeftHandle.setVisibility(GONE); - mRightHandle.setVisibility(GONE); - } + mResizeMode = AppWidgetProviderInfo.RESIZE_BOTH; + mMinHSpan = 1; + mMinVSpan = 1; final float density = mLauncher.getResources().getDisplayMetrics().density; mBackgroundPadding = (int) Math.ceil(density * BACKGROUND_PADDING); diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index b78b448..e4e19da 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -389,7 +389,6 @@ public class Workspace extends PagedView mStretchScreens = PreferencesProvider.Interface.Homescreen.getStretchScreens(); mShowSearchBar = PreferencesProvider.Interface.Homescreen.getShowSearchBar(); mShowHotseat = PreferencesProvider.Interface.Dock.getShowDock(); - mResizeAnyWidget = PreferencesProvider.Interface.Homescreen.getResizeAnyWidget(); mHideIconLabels = PreferencesProvider.Interface.Homescreen.getHideIconLabels(); mTransitionEffect = PreferencesProvider.Interface.Homescreen.Scrolling.getTransitionEffect( res.getString(R.string.config_workspaceDefaultTransitionEffect)); @@ -2908,16 +2907,13 @@ public class Workspace extends PagedView // in its final location final LauncherAppWidgetHostView hostView = (LauncherAppWidgetHostView) cell; - AppWidgetProviderInfo pinfo = hostView.getAppWidgetInfo(); - if (pinfo != null && - pinfo.resizeMode != AppWidgetProviderInfo.RESIZE_NONE || mResizeAnyWidget) { - final Runnable addResizeFrame = new Runnable() { + final Runnable addResizeFrame = new Runnable() { public void run() { DragLayer dragLayer = mLauncher.getDragLayer(); dragLayer.addResizeFrame(hostView, cellLayout); } - }; - resizeRunnable = (new Runnable() { + }; + resizeRunnable = new Runnable() { public void run() { if (!isPageMoving()) { addResizeFrame.run(); @@ -2925,8 +2921,7 @@ public class Workspace extends PagedView mDelayedResizeRunnable = addResizeFrame; } } - }); - } + }; } LauncherModel.moveItemInDatabase(mLauncher, info, container, screen, lp.cellX, diff --git a/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java b/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java index a20d812..045a9df 100644 --- a/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java +++ b/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java @@ -82,9 +82,6 @@ public final class PreferencesProvider { public static boolean getShowSearchBar() { return getBoolean("ui_homescreen_general_search", true); } - public static boolean getResizeAnyWidget() { - return getBoolean("ui_homescreen_general_resize_any_widget", false); - } public static boolean getHideIconLabels() { return getBoolean("ui_homescreen_general_hide_icon_labels", false); } |