Merge "Add IME switcher button logging" into sc-v2-dev am: e6d024b72c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16443316

Change-Id: Ib4cd936c0de69266ce6e8bcc9d920723435b9d4e
This commit is contained in:
Winson Chung
2021-12-13 05:46:10 +00:00
committed by Automerger Merge Worker
3 changed files with 10 additions and 0 deletions

View File

@@ -1252,6 +1252,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
private void onImeSwitcherClick(View v) { private void onImeSwitcherClick(View v) {
mInputMethodManager.showInputMethodPickerFromSystem( mInputMethodManager.showInputMethodPickerFromSystem(
true /* showAuxiliarySubtypes */, mDisplayId); true /* showAuxiliarySubtypes */, mDisplayId);
mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
}; };
private boolean onLongPressBackHome(View v) { private boolean onLongPressBackHome(View v) {

View File

@@ -96,6 +96,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
@UiEvent(doc = "The overview button was pressed in the navigation bar.") @UiEvent(doc = "The overview button was pressed in the navigation bar.")
NAVBAR_OVERVIEW_BUTTON_TAP(535), NAVBAR_OVERVIEW_BUTTON_TAP(535),
@UiEvent(doc = "The ime switcher button was pressed in the navigation bar.")
NAVBAR_IME_SWITCHER_BUTTON_TAP(923),
@UiEvent(doc = "The home button was long-pressed in the navigation bar.") @UiEvent(doc = "The home button was long-pressed in the navigation bar.")
NAVBAR_HOME_BUTTON_LONGPRESS(536), NAVBAR_HOME_BUTTON_LONGPRESS(536),

View File

@@ -76,6 +76,7 @@ import androidx.annotation.NonNull;
import com.android.internal.accessibility.dialog.AccessibilityButtonChooserActivity; import com.android.internal.accessibility.dialog.AccessibilityButtonChooserActivity;
import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.ScreenDecorationsUtils; import com.android.internal.policy.ScreenDecorationsUtils;
import com.android.internal.util.ScreenshotHelper; import com.android.internal.util.ScreenshotHelper;
import com.android.systemui.Dumpable; import com.android.systemui.Dumpable;
@@ -88,6 +89,7 @@ import com.android.systemui.navigationbar.NavigationBar;
import com.android.systemui.navigationbar.NavigationBarController; import com.android.systemui.navigationbar.NavigationBarController;
import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.buttons.KeyButtonView;
import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener; import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener;
import com.android.systemui.settings.CurrentUserTracker; import com.android.systemui.settings.CurrentUserTracker;
import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.recents.IOverviewProxy;
@@ -161,6 +163,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
private final Optional<StartingSurface> mStartingSurface; private final Optional<StartingSurface> mStartingSurface;
private final SmartspaceTransitionController mSmartspaceTransitionController; private final SmartspaceTransitionController mSmartspaceTransitionController;
private final Optional<RecentTasks> mRecentTasks; private final Optional<RecentTasks> mRecentTasks;
private final UiEventLogger mUiEventLogger;
private Region mActiveNavBarRegion; private Region mActiveNavBarRegion;
@@ -248,6 +251,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
mContext.getSystemService(InputMethodManager.class) mContext.getSystemService(InputMethodManager.class)
.showInputMethodPickerFromSystem(true /* showAuxiliarySubtypes */, .showInputMethodPickerFromSystem(true /* showAuxiliarySubtypes */,
DEFAULT_DISPLAY); DEFAULT_DISPLAY);
mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
} }
@Override @Override
@@ -560,6 +564,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
ShellTransitions shellTransitions, ShellTransitions shellTransitions,
ScreenLifecycle screenLifecycle, ScreenLifecycle screenLifecycle,
SmartspaceTransitionController smartspaceTransitionController, SmartspaceTransitionController smartspaceTransitionController,
UiEventLogger uiEventLogger,
DumpManager dumpManager) { DumpManager dumpManager) {
super(broadcastDispatcher); super(broadcastDispatcher);
mContext = context; mContext = context;
@@ -581,6 +586,7 @@ public class OverviewProxyService extends CurrentUserTracker implements
mOneHandedOptional = oneHandedOptional; mOneHandedOptional = oneHandedOptional;
mShellTransitions = shellTransitions; mShellTransitions = shellTransitions;
mRecentTasks = recentTasks; mRecentTasks = recentTasks;
mUiEventLogger = uiEventLogger;
// Assumes device always starts with back button until launcher tells it that it does not // Assumes device always starts with back button until launcher tells it that it does not
mNavBarButtonAlpha = 1.0f; mNavBarButtonAlpha = 1.0f;