mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
[Refactor] Extract work profile related logic from AllAppsContainerView to WorkProfileManager
Bug: 195623679 Test: presubmit Change-Id: I9954fb40034d1804aaf19f0778f95477e48ccc8f
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TURN_ON_WORK_APPS_TAP;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
@@ -62,8 +61,8 @@ public class WorkPausedCard extends LinearLayout implements View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (Utilities.ATLEAST_P) {
|
||||
setEnabled(false);
|
||||
mLauncher.getAppsView().getWorkManager().setWorkProfileEnabled(true);
|
||||
mLauncher.getStatsLogManager().logger().log(LAUNCHER_TURN_ON_WORK_APPS_TAP);
|
||||
UI_HELPER_EXECUTOR.post(() -> WorkModeSwitch.setWorkProfileEnabled(getContext(), true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user