Adding tracing for work profile removal

Bug: 159671700
Change-Id: I6e1bcdfbf1bbaab989106ce2979575652a3fb404
This commit is contained in:
Samuel Fufa
2020-07-27 12:15:53 -07:00
parent a8c08584a7
commit cfec6b5151
3 changed files with 12 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
import android.os.Process;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;
import android.widget.TextView;
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.WorkModeSwitch;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.views.WorkEduView;
import org.junit.After;
@@ -132,6 +134,10 @@ public class WorkTabTest extends AbstractLauncherUiTest {
l.getResources().getString(R.string.work_profile_edu_personal_apps));
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
waitForLauncherCondition("Launcher did not show the next edu screen", l ->
((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage() == WORK_PAGE