is System App from ApplicationInfo - Android App

Android examples for App:App Information

Description

is System App from ApplicationInfo

Demo Code


//package com.java2s;

import android.content.pm.ApplicationInfo;

public class Main {

    public static boolean isSystemApp(ApplicationInfo appInfo) {
        if ((appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
            return true;
        }/*from  w  ww.j  a  v  a  2s.  c om*/

        if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
            return true;
        }

        return false;
    }
}

Related Tutorials