Add launcher logging of back button

Bug: 127848641
Test: adb shell setprop log.tag.UserEvent VERBOSE, then hit back
Change-Id: I020738280d2e51a8a192e577baf48c0b092f22f6
(cherry picked from commit df7d00328c)
This commit is contained in:
Winson Chung
2019-04-02 15:09:36 -07:00
parent 131e0b1d18
commit 41d58f7100
5 changed files with 43 additions and 5 deletions
@@ -192,7 +192,11 @@ public final class FallbackActivityControllerHelper implements
@Override
public int getContainerType() {
return LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER;
RecentsActivity activity = getCreatedActivity();
boolean visible = activity != null && activity.isStarted() && activity.hasWindowFocus();
return visible
? LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER
: LauncherLogProto.ContainerType.APP;
}
@Override