Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ddf54fe authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Annotate native methods that can be @FastNative as such" into main

parents 19baad69 ab815f9a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,8 @@ package android.os;
import android.compat.annotation.UnsupportedAppUsage;
import android.compat.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import android.system.ErrnoException;


import dalvik.annotation.optimization.FastNative;

import java.io.FileDescriptor;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStream;
@@ -41,8 +43,10 @@ public class MemoryFile {
    private static String TAG = "MemoryFile";
    private static String TAG = "MemoryFile";


    // Returns 'true' if purged, 'false' otherwise
    // Returns 'true' if purged, 'false' otherwise
    @FastNative
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private static native boolean native_pin(FileDescriptor fd, boolean pin) throws IOException;
    private static native boolean native_pin(FileDescriptor fd, boolean pin) throws IOException;
    @FastNative
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    private static native int native_get_size(FileDescriptor fd) throws IOException;
    private static native int native_get_size(FileDescriptor fd) throws IOException;