mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Add logging for tapped on 'Turn on/off work apps' button in all apps
Bug: 190050582 Test: Manual Change-Id: Ib83fba6dc9199ba40a500e0743c0e64cc4d4d0a0
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TURN_OFF_WORK_APPS_TAP;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -31,6 +32,7 @@ import android.widget.Button;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.pm.UserCache;
|
||||
|
||||
@@ -92,6 +94,8 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi
|
||||
public void onClick(View view) {
|
||||
if (Utilities.ATLEAST_P) {
|
||||
setEnabled(false);
|
||||
Launcher.fromContext(getContext()).getStatsLogManager().logger().log(
|
||||
LAUNCHER_TURN_OFF_WORK_APPS_TAP);
|
||||
UI_HELPER_EXECUTOR.post(() -> setWorkProfileEnabled(getContext(), false));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user