Merge "Adding tracing for work profile removal" into ub-launcher3-rvc-qpr-dev
This commit is contained in:
commit
0cfcdc2170
3 files changed
+12
No files matched your search
@@ -21,8 +21,10 @@ import android.content.Intent;
|
|||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.LongSparseArray;
|
import android.util.LongSparseArray;
|
||||||
|
|
||||||
|
import com.android.launcher3.testing.TestProtocol;
|
||||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||||
import com.android.launcher3.util.SafeCloseable;
|
import com.android.launcher3.util.SafeCloseable;
|
||||||
import com.android.launcher3.util.SimpleBroadcastReceiver;
|
import com.android.launcher3.util.SimpleBroadcastReceiver;
|
||||||
@@ -102,6 +104,9 @@ public class UserCache {
|
|||||||
mUsers = null;
|
mUsers = null;
|
||||||
mUserToSerialMap = null;
|
mUserToSerialMap = null;
|
||||||
}
|
}
|
||||||
|
if (TestProtocol.sDebugTracing) {
|
||||||
|
Log.d(TestProtocol.WORK_PROFILE_REMOVED, "Work profile removed", new Exception());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,4 +106,5 @@ public final class TestProtocol {
|
|||||||
public static final String PAUSE_NOT_DETECTED = "b/139891609";
|
public static final String PAUSE_NOT_DETECTED = "b/139891609";
|
||||||
public static final String OVERIEW_NOT_ALLAPPS = "b/156095088";
|
public static final String OVERIEW_NOT_ALLAPPS = "b/156095088";
|
||||||
public static final String NO_SWIPE_TO_HOME = "b/158017601";
|
public static final String NO_SWIPE_TO_HOME = "b/158017601";
|
||||||
|
public static final String WORK_PROFILE_REMOVED = "b/159671700";
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
|
|||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
|
import android.util.Log;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.test.filters.LargeTest;
|
import androidx.test.filters.LargeTest;
|
||||||
@@ -34,6 +35,7 @@ import com.android.launcher3.allapps.AllAppsContainerView;
|
|||||||
import com.android.launcher3.allapps.AllAppsPagedView;
|
import com.android.launcher3.allapps.AllAppsPagedView;
|
||||||
import com.android.launcher3.allapps.WorkModeSwitch;
|
import com.android.launcher3.allapps.WorkModeSwitch;
|
||||||
import com.android.launcher3.dragndrop.DragLayer;
|
import com.android.launcher3.dragndrop.DragLayer;
|
||||||
|
import com.android.launcher3.testing.TestProtocol;
|
||||||
import com.android.launcher3.views.WorkEduView;
|
import com.android.launcher3.views.WorkEduView;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
@@ -132,6 +134,10 @@ public class WorkTabTest extends AbstractLauncherUiTest {
|
|||||||
l.getResources().getString(R.string.work_profile_edu_personal_apps));
|
l.getResources().getString(R.string.work_profile_edu_personal_apps));
|
||||||
workEduView.findViewById(R.id.proceed).callOnClick();
|
workEduView.findViewById(R.id.proceed).callOnClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
executeOnLauncher(launcher -> Log.d(TestProtocol.WORK_PROFILE_REMOVED,
|
||||||
|
"Work profile status: " + launcher.getAppsView().isPersonalTabVisible()));
|
||||||
|
|
||||||
// verify work edu is seen next
|
// verify work edu is seen next
|
||||||
waitForLauncherCondition("Launcher did not show the next edu screen", l ->
|
waitForLauncherCondition("Launcher did not show the next edu screen", l ->
|
||||||
((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage() == WORK_PAGE
|
((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage() == WORK_PAGE
|
||||||
|
|||||||
Reference in new issue
Block a user