Revert "Revert "Support highlightable Settings homepage menu for 2-pane""

This reverts commit 096c090b80.

Reason for revert: crash is fixed in this change

Bug: 202510128
Test: manual, build
Change-Id: Ifff8d58cfdcf43e123b11dee308665b2617cb4b3
This commit is contained in:
Jason Chiu
2021-10-12 17:24:34 +08:00
parent 5a7966884b
commit 29a09e55ba
18 changed files with 781 additions and 91 deletions

View File

@@ -43,7 +43,6 @@ import android.os.UserManager;
import androidx.fragment.app.FragmentActivity;
import androidx.preference.Preference;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.dashboard.DashboardFeatureProviderImpl;
import com.android.settings.testutils.shadow.ShadowAccountManager;
import com.android.settings.testutils.shadow.ShadowUserManager;
@@ -151,9 +150,9 @@ public class AccountDetailDashboardFragmentTest {
final FragmentActivity activity = Robolectric.setupActivity(FragmentActivity.class);
final Preference preference = new Preference(mContext);
dashboardFeatureProvider.bindPreferenceToTileAndGetObservers(activity,
false /* forceRoundedIcon */, MetricsProto.MetricsEvent.DASHBOARD_SUMMARY,
preference, tile, null /* key */, Preference.DEFAULT_ORDER);
dashboardFeatureProvider.bindPreferenceToTileAndGetObservers(activity, mFragment,
false /* forceRoundedIcon */, preference, tile, null /* key */,
Preference.DEFAULT_ORDER);
assertThat(preference.getKey()).isEqualTo(tile.getKey(mContext));
preference.performClick();