public static int noteOpNoThrow(@NonNull Context context, @NonNull String op, int uid,
                                    @NonNull String packageName) {
        if (SDK_INT >= 19) {
            AppOpsManager appOpsManager =
                    (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
            return Api19Impl.noteOpNoThrow(appOpsManager, op, uid, packageName);
        } else {
            return MODE_IGNORED;
        }
    }
Like {@link #noteOp} but instead of throwing a {@link SecurityException} it
returns {@link #MODE_ERRORED}.
<p>
<strong>Compatibility</strong>
<ul>
<li>On API 18 and lower, this method always returns {@link #MODE_IGNORED}
</ul>
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/AppOpsManagerCompat.java