SenderPackageFilterpublic class SenderPackageFilter extends Object implements Filter
Fields Summary |
---|
private static final String | ATTR_NAME | public final String | mPackageName | public static final FilterFactory | FACTORY |
Constructors Summary |
---|
public SenderPackageFilter(String packageName)
mPackageName = packageName;
|
Methods Summary |
---|
public boolean | matches(IntentFirewall ifw, android.content.ComponentName resolvedComponent, android.content.Intent intent, int callerUid, int callerPid, java.lang.String resolvedType, int receivingUid)
IPackageManager pm = AppGlobals.getPackageManager();
int packageUid = -1;
try {
packageUid = pm.getPackageUid(mPackageName, UserHandle.USER_OWNER);
} catch (RemoteException ex) {
// handled below
}
if (packageUid == -1) {
return false;
}
return UserHandle.isSameApp(packageUid, callerUid);
|
|