in java/com/facebook/soloader/SoLoader.java [585:607]
private static int getAppType(Context context, int flags) {
if (sAppType != AppType.UNSET) {
return sAppType;
}
if ((flags & SOLOADER_DONT_TREAT_AS_SYSTEMAPP) != 0 || context == null) {
return AppType.THIRD_PARTY_APP;
}
final int type;
final ApplicationInfo appInfo = context.getApplicationInfo();
if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
type = AppType.THIRD_PARTY_APP;
} else if ((appInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
type = AppType.UPDATED_SYSTEM_APP;
} else {
type = AppType.SYSTEM_APP;
}
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "ApplicationInfo.flags is: " + appInfo.flags + " appType is: " + type);
}
return type;
}