Lazily instantiate LauncherAppState.

The application context for LauncherAppState is supplied by
the application whenever it starts; don't ask for an
instance before that.

Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
This commit is contained in:
Daniel Sandler
2013-06-25 15:13:26 -04:00
parent fe7750b5d6
commit e4f9891f01
23 changed files with 170 additions and 215 deletions

View File

@@ -34,8 +34,6 @@ import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import com.android.launcher3.R;
public class DeleteDropTarget extends ButtonDropTarget {
private static int DELETE_ANIMATION_DURATION = 285;
private static int FLING_DELETE_ANIMATION_DURATION = 350;
@@ -82,7 +80,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
// Remove the text in the Phone UI in landscape
int orientation = getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
if (!LauncherAppState.isScreenLarge()) {
if (!LauncherAppState.getInstance().isScreenLarge()) {
setText("");
}
}