Support highlighting the menu entry for Search results
1. Add a receiver to monitor the search state 2. Shoe/hide the menu highlight in the listener 3. Highlight the menu entry in SearchResultTrampoline 4. Enable/disable the receiver in SettingsInitialize Bug: 205781792 Test: manual, robotest Change-Id: Ia04901f504172f4f0c7b4b2ea7eda5f3713f676d
This commit is contained in:
@@ -16,17 +16,17 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
|
||||
import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
|
||||
import com.android.settings.homepage.SettingsHomepageActivity;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/** Settings application which sets up activity embedding rules for the large screen device. */
|
||||
public class SettingsApplication extends Application {
|
||||
|
||||
private WeakReference<Activity> mHomeActivity = new WeakReference<>(null);
|
||||
private WeakReference<SettingsHomepageActivity> mHomeActivity = new WeakReference<>(null);
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
@@ -37,11 +37,11 @@ public class SettingsApplication extends Application {
|
||||
controller.initRules();
|
||||
}
|
||||
|
||||
public void setHomeActivity(Activity homeActivity) {
|
||||
public void setHomeActivity(SettingsHomepageActivity homeActivity) {
|
||||
mHomeActivity = new WeakReference<>(homeActivity);
|
||||
}
|
||||
|
||||
public Activity getHomeActivity() {
|
||||
public SettingsHomepageActivity getHomeActivity() {
|
||||
return mHomeActivity.get();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user