Merge "Add debug logs for WorkTabExists test" into tm-qpr-dev am: 51a864893b am: e1a0fab43d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21550343 Change-Id: I49f743b9fff0d2c58f4a6fdd1d58e91fc7c56406 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_HAS_SHORTCUT_PERMISSION;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_QUIET_MODE_CHANGE_PERMISSION;
|
||||
import static com.android.launcher3.model.BgDataModel.Callbacks.FLAG_QUIET_MODE_ENABLED;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
|
||||
import android.os.Build;
|
||||
@@ -47,6 +48,7 @@ import com.android.launcher3.allapps.BaseAllAppsAdapter.AdapterItem;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
import com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -143,6 +145,10 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
|
||||
}
|
||||
|
||||
private void updateCurrentState(@WorkProfileState int currentState) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(WORK_TAB_MISSING, "WorkProfileManager#updateCurrentState: " +
|
||||
currentState, new Throwable());
|
||||
}
|
||||
mCurrentState = currentState;
|
||||
if (getAH() != null) {
|
||||
getAH().mAppsList.updateAdapterItems();
|
||||
@@ -161,6 +167,10 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
|
||||
* Creates and attaches for profile toggle button to {@link ActivityAllAppsContainerView}
|
||||
*/
|
||||
public boolean attachWorkModeSwitch() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(WORK_TAB_MISSING, "ActivityAllAppsContainerView#attachWorkModeSwitch "
|
||||
+ "mWorkModeSwitch: " + mWorkModeSwitch);
|
||||
}
|
||||
if (!mAllApps.getAppsStore().hasModelFlag(
|
||||
FLAG_HAS_SHORTCUT_PERMISSION | FLAG_QUIET_MODE_CHANGE_PERMISSION)) {
|
||||
Log.e(TAG, "unable to attach work mode switch; Missing required permissions");
|
||||
|
||||
Reference in New Issue
Block a user