Commit 5ac6612a authored by twellington's avatar twellington Committed by Commit bot

[Home] Update util methods to open bookmarks/downloads/history

Downloads, history and bookmarks all have utility methods that open
their UIs. When Chrome Home is enabled, opening these UIs should
open the bottom sheet and show the corresponding BottomSheetContent.
Typed urls (e.g. chrome://history) will still open as native pages
rather than in the sheet.

Also adds tests for the BottomSheetContentController.

BUG=716250

Review-Url: https://codereview.chromium.org/2861453002
Cr-Commit-Position: refs/heads/master@{#469349}
parent 644d16e8
......@@ -19,6 +19,7 @@ import org.chromium.base.VisibleForTesting;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.UrlConstants;
import org.chromium.chrome.browser.document.ChromeLauncherActivity;
......@@ -154,10 +155,13 @@ public class BookmarkUtils {
/**
* Shows bookmark main UI.
*/
public static void showBookmarkManager(Activity activity) {
public static void showBookmarkManager(ChromeActivity activity) {
String url = getFirstUrlToLoad(activity);
if (DeviceFormFactor.isTablet(activity)) {
if (activity.getBottomSheet() != null) {
activity.getBottomSheetContentController().showContentAndOpenSheet(
R.id.action_bookmarks);
} else if (DeviceFormFactor.isTablet(activity)) {
openUrl(activity, url, activity.getComponentName());
} else {
Intent intent = new Intent(activity, BookmarkActivity.class);
......
......@@ -30,6 +30,7 @@ import org.chromium.base.VisibleForTesting;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.UrlConstants;
......@@ -117,7 +118,12 @@ public class DownloadUtils {
}
Context appContext = ContextUtils.getApplicationContext();
if (DeviceFormFactor.isTablet(appContext)) {
if (activity instanceof ChromeActivity
&& ((ChromeActivity) activity).getBottomSheet() != null) {
((ChromeActivity) activity)
.getBottomSheetContentController()
.showContentAndOpenSheet(R.id.action_downloads);
} else if (DeviceFormFactor.isTablet(appContext)) {
// Download Home shows up as a tab on tablets.
LoadUrlParams params = new LoadUrlParams(UrlConstants.DOWNLOADS_URL);
if (tab == null || !tab.isInitialized()) {
......
......@@ -4,11 +4,12 @@
package org.chromium.chrome.browser.history;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.UrlConstants;
......@@ -38,16 +39,22 @@ public class HistoryManagerUtils {
}
/**
* Opens the browsing history manager.
*/
public static void showHistoryManager(Activity activity, Tab tab) {
* Opens the browsing history manager.
*
* @param activity The {@link ChromeActivity} that owns the {@link HistoryManager}.
* @param tab The {@link Tab} to used to display the native page version of the
* {@link HistoryManager}.
*/
public static void showHistoryManager(ChromeActivity activity, Tab tab) {
if (!isAndroidHistoryManagerEnabled()) {
tab.loadUrl(new LoadUrlParams(UrlConstants.HISTORY_URL, PageTransition.AUTO_TOPLEVEL));
return;
}
Context appContext = ContextUtils.getApplicationContext();
if (DeviceFormFactor.isTablet(appContext)) {
if (activity.getBottomSheet() != null) {
activity.getBottomSheetContentController().showContentAndOpenSheet(R.id.action_history);
} else if (DeviceFormFactor.isTablet(appContext)) {
// History shows up as a tab on tablets.
LoadUrlParams params = new LoadUrlParams(UrlConstants.NATIVE_HISTORY_URL);
tab.loadUrl(params);
......
......@@ -4,9 +4,8 @@
package org.chromium.chrome.browser.suggestions;
import android.app.Activity;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.NativePageHost;
import org.chromium.chrome.browser.UrlConstants;
import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
......@@ -39,13 +38,13 @@ public class SuggestionsNavigationDelegateImpl implements SuggestionsNavigationD
private static final String NEW_TAB_URL_HELP =
"https://support.google.com/chrome/?p=new_tab";
private final Activity mActivity;
private final ChromeActivity mActivity;
private final Profile mProfile;
private final NativePageHost mHost;
private final TabModelSelector mTabModelSelector;
public SuggestionsNavigationDelegateImpl(Activity activity, Profile profile,
public SuggestionsNavigationDelegateImpl(ChromeActivity activity, Profile profile,
NativePageHost host, TabModelSelector tabModelSelector) {
mActivity = activity;
mProfile = profile;
......
......@@ -106,6 +106,16 @@ public class BottomSheetContentController extends BottomNavigationView
// TODO(twellington): determine a policy for destroying the
// SuggestionsBottomSheetContent.
}
@Override
public void onSheetContentChanged(BottomSheetContent newContent) {
if (!mShouldOpenSheetOnNextContentChange) return;
mShouldOpenSheetOnNextContentChange = false;
if (!mBottomSheet.isSheetOpen()) {
mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_FULL, true);
}
}
};
private BottomSheet mBottomSheet;
......@@ -115,6 +125,7 @@ public class BottomSheetContentController extends BottomNavigationView
private int mSelectedItemId;
private boolean mDefaultContentInitialized;
private ChromeActivity mActivity;
private boolean mShouldOpenSheetOnNextContentChange;
public BottomSheetContentController(Context context, AttributeSet atts) {
super(context, atts);
......@@ -177,6 +188,19 @@ public class BottomSheetContentController extends BottomNavigationView
mDefaultContentInitialized = true;
}
/**
* Shows the specified {@link BottomSheetContent} and opens the {@link BottomSheet}.
* @param itemId The menu item id of the {@link BottomSheetContent} to show.
*/
public void showContentAndOpenSheet(int itemId) {
if (itemId != mSelectedItemId) {
mShouldOpenSheetOnNextContentChange = true;
selectItem(itemId);
} else if (!mBottomSheet.isSheetOpen()) {
mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_FULL, true);
}
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
if (mSelectedItemId == item.getItemId()) return false;
......@@ -258,10 +282,18 @@ public class BottomSheetContentController extends BottomNavigationView
* @param itemId The id of the MenuItem to select.
*/
@VisibleForTesting
public void selectItemForTests(int itemId) {
public void selectItem(int itemId) {
// TODO(twellington): A #setSelectedItemId() method was added to the support library
// recently. Replace this custom implementation with that method after
// the support library is rolled.
onNavigationItemSelected(getMenu().findItem(itemId));
}
@VisibleForTesting
public int getSelectedItemIdForTests() {
// TODO(twellington): A #getSelectedItemId() method was added to the support library
// recently. Replace this custom implementation with that method after
// the support library is rolled.
return mSelectedItemId;
}
}
......@@ -1639,6 +1639,7 @@ chrome_test_java_sources = [
"javatests/src/org/chromium/chrome/browser/widget/RadioButtonLayoutTest.java",
"javatests/src/org/chromium/chrome/browser/widget/RoundedIconGeneratorTest.java",
"javatests/src/org/chromium/chrome/browser/widget/ToolbarProgressBarTest.java",
"javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentControllerTest.java",
"javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetObserverTest.java",
"javatests/src/org/chromium/chrome/browser/widget/findinpage/FindTest.java",
"javatests/src/org/chromium/chrome/test/ParametersOnMultiTest.java",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.widget.bottomsheet;
import android.support.test.filters.SmallTest;
import org.chromium.base.ThreadUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.bookmarks.BookmarkSheetContent;
import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
import org.chromium.chrome.browser.download.DownloadSheetContent;
import org.chromium.chrome.browser.download.DownloadUtils;
import org.chromium.chrome.browser.history.HistoryManagerUtils;
import org.chromium.chrome.browser.history.HistorySheetContent;
import org.chromium.chrome.browser.suggestions.SuggestionsBottomSheetContent;
import org.chromium.chrome.test.BottomSheetTestCaseBase;
import java.util.concurrent.TimeoutException;
/** This class tests the functionality of the {@link BottomSheetContentController}. */
public class BottomSheetContentControllerTest extends BottomSheetTestCaseBase {
@Override
protected void setUp() throws Exception {
super.setUp();
setSheetState(BottomSheet.SHEET_STATE_PEEK, false);
}
@SmallTest
public void testSelectContent() throws InterruptedException, TimeoutException {
int contentChangedCount = mObserver.mContentChangedCallbackHelper.getCallCount();
int openedCount = mObserver.mOpenedCallbackHelper.getCallCount();
int closedCount = mObserver.mClosedCallbackHelper.getCallCount();
setSheetState(BottomSheet.SHEET_STATE_HALF, false);
mObserver.mOpenedCallbackHelper.waitForCallback(openedCount, 1);
openedCount++;
assertEquals(contentChangedCount, mObserver.mContentChangedCallbackHelper.getCallCount());
assertEquals(closedCount, mObserver.mClosedCallbackHelper.getCallCount());
selectBottomSheetContent(R.id.action_history);
mObserver.mContentChangedCallbackHelper.waitForCallback(contentChangedCount, 1);
contentChangedCount++;
assertEquals(openedCount, mObserver.mOpenedCallbackHelper.getCallCount());
assertEquals(closedCount, mObserver.mClosedCallbackHelper.getCallCount());
assertTrue(mBottomSheet.getCurrentSheetContent() instanceof HistorySheetContent);
assertEquals(
R.id.action_history, mBottomSheetContentController.getSelectedItemIdForTests());
setSheetState(BottomSheet.SHEET_STATE_PEEK, false);
mObserver.mOpenedCallbackHelper.waitForCallback(closedCount, 1);
mObserver.mContentChangedCallbackHelper.waitForCallback(contentChangedCount, 1);
assertEquals(openedCount, mObserver.mOpenedCallbackHelper.getCallCount());
assertTrue(mBottomSheet.getCurrentSheetContent() instanceof SuggestionsBottomSheetContent);
assertEquals(R.id.action_home, mBottomSheetContentController.getSelectedItemIdForTests());
}
@SmallTest
public void testShowContentAndOpenSheet_Bookmarks()
throws InterruptedException, TimeoutException {
int initialContentChangedCount = mObserver.mContentChangedCallbackHelper.getCallCount();
int initialOpenedCount = mObserver.mOpenedCallbackHelper.getCallCount();
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
BookmarkUtils.showBookmarkManager(getActivity());
}
});
mObserver.mContentChangedCallbackHelper.waitForCallback(initialContentChangedCount, 1);
mObserver.mOpenedCallbackHelper.waitForCallback(initialOpenedCount, 1);
assertTrue(mBottomSheet.getCurrentSheetContent() instanceof BookmarkSheetContent);
assertEquals(
R.id.action_bookmarks, mBottomSheetContentController.getSelectedItemIdForTests());
}
@SmallTest
public void testShowContentAndOpenSheet_Downloads()
throws InterruptedException, TimeoutException {
int initialContentChangedCount = mObserver.mContentChangedCallbackHelper.getCallCount();
int initialOpenedCount = mObserver.mOpenedCallbackHelper.getCallCount();
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
DownloadUtils.showDownloadManager(getActivity(), getActivity().getActivityTab());
}
});
mObserver.mContentChangedCallbackHelper.waitForCallback(initialContentChangedCount, 1);
mObserver.mOpenedCallbackHelper.waitForCallback(initialOpenedCount, 1);
assertTrue(mBottomSheet.getCurrentSheetContent() instanceof DownloadSheetContent);
assertEquals(
R.id.action_downloads, mBottomSheetContentController.getSelectedItemIdForTests());
}
@SmallTest
public void testShowContentAndOpenSheet_History()
throws InterruptedException, TimeoutException {
int initialContentChangedCount = mObserver.mContentChangedCallbackHelper.getCallCount();
int initialOpenedCount = mObserver.mOpenedCallbackHelper.getCallCount();
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
HistoryManagerUtils.showHistoryManager(
getActivity(), getActivity().getActivityTab());
}
});
mObserver.mContentChangedCallbackHelper.waitForCallback(initialContentChangedCount, 1);
mObserver.mOpenedCallbackHelper.waitForCallback(initialOpenedCount, 1);
assertTrue(mBottomSheet.getCurrentSheetContent() instanceof HistorySheetContent);
assertEquals(
R.id.action_history, mBottomSheetContentController.getSelectedItemIdForTests());
}
}
......@@ -13,84 +13,12 @@ import org.chromium.chrome.browser.download.DownloadSheetContent;
import org.chromium.chrome.browser.history.HistorySheetContent;
import org.chromium.chrome.browser.suggestions.SuggestionsBottomSheetContent;
import org.chromium.chrome.browser.util.MathUtils;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetContent;
import org.chromium.chrome.test.BottomSheetTestCaseBase;
import java.util.concurrent.TimeoutException;
/** This class tests the functionality of the {@link BottomSheetObserver}. */
public class BottomSheetObserverTest extends BottomSheetTestCaseBase {
/** A handle to the sheet's observer. */
private TestBottomSheetObserver mObserver;
/** An observer used to record events that occur with respect to the bottom sheet. */
private static class TestBottomSheetObserver implements BottomSheetObserver {
/** A {@link CallbackHelper} that can wait for the bottom sheet to be closed. */
private final CallbackHelper mClosedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the bottom sheet to be opened. */
private final CallbackHelper mOpenedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onTransitionPeekToHalf event. */
private final CallbackHelper mPeekToHalfCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onOffsetChanged event. */
private final CallbackHelper mOffsetChangedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onSheetContentChanged event. */
private final CallbackHelper mContentChangedCallbackHelper = new CallbackHelper();
/** The last value that the onTransitionPeekToHalf event sent. */
private float mLastPeekToHalfValue;
/** The last value that the onOffsetChanged event sent. */
private float mLastOffsetChangedValue;
@Override
public void onTransitionPeekToHalf(float fraction) {
mLastPeekToHalfValue = fraction;
mPeekToHalfCallbackHelper.notifyCalled();
}
@Override
public void onSheetOffsetChanged(float heightFraction) {
mLastOffsetChangedValue = heightFraction;
mOffsetChangedCallbackHelper.notifyCalled();
}
@Override
public void onSheetOpened() {
mOpenedCallbackHelper.notifyCalled();
}
@Override
public void onSheetClosed() {
mClosedCallbackHelper.notifyCalled();
}
@Override
public void onSheetReleased() {}
@Override
public void onLoadUrl(String url) {}
@Override
public void onSheetStateChanged(int newState) {}
@Override
public void onSheetContentChanged(BottomSheetContent newContent) {
mContentChangedCallbackHelper.notifyCalled();
}
}
@Override
protected void setUp() throws Exception {
super.setUp();
mObserver = new TestBottomSheetObserver();
mBottomSheet.addObserver(mObserver);
}
/**
* Test that the onSheetClosed event is triggered if the sheet is closed without animation.
*/
......@@ -180,19 +108,19 @@ public class BottomSheetObserverTest extends BottomSheetTestCaseBase {
int callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(peekHeight);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(0f, mObserver.mLastOffsetChangedValue, MathUtils.EPSILON);
assertEquals(0f, mObserver.getLastOffsetChangedValue(), MathUtils.EPSILON);
// When in the full state, the transition value should be 1.
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(fullHeight);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(1f, mObserver.mLastOffsetChangedValue, MathUtils.EPSILON);
assertEquals(1f, mObserver.getLastOffsetChangedValue(), MathUtils.EPSILON);
// Halfway between peek and full should send 0.5.
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(midPeekFull);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(0.5f, mObserver.mLastOffsetChangedValue, MathUtils.EPSILON);
assertEquals(0.5f, mObserver.getLastOffsetChangedValue(), MathUtils.EPSILON);
}
/**
......@@ -213,20 +141,20 @@ public class BottomSheetObserverTest extends BottomSheetTestCaseBase {
int callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(peekHeight);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(0f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON);
assertEquals(0f, mObserver.getLastPeekToHalfValue(), MathUtils.EPSILON);
// When in between peek and half states, the transition value should be 0.5.
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(midPeekHalf);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(0.5f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON);
assertEquals(0.5f, mObserver.getLastPeekToHalfValue(), MathUtils.EPSILON);
// After jumping to the full state (skipping the half state), the event should have
// triggered once more with a max value of 1.
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(fullHeight);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(1f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON);
assertEquals(1f, mObserver.getLastPeekToHalfValue(), MathUtils.EPSILON);
// Moving from full to somewhere between half and full should not trigger the event.
callbackCount = callbackHelper.getCallCount();
......@@ -237,13 +165,13 @@ public class BottomSheetObserverTest extends BottomSheetTestCaseBase {
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(midPeekHalf);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(0.5f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON);
assertEquals(0.5f, mObserver.getLastPeekToHalfValue(), MathUtils.EPSILON);
// At the half state the event should send 1.
callbackCount = callbackHelper.getCallCount();
setSheetOffsetFromBottom(halfHeight);
callbackHelper.waitForCallback(callbackCount, 1);
assertEquals(1f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON);
assertEquals(1f, mObserver.getLastPeekToHalfValue(), MathUtils.EPSILON);
}
/**
......
......@@ -10,6 +10,7 @@ import android.os.Build;
import android.support.v7.widget.RecyclerView;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.base.test.util.Restriction;
......@@ -18,6 +19,7 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetContent;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentController;
import org.chromium.chrome.browser.widget.bottomsheet.EmptyBottomSheetObserver;
import org.chromium.chrome.test.util.browser.RecyclerViewTestUtils;
/**
......@@ -27,6 +29,70 @@ import org.chromium.chrome.test.util.browser.RecyclerViewTestUtils;
@Restriction(RESTRICTION_TYPE_PHONE) // ChromeHome is only enabled on phones
@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP_MR1)
public abstract class BottomSheetTestCaseBase extends ChromeTabbedActivityTestBase {
/** A handle to the sheet's observer. */
protected TestBottomSheetObserver mObserver;
/** An observer used to record events that occur with respect to the bottom sheet. */
protected static class TestBottomSheetObserver extends EmptyBottomSheetObserver {
/** A {@link CallbackHelper} that can wait for the bottom sheet to be closed. */
public final CallbackHelper mClosedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the bottom sheet to be opened. */
public final CallbackHelper mOpenedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onTransitionPeekToHalf event. */
public final CallbackHelper mPeekToHalfCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onOffsetChanged event. */
public final CallbackHelper mOffsetChangedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onSheetContentChanged event. */
public final CallbackHelper mContentChangedCallbackHelper = new CallbackHelper();
/** The last value that the onTransitionPeekToHalf event sent. */
private float mLastPeekToHalfValue;
/** The last value that the onOffsetChanged event sent. */
private float mLastOffsetChangedValue;
@Override
public void onTransitionPeekToHalf(float fraction) {
mLastPeekToHalfValue = fraction;
mPeekToHalfCallbackHelper.notifyCalled();
}
@Override
public void onSheetOffsetChanged(float heightFraction) {
mLastOffsetChangedValue = heightFraction;
mOffsetChangedCallbackHelper.notifyCalled();
}
@Override
public void onSheetOpened() {
mOpenedCallbackHelper.notifyCalled();
}
@Override
public void onSheetClosed() {
mClosedCallbackHelper.notifyCalled();
}
@Override
public void onSheetContentChanged(BottomSheetContent newContent) {
mContentChangedCallbackHelper.notifyCalled();
}
/** @return The last value passed in to {@link #onTransitionPeekToHalf(float)}. */
public float getLastPeekToHalfValue() {
return mLastPeekToHalfValue;
}
/** @return The last value passed in to {@link #onSheetOffsetChanged(float)}. */
public float getLastOffsetChangedValue() {
return mLastOffsetChangedValue;
}
}
/** A handle to the bottom sheet. */
protected BottomSheet mBottomSheet;
......@@ -60,6 +126,9 @@ public abstract class BottomSheetTestCaseBase extends ChromeTabbedActivityTestBa
mBottomSheet = getActivity().getBottomSheet();
mBottomSheetContentController = getActivity().getBottomSheetContentController();
mObserver = new TestBottomSheetObserver();
mBottomSheet.addObserver(mObserver);
}
@Override
......@@ -112,7 +181,7 @@ public abstract class BottomSheetTestCaseBase extends ChromeTabbedActivityTestBa
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
mBottomSheetContentController.selectItemForTests(itemId);
mBottomSheetContentController.selectItem(itemId);
}
});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment