[Refactor] Extract work profile related logic from AllAppsContainerView to WorkProfileManager
Bug: 195623679 Test: presubmit Change-Id: I9954fb40034d1804aaf19f0778f95477e48ccc8f
This commit is contained in:
1 parent
7f693253c8
commit
eb52419282
7 files changed
+313
-147
No files matched your search
@@ -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