compat/src/main/java/androidx/core/app/AppOpsManagerCompat.java
public static int noteProxyOpNoThrow(@NonNull Context context, @NonNull String op,
            @NonNull String proxiedPackageName) {
        if (SDK_INT >= 23) {
            AppOpsManager appOpsManager = context.getSystemService(AppOpsManager.class);
            return appOpsManager.noteProxyOpNoThrow(op, proxiedPackageName);
        } else {
            return MODE_IGNORED;
        }
    }
/**
     * Like {@link #noteProxyOp(Context, String, String)} but instead
     * of throwing a {@link SecurityException} it returns {@link #MODE_ERRORED}.
     * <p>
     * <strong>Compatibility</strong>
     * <ul>
     * <li>On API 22 and lower, this method always returns {@link #MODE_IGNORED}
     * </ul>
     */
Like  #noteProxyOp(Context, String, String) but instead
of throwing a  SecurityException it returns  #MODE_ERRORED.

Compatibility

On API 22 and lower, this method always returns  #MODE_IGNORED

Like #noteProxyOp ( Context String String ) but instead of throwing a SecurityException it returns #MODE_ERRORED . Compatibility On API 22 and lower this method always returns #MODE_IGNORED
public static int noteProxyOpNoThrow(@NonNull Context context, @NonNull String op,
            @NonNull String proxiedPackageName) {
        if (SDK_INT >= 23) {
            AppOpsManager appOpsManager = context.getSystemService(AppOpsManager.class);
            return appOpsManager.noteProxyOpNoThrow(op, proxiedPackageName);
        } else {
            return MODE_IGNORED;
        }
    }
public static int noteProxyOpNoThrow ( @ NonNull Context context , @ NonNull String op , @ NonNull String proxiedPackageName ) { if ( SDK_INT >= 23 ) { AppOpsManager appOpsManager = context . getSystemService ( AppOpsManager . class ) ; return appOpsManager . noteProxyOpNoThrow ( op , proxiedPackageName ) ; } else { return MODE_IGNORED ; } }
Like {@link #noteProxyOp(Context, String, String)} but instead
 of throwing a {@link SecurityException} it returns {@link #MODE_ERRORED}.
Like { @link #noteProxyOp ( Context String String ) } but instead of throwing a { @link SecurityException } it returns { @link #MODE_ERRORED } .