feat: Add option to clear home screen in settings (#6125)
Signed-off-by: abhixv <abhi.sharma1@hotmail.com>
This commit is contained in:
1 parent
9898749619
commit
5f3a03f4fb
1577 files changed
+112559
-80244
No files matched your search
@@ -18,6 +18,8 @@ package com.android.launcher3.uioverrides.states;
|
||||
import static com.android.app.animation.Interpolators.DECELERATE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAPPS;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.R;
|
||||
@@ -29,6 +31,8 @@ import com.android.launcher3.views.ActivityContext;
|
||||
*/
|
||||
public class AllAppsState extends LauncherState {
|
||||
|
||||
private static final float PARALLAX_COEFFICIENT = .125f;
|
||||
|
||||
private static final int STATE_FLAGS = FLAG_WORKSPACE_INACCESSIBLE;
|
||||
|
||||
public AllAppsState(int id) {
|
||||
@@ -36,7 +40,8 @@ public class AllAppsState extends LauncherState {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTransitionDuration(ActivityContext context, boolean isToState) {
|
||||
public <DEVICE_PROFILE_CONTEXT extends Context & ActivityContext>
|
||||
int getTransitionDuration(DEVICE_PROFILE_CONTEXT context, boolean isToState) {
|
||||
return isToState
|
||||
? context.getDeviceProfile().allAppsOpenDuration
|
||||
: context.getDeviceProfile().allAppsCloseDuration;
|
||||
|
||||
@@ -17,11 +17,12 @@ package com.android.launcher3.uioverrides.states;
|
||||
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERVIEW;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
/**
|
||||
* Definition for overview state
|
||||
@@ -33,7 +34,7 @@ public class OverviewState extends LauncherState {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTransitionDuration(ActivityContext context, boolean isToState) {
|
||||
public int getTransitionDuration(Context context, boolean isToState) {
|
||||
return 250;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user