Fix can't start injected item problem
Should set highlight Preference key after isDuplicateClick to ensure clicked Preference key & highlight Preference are different and then isDuplicateClick returns a correct value. Bug: 233553587 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.dashboard manual 1. Click all left pane items and see if there is any launch problem. 2. Check if duplicate click check works. Change-Id: Ic6394b96896fd3a0fb926707565f63beff74a27b
This commit is contained in:
@@ -185,9 +185,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
||||
&& ActivityEmbeddingUtils.isEmbeddingActivityEnabled(mContext)) {
|
||||
// Highlight the preference whenever it's clicked
|
||||
final TopLevelSettings topLevelSettings = (TopLevelSettings) fragment;
|
||||
topLevelSettings.setHighlightPreferenceKey(key);
|
||||
highlightMixin = topLevelSettings.getHighlightMixin();
|
||||
isDuplicateClick = topLevelSettings.isDuplicateClick(preference);
|
||||
topLevelSettings.setHighlightPreferenceKey(key);
|
||||
}
|
||||
launchIntentOrSelectProfile(activity, tile, intent, sourceMetricsCategory,
|
||||
highlightMixin, isDuplicateClick);
|
||||
|
Reference in New Issue
Block a user