diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java | 8 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java | 3 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/CellLayout.java | 5 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/DeleteDropTarget.java | 1 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/HideFromAccessibilityHelper.java (renamed from src/com/android/launcher2/HideFromAccessibilityHelper.java) | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherAnimUtils.java (renamed from src/com/android/launcher2/LauncherAnimUtils.java) | 2 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/LauncherModel.java | 2 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/UserInitializeReceiver.java (renamed from src/com/android/launcher2/UserInitializeReceiver.java) | 6 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 1 |
9 files changed, 16 insertions, 16 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java index b951b8f..ad16d90 100644 --- a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java +++ b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java @@ -1899,7 +1899,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen mSortMode = sortMode; if (mSortMode == SortMode.Title) { - Collections.sort(mApps, LauncherModel.APP_NAME_COMPARATOR); + Collections.sort(mApps, LauncherModel.getAppNameComparator()); } else if (mSortMode == SortMode.InstallDate) { Collections.sort(mApps, LauncherModel.APP_INSTALL_TIME_COMPARATOR); } @@ -1920,7 +1920,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen public void setApps(ArrayList<ApplicationInfo> list) { mApps = list; if (mSortMode == SortMode.Title) { - Collections.sort(mApps, LauncherModel.APP_NAME_COMPARATOR); + Collections.sort(mApps, LauncherModel.getAppNameComparator()); } else if (mSortMode == SortMode.InstallDate) { Collections.sort(mApps, LauncherModel.APP_INSTALL_TIME_COMPARATOR); } @@ -2122,7 +2122,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen count = mNumWidgetPages; } - return String.format(mContext.getString(stringId), page + 1, count); + return String.format(getContext().getString(stringId), page + 1, count); } else { switch (mContentType) { case Applications: @@ -2132,7 +2132,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen stringId = R.string.apps_customize_widgets_scroll_format; break; } - return String.format(mContext.getString(stringId), page + 1, getChildCount()); + return String.format(getContext().getString(stringId), page + 1, getChildCount()); } } } diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java b/src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java index 63eb013..6e0d147 100644 --- a/src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java +++ b/src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java @@ -71,8 +71,6 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona } }; - mLauncher = (Launcher) context; - // Preferences mJoinWidgetsApps = PreferencesProvider.Interface.Drawer.getJoinWidgetsApps(context); mFadeScrollingIndicator = PreferencesProvider.Interface.Drawer.Indicator.getFadeScrollingIndicator(context); @@ -135,7 +133,6 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona tabView.setContentDescription(label); tabView.setOnLongClickListener(new View.OnLongClickListener() { public boolean onLongClick(View v) { - mLauncher.onLongClickAppsTab(v); return true; } }); diff --git a/src/com/cyanogenmod/trebuchet/CellLayout.java b/src/com/cyanogenmod/trebuchet/CellLayout.java index b4b6b2e..63e98ad 100644 --- a/src/com/cyanogenmod/trebuchet/CellLayout.java +++ b/src/com/cyanogenmod/trebuchet/CellLayout.java @@ -975,8 +975,9 @@ public class CellLayout extends ViewGroup { int numHeightGaps = mCountY - 1; if (!LauncherApplication.isScreenLarge()){ - mCellWidth = (widthSpecSize - mPaddingLeft - mPaddingRight) / mCountX; - mCellHeight = (heightSpecSize - mPaddingTop - mPaddingBottom) / mCountY; + Resources res = getResources(); + mCellWidth = (widthSpecSize - res.getDimensionPixelSize(R.dimen.cell_layout_left_padding_land) - res.getDimensionPixelSize(R.dimen.cell_layout_right_padding_land) ) / mCountX; + mCellHeight = (heightSpecSize - res.getDimensionPixelSize(R.dimen.cell_layout_top_padding_land) - res.getDimensionPixelSize(R.dimen.cell_layout_bottom_padding_land) ) / mCountY; } if (mOriginalWidthGap < 0 || mOriginalHeightGap < 0) { diff --git a/src/com/cyanogenmod/trebuchet/DeleteDropTarget.java b/src/com/cyanogenmod/trebuchet/DeleteDropTarget.java index 860ada8..2cc872a 100644 --- a/src/com/cyanogenmod/trebuchet/DeleteDropTarget.java +++ b/src/com/cyanogenmod/trebuchet/DeleteDropTarget.java @@ -27,6 +27,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.PointF; import android.graphics.Rect; +import android.graphics.drawable.Drawable; import android.os.Handler; import android.util.AttributeSet; import android.view.HapticFeedbackConstants; diff --git a/src/com/android/launcher2/HideFromAccessibilityHelper.java b/src/com/cyanogenmod/trebuchet/HideFromAccessibilityHelper.java index 0b2ce5b..e3c198d 100644 --- a/src/com/android/launcher2/HideFromAccessibilityHelper.java +++ b/src/com/cyanogenmod/trebuchet/HideFromAccessibilityHelper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.launcher2; +package com.cyanogenmod.trebuchet; import android.view.View; import android.view.ViewGroup; @@ -110,4 +110,4 @@ public class HideFromAccessibilityHelper implements OnHierarchyChangeListener { (v.getParent() instanceof ViewGroup && hasAncestorOfType((ViewGroup) v.getParent(), c))); } -}
\ No newline at end of file +} diff --git a/src/com/android/launcher2/LauncherAnimUtils.java b/src/com/cyanogenmod/trebuchet/LauncherAnimUtils.java index 9317c31..456c3c0 100644 --- a/src/com/android/launcher2/LauncherAnimUtils.java +++ b/src/com/cyanogenmod/trebuchet/LauncherAnimUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.launcher2; +package com.cyanogenmod.trebuchet; import android.animation.Animator; import android.animation.AnimatorSet; diff --git a/src/com/cyanogenmod/trebuchet/LauncherModel.java b/src/com/cyanogenmod/trebuchet/LauncherModel.java index 095b907..73b654e 100644 --- a/src/com/cyanogenmod/trebuchet/LauncherModel.java +++ b/src/com/cyanogenmod/trebuchet/LauncherModel.java @@ -1469,7 +1469,7 @@ public class LauncherModel extends BroadcastReceiver { Log.d(TAG, "workspace layout: "); for (int y = 0; y < mCellCountY; y++) { String line = ""; - for (int s = 0; s < Launcher.SCREEN_COUNT; s++) { + for (int s = 0; s < Launcher.MAX_SCREEN_COUNT; s++) { if (s > 0) { line += " | "; } diff --git a/src/com/android/launcher2/UserInitializeReceiver.java b/src/com/cyanogenmod/trebuchet/UserInitializeReceiver.java index bf3330a..db20ae9 100644 --- a/src/com/android/launcher2/UserInitializeReceiver.java +++ b/src/com/cyanogenmod/trebuchet/UserInitializeReceiver.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.android.launcher2; +package com.cyanogenmod.trebuchet; import java.io.IOException; import java.util.ArrayList; -import com.android.launcher.R; +import com.cyanogenmod.trebuchet.R; import android.app.WallpaperManager; import android.content.BroadcastReceiver; @@ -36,7 +36,7 @@ public class UserInitializeReceiver extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { final Resources resources = context.getResources(); // Context.getPackageName() may return the "original" package name, - // com.android.launcher2; Resources needs the real package name, + // com.cyanogenmod.trebuchet; Resources needs the real package name, // com.android.launcher. So we ask Resources for what it thinks the // package name should be. final String packageName = resources.getResourcePackageName(R.array.wallpapers); diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index ab065b5..d8b39de 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -45,6 +45,7 @@ import android.os.Build; import android.os.IBinder; import android.os.Parcelable; import android.util.AttributeSet; +import android.util.DisplayMetrics; import android.util.Log; import android.util.SparseArray; import android.view.Display; |