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

Change-Id: I333372699b263d02cc4083289dc746c7aacd414d
This commit is contained in:
Tony Mak
2017-06-12 18:02:53 +01:00
parent c37e0c1e47
commit 3bef8ce30a
6 changed files with 134 additions and 12 deletions

View File

@@ -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;