Files
Flexera-Launcher/src/com/android/launcher3/contextualeducation/ContextualEduStatsManager.java
T
helencheuk 39a6093369 [Contextual Edu] Enable updating Edu data in Launcher
- Added ContextualEduStatsManager (in Launcher3) and SystemContextualEduStatsManager(in Quickstep) to enable classes in Launcher3 and quickstep to update contextual edu data
- Implemented new updateContextualEduData method in SystemUiProxy file, so the EduStatsManager could use it for update
- AbsSwipeUpHandler handles the logic to go home/overview when in app. Added code to update contextual edu data when these action is triggered.

Test: LauncherSwipeHandlerV2Test
Bug: 357542123
Flag: com.android.systemui.keyboard_touchpad_contextual_education
Change-Id: I6fc5a285ba1a1d770c54cc7af444ff8b3051bd00
2024-08-09 13:38:21 +01:00

48 lines
1.8 KiB
Java

/*
* Copyright 2024 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.launcher3.contextualeducation;
import static com.android.launcher3.util.MainThreadInitializedObject.forOverride;
import com.android.launcher3.R;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.ResourceBasedOverride;
import com.android.launcher3.util.SafeCloseable;
import com.android.systemui.contextualeducation.GestureType;
/**
* A class to update contextual education data. It is a no-op implementation and could be
* overridden by changing the resource value [R.string.contextual_edu_manager_class] to provide
* a real implementation.
*/
public class ContextualEduStatsManager implements ResourceBasedOverride, SafeCloseable {
public static final MainThreadInitializedObject<ContextualEduStatsManager> INSTANCE =
forOverride(ContextualEduStatsManager.class, R.string.contextual_edu_manager_class);
/**
* Updates contextual education stats when a gesture is triggered
* @param isTrackpadGesture indicates if the gesture is triggered by trackpad
* @param gestureType type of gesture triggered
*/
public void updateEduStats(boolean isTrackpadGesture, GestureType gestureType) {
}
@Override
public void close() {
}
}