FileDocCategorySizeDatePackage
SenderFilter.javaAPI DocAndroid 5.1 API4750Thu Mar 12 22:22:42 GMT 2015com.android.server.firewall

SenderFilter

public class SenderFilter extends Object

Fields Summary
private static final String
ATTR_TYPE
private static final String
VAL_SIGNATURE
private static final String
VAL_SYSTEM
private static final String
VAL_SYSTEM_OR_SIGNATURE
private static final String
VAL_USER_ID
public static final FilterFactory
FACTORY
private static final Filter
SIGNATURE
private static final Filter
SYSTEM
private static final Filter
SYSTEM_OR_SIGNATURE
private static final Filter
USER_ID
Constructors Summary
Methods Summary
static booleanisPrivilegedApp(int callerUid, int callerPid)


          
        if (callerUid == Process.SYSTEM_UID || callerUid == 0 ||
                callerPid == Process.myPid() || callerPid == 0) {
            return true;
        }

        IPackageManager pm = AppGlobals.getPackageManager();
        try {
            return (pm.getFlagsForUid(callerUid) & ApplicationInfo.FLAG_PRIVILEGED) != 0;
        } catch (RemoteException ex) {
            Slog.e(IntentFirewall.TAG, "Remote exception while retrieving uid flags",
                    ex);
        }

        return false;