Snap for 7137523 from ea826f87d1 to sc-release
Change-Id: I8ec8d2f755a07254c918cf19c0723350aec3d664
This commit is contained in:
commit
6d0d34a4d0
7 files changed
+64
-4
No files matched your search
@@ -221,6 +221,12 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets full screen progress to the task overlay.
|
||||
*/
|
||||
public void setFullscreenProgress(float progress) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the system shortcut for the screenshot that will be added to the task menu.
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.quickstep.logging;
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.EXTENDED_CONTAINERS;
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.FOLDER;
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.SEARCH_RESULT_CONTAINER;
|
||||
import static com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers.ContainerCase.DEVICE_SEARCH_RESULT_CONTAINER;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WORKSPACE_SNAPSHOT;
|
||||
import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__ALLAPPS;
|
||||
import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__BACKGROUND;
|
||||
@@ -38,6 +39,8 @@ import com.android.launcher3.logger.LauncherAtom.FolderContainer.ParentContainer
|
||||
import com.android.launcher3.logger.LauncherAtom.FolderIcon;
|
||||
import com.android.launcher3.logger.LauncherAtom.FromState;
|
||||
import com.android.launcher3.logger.LauncherAtom.ToState;
|
||||
import com.android.launcher3.logger.LauncherAtomExtensions.DeviceSearchResultContainer;
|
||||
import com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.AllAppsList;
|
||||
@@ -301,6 +304,14 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
return info.getContainerInfo().getPredictedHotseatContainer().getCardinality();
|
||||
case SEARCH_RESULT_CONTAINER:
|
||||
return info.getContainerInfo().getSearchResultContainer().getQueryLength();
|
||||
case EXTENDED_CONTAINERS:
|
||||
ExtendedContainers extendedCont = info.getContainerInfo().getExtendedContainers();
|
||||
if (extendedCont.getContainerCase() == DEVICE_SEARCH_RESULT_CONTAINER) {
|
||||
DeviceSearchResultContainer deviceSearchResultCont = extendedCont
|
||||
.getDeviceSearchResultContainer();
|
||||
return deviceSearchResultCont.hasQueryLength() ? deviceSearchResultCont
|
||||
.getQueryLength() : -1;
|
||||
}
|
||||
default:
|
||||
return info.getFolderIcon().getCardinality();
|
||||
}
|
||||
|
||||
@@ -1080,6 +1080,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
|
||||
progress = Utilities.boundToRange(progress, 0, 1);
|
||||
mFullscreenProgress = progress;
|
||||
mIconView.setVisibility(progress < 1 ? VISIBLE : INVISIBLE);
|
||||
getThumbnail().getTaskOverlay().setFullscreenProgress(progress);
|
||||
|
||||
updateTaskScaling();
|
||||
|
||||
|
||||
@@ -213,10 +213,14 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
if (insets == null) return;
|
||||
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
getWindowInsetsController().hide(WindowInsets.Type.ime());
|
||||
hideIme();
|
||||
}
|
||||
}
|
||||
|
||||
protected void hideIme() {
|
||||
getWindowInsetsController().hide(WindowInsets.Type.ime());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the view itself will handle the touch event or not.
|
||||
*/
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
*/
|
||||
package com.android.launcher3.allapps;
|
||||
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_KEYBOARD_CLOSED;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
@@ -86,6 +90,14 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView {
|
||||
public void onTabChanged(int pos) {
|
||||
super.onTabChanged(pos);
|
||||
if (mUsingTabs) {
|
||||
|
||||
// Log tab switches only when the launcher is in AllApps state
|
||||
if (mLauncher.getStateManager().getCurrentStableState() == LauncherState.ALL_APPS) {
|
||||
mLauncher.getLiveSearchManager().allAppsLogger()
|
||||
.log(pos == AdapterHolder.WORK ? LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB
|
||||
: LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB);
|
||||
}
|
||||
|
||||
if (pos == AdapterHolder.WORK) {
|
||||
WorkEduView.showWorkEduIfNeeded(mLauncher);
|
||||
} else {
|
||||
@@ -93,4 +105,10 @@ public class LauncherAllAppsContainerView extends AllAppsContainerView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void hideIme() {
|
||||
super.hideIme();
|
||||
mLauncher.getLiveSearchManager().allAppsLogger().log(LAUNCHER_ALLAPPS_KEYBOARD_CLOSED);
|
||||
}
|
||||
}
|
||||
@@ -153,15 +153,15 @@ public class LiveSearchManager implements StateListener<LauncherState> {
|
||||
clearWidgetHost();
|
||||
}
|
||||
|
||||
StatsLogger logger = mLauncher.getStatsLogManager().logger();
|
||||
if (finalState.equals(ALL_APPS)) {
|
||||
// creates new instance ID since new all apps session is started.
|
||||
mLogInstanceId = new InstanceIdSequence().newInstanceId();
|
||||
logger.withInstanceId(mLogInstanceId).log(LAUNCHER_ALLAPPS_ENTRY);
|
||||
allAppsLogger().log(LAUNCHER_ALLAPPS_ENTRY);
|
||||
} else if (mPrevLauncherState.equals(ALL_APPS)
|
||||
// Check if mLogInstanceId is not null; to avoid NPE when LAUNCHER_ALLAPPS_EXIT is
|
||||
// triggered multiple times
|
||||
&& mLogInstanceId != null) {
|
||||
logger.withInstanceId(mLogInstanceId).log(LAUNCHER_ALLAPPS_EXIT);
|
||||
allAppsLogger().log(LAUNCHER_ALLAPPS_EXIT);
|
||||
mLogInstanceId = null;
|
||||
}
|
||||
}
|
||||
@@ -316,4 +316,15 @@ public class LiveSearchManager implements StateListener<LauncherState> {
|
||||
@Override
|
||||
public void onActivitySaveInstanceState(Activity activity, Bundle bundle) { }
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns new instance of {@link StatsLogger} pre-populated with details required to log
|
||||
* AllApps specific user events.
|
||||
*/
|
||||
public StatsLogger allAppsLogger() {
|
||||
return getLogInstanceId()
|
||||
.map(instanceId -> mLauncher.getStatsLogManager().logger()
|
||||
.withInstanceId(instanceId))
|
||||
.orElse(mLauncher.getStatsLogManager().logger());
|
||||
}
|
||||
}
|
||||
@@ -350,6 +350,15 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
|
||||
@UiEvent(doc = "Launcher exited from AllApps state.")
|
||||
LAUNCHER_ALLAPPS_EXIT(693),
|
||||
|
||||
@UiEvent(doc = "User closed the AllApps keyboard.")
|
||||
LAUNCHER_ALLAPPS_KEYBOARD_CLOSED(694),
|
||||
|
||||
@UiEvent(doc = "User switched to Main tab in AllApps screen.")
|
||||
LAUNCHER_ALLAPPS_SWITCHED_TO_MAIN_TAB(695),
|
||||
|
||||
@UiEvent(doc = "User switched to Work tab in AllApps screen.")
|
||||
LAUNCHER_ALLAPPS_SWITCHED_TO_WORK_TAB(696),
|
||||
;
|
||||
|
||||
// ADD MORE
|
||||
|
||||
Reference in new issue
Block a user