mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Clean up work profile
This includes - Dismiss work edu on launcher state change - Remove work tab flash on first setup - Make edu bottom sheet adopt theme color - Fix Work toggle bottom inset Bug: 149200572 Bug: 149197172 Bug: 149199058 Bug: 149215103 Bug: 149198955 Bug: 145595763 Bug:149481723 Test: Manual Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
This commit is contained in:
@@ -35,7 +35,6 @@ import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.LauncherStateManager.StateListener;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.pm.UserCache;
|
||||
|
||||
/**
|
||||
* Abstract base class of floating view responsible for showing discovery bounce animation
|
||||
@@ -144,8 +143,7 @@ public class DiscoveryBounce extends AbstractFloatingView {
|
||||
|
||||
private static void showForHomeIfNeeded(Launcher launcher, boolean withDelay) {
|
||||
if (!launcher.isInState(NORMAL)
|
||||
|| (launcher.getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, false)
|
||||
&& !shouldShowForWorkProfile(launcher))
|
||||
|| launcher.getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, false)
|
||||
|| AbstractFloatingView.getTopOpenView(launcher) != null
|
||||
|| launcher.getSystemService(UserManager.class).isDemoUser()
|
||||
|| Utilities.IS_RUNNING_IN_TEST_HARNESS) {
|
||||
@@ -170,8 +168,7 @@ public class DiscoveryBounce extends AbstractFloatingView {
|
||||
|| !launcher.hasBeenResumed()
|
||||
|| launcher.isForceInvisible()
|
||||
|| launcher.getDeviceProfile().isVerticalBarLayout()
|
||||
|| (launcher.getSharedPrefs().getBoolean(SHELF_BOUNCE_SEEN, false)
|
||||
&& !shouldShowForWorkProfile(launcher))
|
||||
|| launcher.getSharedPrefs().getBoolean(SHELF_BOUNCE_SEEN, false)
|
||||
|| launcher.getSystemService(UserManager.class).isDemoUser()
|
||||
|| Utilities.IS_RUNNING_IN_TEST_HARNESS) {
|
||||
return;
|
||||
@@ -213,12 +210,6 @@ public class DiscoveryBounce extends AbstractFloatingView {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean shouldShowForWorkProfile(Launcher launcher) {
|
||||
return !launcher.getSharedPrefs().getBoolean(
|
||||
PersonalWorkSlidingTabStrip.KEY_SHOWED_PEEK_WORK_TAB, false)
|
||||
&& UserCache.INSTANCE.get(launcher).hasWorkProfile();
|
||||
}
|
||||
|
||||
private static void incrementShelfBounceCount(Launcher launcher) {
|
||||
SharedPreferences sharedPrefs = launcher.getSharedPrefs();
|
||||
int count = sharedPrefs.getInt(SHELF_BOUNCE_COUNT, 0);
|
||||
|
||||
Reference in New Issue
Block a user