Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +4 −1 Original line number Diff line number Diff line Loading @@ -858,8 +858,11 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba .setDuration(isStashed ? duration / 2 : duration)); } private static void play(AnimatorSet as, Animator a, long startDelay, long duration, private static void play(AnimatorSet as, @Nullable Animator a, long startDelay, long duration, Interpolator interpolator) { if (a == null) { return; } a.setDuration(duration); a.setStartDelay(startDelay); a.setInterpolator(interpolator); Loading quickstep/tests/src/com/android/quickstep/ViewInflationDuringSwipeUp.java +1 −1 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public class ViewInflationDuringSwipeUp extends AbstractQuickStepTest { LauncherSettings.Settings.METHOD_CREATE_EMPTY_DB); LauncherSettings.Settings.call(mResolver, LauncherSettings.Settings.METHOD_CLEAR_EMPTY_DB_FLAG); LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(this, false); LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(false); // Make sure the widget is big enough to show a list of items info.minSpanX = 2; info.minSpanY = 2; Loading src/com/android/launcher3/model/DeviceGridState.java +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.text.TextUtils; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.LauncherPrefs; import com.android.launcher3.logging.StatsLogManager.LauncherEvent; import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext; import java.util.Locale; import java.util.Objects; Loading Loading @@ -92,6 +93,9 @@ public class DeviceGridState implements Comparable<DeviceGridState> { * Stores the device state to shared preferences */ public void writeToPrefs(Context context) { if (context instanceof SandboxContext) { return; } LauncherPrefs.get(context).put( WORKSPACE_SIZE.to(mGridSizeString), HOTSEAT_COUNT.to(mNumHotseat), Loading src/com/android/launcher3/model/GridSizeMigrationUtil.java +2 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import com.android.launcher3.pm.InstallSessionHelper; import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction; import com.android.launcher3.util.GridOccupancy; import com.android.launcher3.util.IntArray; import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext; import com.android.launcher3.widget.LauncherAppWidgetProviderInfo; import com.android.launcher3.widget.WidgetManagerHelper; Loading Loading @@ -133,12 +132,10 @@ public class GridSizeMigrationUtil { Log.v(TAG, "Workspace migration completed in " + (System.currentTimeMillis() - migrationStartTime)); if (!(context instanceof SandboxContext)) { // Save current configuration, so that the migration does not run again. destDeviceState.writeToPrefs(context); } } } public static boolean migrate( @NonNull DatabaseHelper helper, Loading src/com/android/launcher3/model/LoaderTask.java +2 −11 Original line number Diff line number Diff line Loading @@ -367,18 +367,9 @@ public class LoaderTask implements Runnable { final boolean isSdCardReady = Utilities.isBootCompleted(); final WidgetManagerHelper widgetHelper = new WidgetManagerHelper(context); boolean clearDb = false; if (!mApp.getModel().getModelDbController().migrateGridIfNeeded()) { // Migration failed. Clear workspace. clearDb = true; } if (clearDb) { Log.d(TAG, "loadWorkspace: resetting launcher database"); Settings.call(contentResolver, Settings.METHOD_CREATE_EMPTY_DB); } mApp.getModel().getModelDbController().tryMigrateDB(); Log.d(TAG, "loadWorkspace: loading default favorites"); mApp.getModel().getModelDbController().loadDefaultFavoritesIfNecessary(); Settings.call(contentResolver, Settings.METHOD_LOAD_DEFAULT_FAVORITES); synchronized (mBgDataModel) { Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +4 −1 Original line number Diff line number Diff line Loading @@ -858,8 +858,11 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba .setDuration(isStashed ? duration / 2 : duration)); } private static void play(AnimatorSet as, Animator a, long startDelay, long duration, private static void play(AnimatorSet as, @Nullable Animator a, long startDelay, long duration, Interpolator interpolator) { if (a == null) { return; } a.setDuration(duration); a.setStartDelay(startDelay); a.setInterpolator(interpolator); Loading
quickstep/tests/src/com/android/quickstep/ViewInflationDuringSwipeUp.java +1 −1 Original line number Diff line number Diff line Loading @@ -187,7 +187,7 @@ public class ViewInflationDuringSwipeUp extends AbstractQuickStepTest { LauncherSettings.Settings.METHOD_CREATE_EMPTY_DB); LauncherSettings.Settings.call(mResolver, LauncherSettings.Settings.METHOD_CLEAR_EMPTY_DB_FLAG); LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(this, false); LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(false); // Make sure the widget is big enough to show a list of items info.minSpanX = 2; info.minSpanY = 2; Loading
src/com/android/launcher3/model/DeviceGridState.java +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.text.TextUtils; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.LauncherPrefs; import com.android.launcher3.logging.StatsLogManager.LauncherEvent; import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext; import java.util.Locale; import java.util.Objects; Loading Loading @@ -92,6 +93,9 @@ public class DeviceGridState implements Comparable<DeviceGridState> { * Stores the device state to shared preferences */ public void writeToPrefs(Context context) { if (context instanceof SandboxContext) { return; } LauncherPrefs.get(context).put( WORKSPACE_SIZE.to(mGridSizeString), HOTSEAT_COUNT.to(mNumHotseat), Loading
src/com/android/launcher3/model/GridSizeMigrationUtil.java +2 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ import com.android.launcher3.pm.InstallSessionHelper; import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction; import com.android.launcher3.util.GridOccupancy; import com.android.launcher3.util.IntArray; import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext; import com.android.launcher3.widget.LauncherAppWidgetProviderInfo; import com.android.launcher3.widget.WidgetManagerHelper; Loading Loading @@ -133,12 +132,10 @@ public class GridSizeMigrationUtil { Log.v(TAG, "Workspace migration completed in " + (System.currentTimeMillis() - migrationStartTime)); if (!(context instanceof SandboxContext)) { // Save current configuration, so that the migration does not run again. destDeviceState.writeToPrefs(context); } } } public static boolean migrate( @NonNull DatabaseHelper helper, Loading
src/com/android/launcher3/model/LoaderTask.java +2 −11 Original line number Diff line number Diff line Loading @@ -367,18 +367,9 @@ public class LoaderTask implements Runnable { final boolean isSdCardReady = Utilities.isBootCompleted(); final WidgetManagerHelper widgetHelper = new WidgetManagerHelper(context); boolean clearDb = false; if (!mApp.getModel().getModelDbController().migrateGridIfNeeded()) { // Migration failed. Clear workspace. clearDb = true; } if (clearDb) { Log.d(TAG, "loadWorkspace: resetting launcher database"); Settings.call(contentResolver, Settings.METHOD_CREATE_EMPTY_DB); } mApp.getModel().getModelDbController().tryMigrateDB(); Log.d(TAG, "loadWorkspace: loading default favorites"); mApp.getModel().getModelDbController().loadDefaultFavoritesIfNecessary(); Settings.call(contentResolver, Settings.METHOD_LOAD_DEFAULT_FAVORITES); synchronized (mBgDataModel) { Loading