Search in sources :

Example 1 with AttributionSource

use of android.content.AttributionSource in project robolectric by robolectric.

the class ShadowAppOpsManager method noteProxyOpNoThrow.

@RequiresApi(api = Build.VERSION_CODES.S)
@Implementation(minSdk = Build.VERSION_CODES.S)
protected int noteProxyOpNoThrow(Object op, Object attributionSource, Object message, Object ignoredSkipProxyOperation) {
    Preconditions.checkArgument(op instanceof Integer);
    Preconditions.checkArgument(attributionSource instanceof AttributionSource);
    Preconditions.checkArgument(message == null || message instanceof String);
    Preconditions.checkArgument(ignoredSkipProxyOperation instanceof Boolean);
    AttributionSource castedAttributionSource = (AttributionSource) attributionSource;
    return noteProxyOpNoThrow((int) op, castedAttributionSource.getNextPackageName(), castedAttributionSource.getNextUid(), castedAttributionSource.getNextAttributionTag(), (String) message);
}
Also used : AttributionSource(android.content.AttributionSource) RequiresApi(androidx.annotation.RequiresApi) Implementation(org.robolectric.annotation.Implementation)

Aggregations

AttributionSource (android.content.AttributionSource)1 RequiresApi (androidx.annotation.RequiresApi)1 Implementation (org.robolectric.annotation.Implementation)1