Merge "Fix issue #25673462: Shamu update from MMB29J -> 29K does not complete"

This commit is contained in:
Dianne Hackborn
2015-11-18 19:07:43 +00:00
committed by Android (Google) Code Review
3 changed files with 16 additions and 5 deletions

View File

@@ -52,9 +52,21 @@ public class VoiceInteractionServiceInfo {
}
public VoiceInteractionServiceInfo(PackageManager pm, ComponentName comp, int userHandle)
throws PackageManager.NameNotFoundException, RemoteException {
this(pm, AppGlobals.getPackageManager().getServiceInfo(comp,
PackageManager.GET_META_DATA, userHandle));
throws PackageManager.NameNotFoundException {
this(pm, getServiceInfoOrThrow(comp, userHandle));
}
static ServiceInfo getServiceInfoOrThrow(ComponentName comp, int userHandle)
throws PackageManager.NameNotFoundException {
try {
ServiceInfo si = AppGlobals.getPackageManager().getServiceInfo(comp,
PackageManager.GET_META_DATA, userHandle);
if (si != null) {
return si;
}
} catch (RemoteException e) {
}
throw new PackageManager.NameNotFoundException(comp.toString());
}
public VoiceInteractionServiceInfo(PackageManager pm, ServiceInfo si) {