diff options
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index fc112f380..13534b97b 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -22,7 +22,6 @@ import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.annotation.SuppressLint; import android.annotation.TargetApi; -import android.app.Activity; import android.app.ActivityOptions; import android.app.AlertDialog; import android.app.SearchManager; @@ -42,7 +41,6 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; -import android.content.res.Configuration; import android.database.sqlite.SQLiteDatabase; import android.graphics.Point; import android.graphics.Rect; @@ -136,7 +134,7 @@ import java.util.List; /** * Default launcher application. */ -public class Launcher extends Activity +public class Launcher extends BaseActivity implements LauncherExterns, View.OnClickListener, OnLongClickListener, LauncherModel.Callbacks, View.OnTouchListener, LauncherProviderChangeListener, AccessibilityManager.AccessibilityStateChangeListener { @@ -194,7 +192,7 @@ public class Launcher extends Activity private boolean mIsSafeModeEnabled; - static final int APPWIDGET_HOST_ID = 1024; + public static final int APPWIDGET_HOST_ID = 1024; public static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 500; private static final int ON_ACTIVITY_RESULT_ANIMATION_DELAY = 500; private static final int ACTIVITY_START_DELAY = 1000; @@ -273,8 +271,6 @@ public class Launcher extends Activity // it from the context. private SharedPreferences mSharedPrefs; - private DeviceProfile mDeviceProfile; - private boolean mMoveToDefaultScreenFromNewIntent; // This is set to the view that launched the activity that navigated the user away from @@ -359,11 +355,7 @@ public class Launcher extends Activity LauncherAppState app = LauncherAppState.getInstance(this); // Load configuration-specific DeviceProfile - mDeviceProfile = - getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE - ? app.getInvariantDeviceProfile().landscapeProfile - : app.getInvariantDeviceProfile().portraitProfile; - + mDeviceProfile = app.getInvariantDeviceProfile().getDeviceProfile(this); if (Utilities.ATLEAST_NOUGAT && isInMultiWindowMode()) { Display display = getWindowManager().getDefaultDisplay(); Point mwSize = new Point(); @@ -1657,10 +1649,6 @@ public class Launcher extends Activity return mSharedPrefs; } - public DeviceProfile getDeviceProfile() { - return mDeviceProfile; - } - @Override protected void onNewIntent(Intent intent) { long startTime = 0; |