1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.launcher3.util; 18 19 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NAVIGATION_MODE_2_BUTTON; 20 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NAVIGATION_MODE_3_BUTTON; 21 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_NAVIGATION_MODE_GESTURE_BUTTON; 22 23 import com.android.launcher3.logging.StatsLogManager; 24 25 /** 26 * Navigation mode used in the device. 27 */ 28 public enum NavigationMode { 29 THREE_BUTTONS(false, 0, LAUNCHER_NAVIGATION_MODE_3_BUTTON), 30 TWO_BUTTONS(true, 1, LAUNCHER_NAVIGATION_MODE_2_BUTTON), 31 NO_BUTTON(true, 2, LAUNCHER_NAVIGATION_MODE_GESTURE_BUTTON); 32 33 public final boolean hasGestures; 34 public final int resValue; 35 public final StatsLogManager.LauncherEvent launcherEvent; 36 NavigationMode(boolean hasGestures, int resValue, StatsLogManager.LauncherEvent launcherEvent)37 NavigationMode(boolean hasGestures, int resValue, StatsLogManager.LauncherEvent launcherEvent) { 38 this.hasGestures = hasGestures; 39 this.resValue = resValue; 40 this.launcherEvent = launcherEvent; 41 } 42 } 43