Fix searching work app in settings
Test: m -j RunSettingsRoboTests
Test: Observe search result with badged icon and showing work app info
when tapping on it.
Test: personal app search result is still working
Test: Non app search result is working
Fix: 62366873
Merged-in: I333372699b263d02cc4083289dc746c7aacd414d
Change-Id: I333372699b263d02cc4083289dc746c7aacd414d
(cherry picked from commit 3bef8ce30a)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
package com.android.settings.search;
|
||||
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.os.UserHandle;
|
||||
|
||||
public class AppSearchResult extends SearchResult {
|
||||
/**
|
||||
@@ -30,6 +31,10 @@ public class AppSearchResult extends SearchResult {
|
||||
info = builder.mInfo;
|
||||
}
|
||||
|
||||
public UserHandle getAppUserHandle() {
|
||||
return new UserHandle(UserHandle.getUserId(info.uid));
|
||||
}
|
||||
|
||||
public static class Builder extends SearchResult.Builder {
|
||||
protected ApplicationInfo mInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user