From 9f0981dc4ff84e157b879a66aeaed88fe6ac7706 Mon Sep 17 00:00:00 2001 From: "sfufa@google.com" Date: Wed, 6 Oct 2021 15:56:46 -0700 Subject: [PATCH] [Work profile][Test] Remove tracing logs for testWorkeduFlow Bug: 159671700 Test: NA Change-Id: I097134c45155f0e65ef4376fab803796f3fdb12a --- src/com/android/launcher3/allapps/AllAppsContainerView.java | 5 ----- src/com/android/launcher3/pm/UserCache.java | 5 ----- src/com/android/launcher3/testing/TestProtocol.java | 1 - .../com/android/launcher3/ui/AbstractLauncherUiTest.java | 2 -- tests/src/com/android/launcher3/ui/WorkProfileTest.java | 6 ------ 5 files changed, 19 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 9bb4b25fdc..f154dd49ac 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -63,7 +63,6 @@ import com.android.launcher3.allapps.search.SearchAdapterProvider; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.keyboard.FocusedItemDecorator; import com.android.launcher3.model.data.AppInfo; -import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.Themes; import com.android.launcher3.views.RecyclerViewFastScroller; @@ -482,10 +481,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo int layout = showTabs ? R.layout.all_apps_tabs : R.layout.all_apps_rv_layout; View newView = getLayoutInflater().inflate(layout, this, false); addView(newView, index); - if (TestProtocol.sDebugTracing) { - Log.d(TestProtocol.WORK_PROFILE_REMOVED, "should show tabs:" + showTabs, - new Exception()); - } if (showTabs) { mViewPager = (AllAppsPagedView) newView; mViewPager.initParentViews(this); diff --git a/src/com/android/launcher3/pm/UserCache.java b/src/com/android/launcher3/pm/UserCache.java index 5ade22be5e..5aab41a8a2 100644 --- a/src/com/android/launcher3/pm/UserCache.java +++ b/src/com/android/launcher3/pm/UserCache.java @@ -21,10 +21,8 @@ import android.content.Intent; import android.os.UserHandle; import android.os.UserManager; import android.util.ArrayMap; -import android.util.Log; import android.util.LongSparseArray; -import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.MainThreadInitializedObject; import com.android.launcher3.util.SafeCloseable; import com.android.launcher3.util.SimpleBroadcastReceiver; @@ -60,9 +58,6 @@ public class UserCache { private void onUsersChanged(Intent intent) { enableAndResetCache(); mUserChangeListeners.forEach(Runnable::run); - if (TestProtocol.sDebugTracing) { - Log.d(TestProtocol.WORK_PROFILE_REMOVED, "profile changed", new Exception()); - } } /** diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java index ce01d4e5c6..f9a6133d75 100644 --- a/src/com/android/launcher3/testing/TestProtocol.java +++ b/src/com/android/launcher3/testing/TestProtocol.java @@ -117,7 +117,6 @@ public final class TestProtocol { public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation"; public static final String PERMANENT_DIAG_TAG = "TaplTarget"; - public static final String WORK_PROFILE_REMOVED = "b/159671700"; public static final String TASK_VIEW_ID_CRASH = "b/195430732"; public static final String NO_DROP_TARGET = "b/195031154"; public static final String NULL_INT_SET = "b/200572078"; diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index b6b6cdd5b7..0ffbeeb95e 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java @@ -262,8 +262,6 @@ public abstract class AbstractLauncherUiTest { if (userManager != null) { for (UserHandle userHandle : userManager.getUserProfiles()) { if (!userHandle.isSystem()) { - Log.d(TestProtocol.WORK_PROFILE_REMOVED, - "removing user " + userHandle.getIdentifier()); mDevice.executeShellCommand("pm remove-user " + userHandle.getIdentifier()); } } diff --git a/tests/src/com/android/launcher3/ui/WorkProfileTest.java b/tests/src/com/android/launcher3/ui/WorkProfileTest.java index 2d9ed19453..fcb0b7fec4 100644 --- a/tests/src/com/android/launcher3/ui/WorkProfileTest.java +++ b/tests/src/com/android/launcher3/ui/WorkProfileTest.java @@ -22,7 +22,6 @@ import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import android.util.Log; import android.view.View; import com.android.launcher3.R; @@ -32,7 +31,6 @@ import com.android.launcher3.allapps.WorkAdapterProvider; import com.android.launcher3.allapps.WorkEduCard; import com.android.launcher3.allapps.WorkProfileManager; import com.android.launcher3.tapl.LauncherInstrumentation; -import com.android.launcher3.testing.TestProtocol; import org.junit.After; import org.junit.Before; @@ -57,14 +55,11 @@ public class WorkProfileTest extends AbstractLauncherUiTest { String[] tokens = output.split("\\s+"); mProfileUserId = Integer.parseInt(tokens[tokens.length - 1]); - Log.d(TestProtocol.WORK_PROFILE_REMOVED, "Created new user uid" + mProfileUserId); mDevice.executeShellCommand("am start-user " + mProfileUserId); } @After public void removeWorkProfile() throws Exception { - Log.d(TestProtocol.WORK_PROFILE_REMOVED, "(teardown) removing uid" + mProfileUserId, - new Exception()); mDevice.executeShellCommand("pm remove-user " + mProfileUserId); } @@ -75,7 +70,6 @@ public class WorkProfileTest extends AbstractLauncherUiTest { return; } launcher.getAppsView().getAppsStore().disableDeferUpdates(DEFER_UPDATES_TEST); - Log.d(TestProtocol.WORK_PROFILE_REMOVED, "resuming AppStore updates"); }); }