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 com.android.launcher3.logging.StatsLogManager; 20 import com.android.launcher3.util.SplitConfigurationOptions.StagePosition; 21 22 /** 23 * Utility class to store information regarding a split select request. This includes the taskId of 24 * the originating task, plus the stage position. 25 * This information is intended to be saved across launcher instances, e.g. when Launcher needs to 26 * recover straight into a split select state. 27 */ 28 public class PendingSplitSelectInfo { 29 30 private final int mStagedTaskId; 31 private final int mStagePosition; 32 private final StatsLogManager.EventEnum mSource; 33 PendingSplitSelectInfo(int stagedTaskId, int stagePosition, StatsLogManager.EventEnum source)34 public PendingSplitSelectInfo(int stagedTaskId, int stagePosition, 35 StatsLogManager.EventEnum source) { 36 this.mStagedTaskId = stagedTaskId; 37 this.mStagePosition = stagePosition; 38 this.mSource = source; 39 } 40 getStagedTaskId()41 public int getStagedTaskId() { 42 return mStagedTaskId; 43 } 44 getStagePosition()45 public @StagePosition int getStagePosition() { 46 return mStagePosition; 47 } 48 getSource()49 public StatsLogManager.EventEnum getSource() { 50 return mSource; 51 } 52 } 53