am 184016aa: Merge "TIF: Build the list of available TV inputs as the current user" into mnc-dev

* commit '184016aac08c31eb9c3f8539fb362ed2dfb30a93':
  TIF: Build the list of available TV inputs as the current user
This commit is contained in:
Jae Seo
2015-05-21 05:36:47 +00:00
committed by Android Git Automerger

View File

@@ -288,9 +288,10 @@ public final class TvInputManagerService extends SystemService {
if (DEBUG) Slog.d(TAG, "buildTvInputList"); if (DEBUG) Slog.d(TAG, "buildTvInputList");
PackageManager pm = mContext.getPackageManager(); PackageManager pm = mContext.getPackageManager();
List<ResolveInfo> services = pm.queryIntentServices( List<ResolveInfo> services = pm.queryIntentServicesAsUser(
new Intent(TvInputService.SERVICE_INTERFACE), new Intent(TvInputService.SERVICE_INTERFACE),
PackageManager.GET_SERVICES | PackageManager.GET_META_DATA); PackageManager.GET_SERVICES | PackageManager.GET_META_DATA,
userId);
List<TvInputInfo> inputList = new ArrayList<TvInputInfo>(); List<TvInputInfo> inputList = new ArrayList<TvInputInfo>();
for (ResolveInfo ri : services) { for (ResolveInfo ri : services) {
ServiceInfo si = ri.serviceInfo; ServiceInfo si = ri.serviceInfo;