is ApplicationInfo a System App - Android android.content.pm

Android examples for android.content.pm:ApplicationInfo

Description

is ApplicationInfo a System App

Demo Code

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;
    }//  w  w w  .j  av a2 s .c  o  m

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

    return false;
  }

}

Related Tutorials