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:
Thiru Ramasamy
2021-06-15 18:46:30 -07:00
parent c846245f1b
commit 6f0e75740f
3 changed files with 13 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
*/
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;
@@ -61,6 +62,7 @@ public class WorkPausedCard extends LinearLayout implements View.OnClickListener
public void onClick(View view) {
if (Utilities.ATLEAST_P) {
setEnabled(false);
mLauncher.getStatsLogManager().logger().log(LAUNCHER_TURN_ON_WORK_APPS_TAP);
UI_HELPER_EXECUTOR.post(() -> WorkModeSwitch.setWorkProfileEnabled(getContext(), true));
}
}