Loading core/java/android/database/CursorWindow.java +22 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,8 @@ import android.compat.annotation.UnsupportedAppUsage; import android.content.res.Resources; import android.database.sqlite.SQLiteClosable; import android.database.sqlite.SQLiteException; import android.os.Binder; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.os.Process; import android.util.Log; import android.util.LongSparseArray; import android.util.SparseIntArray; import dalvik.annotation.optimization.FastNative; import dalvik.system.CloseGuard; Loading @@ -44,6 +38,9 @@ import dalvik.system.CloseGuard; * consumer for reading. * </p> */ @android.ravenwood.annotation.RavenwoodKeepWholeClass @android.ravenwood.annotation.RavenwoodNativeSubstitutionClass( "com.android.hoststubgen.nativesubstitution.CursorWindow_host") public class CursorWindow extends SQLiteClosable implements Parcelable { private static final String STATS_TAG = "CursorWindowStats"; Loading @@ -61,7 +58,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { private int mStartPos; private final String mName; private final CloseGuard mCloseGuard = CloseGuard.get(); private final CloseGuard mCloseGuard; // May throw CursorWindowAllocationException private static native long nativeCreate(String name, int cursorWindowSize); Loading Loading @@ -147,7 +144,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { if (mWindowPtr == 0) { throw new AssertionError(); // Not possible, the native code won't return it. } mCloseGuard.open("CursorWindow.close"); mCloseGuard = createCloseGuard(); } /** Loading Loading @@ -175,7 +172,18 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { throw new AssertionError(); // Not possible, the native code won't return it. } mName = nativeGetName(mWindowPtr); mCloseGuard.open("CursorWindow.close"); mCloseGuard = createCloseGuard(); } @android.ravenwood.annotation.RavenwoodReplace private CloseGuard createCloseGuard() { final CloseGuard closeGuard = CloseGuard.get(); closeGuard.open("CursorWindow.close"); return closeGuard; } private CloseGuard createCloseGuard$ravenwood() { return null; } @Override Loading Loading @@ -749,6 +757,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { dispose(); } @android.ravenwood.annotation.RavenwoodReplace private static int getCursorWindowSize() { if (sCursorWindowSize < 0) { // The cursor window size. resource xml file specifies the value in kB. Loading @@ -759,6 +768,10 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { return sCursorWindowSize; } private static int getCursorWindowSize$ravenwood() { return 1024; } @Override public String toString() { return getName() + " {" + Long.toHexString(mWindowPtr) + "}"; Loading core/java/android/database/SQLException.java +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.database; /** * An exception that indicates there was an error with SQL parsing or execution. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class SQLException extends RuntimeException { public SQLException() { } Loading core/java/android/database/sqlite/SQLiteClosable.java +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import java.io.Closeable; * * This class implements a primitive reference counting scheme for database objects. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class SQLiteClosable implements Closeable { @UnsupportedAppUsage private int mReferenceCount = 1; Loading core/java/android/database/sqlite/SQLiteException.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.database.SQLException; /** * A SQLite exception that indicates there was an error with SQL parsing or execution. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class SQLiteException extends SQLException { public SQLiteException() { } Loading core/tests/coretests/Android.bp +3 −1 Original line number Diff line number Diff line Loading @@ -202,12 +202,14 @@ android_ravenwood_test { "testng", ], srcs: [ "src/android/database/CursorWindowTest.java", "src/android/os/**/*.java", "src/com/android/internal/os/**/*.java", "src/android/util/**/*.java", "src/com/android/internal/os/**/*.java", "src/com/android/internal/os/LongArrayMultiStateCounterTest.java", "src/com/android/internal/util/**/*.java", "src/com/android/internal/power/EnergyConsumerStatsTest.java", ":FrameworksCoreTests{.aapt.srcjar}", ":FrameworksCoreTests-aidl", ":FrameworksCoreTests-helpers", Loading Loading
core/java/android/database/CursorWindow.java +22 −9 Original line number Diff line number Diff line Loading @@ -22,14 +22,8 @@ import android.compat.annotation.UnsupportedAppUsage; import android.content.res.Resources; import android.database.sqlite.SQLiteClosable; import android.database.sqlite.SQLiteException; import android.os.Binder; import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.os.Process; import android.util.Log; import android.util.LongSparseArray; import android.util.SparseIntArray; import dalvik.annotation.optimization.FastNative; import dalvik.system.CloseGuard; Loading @@ -44,6 +38,9 @@ import dalvik.system.CloseGuard; * consumer for reading. * </p> */ @android.ravenwood.annotation.RavenwoodKeepWholeClass @android.ravenwood.annotation.RavenwoodNativeSubstitutionClass( "com.android.hoststubgen.nativesubstitution.CursorWindow_host") public class CursorWindow extends SQLiteClosable implements Parcelable { private static final String STATS_TAG = "CursorWindowStats"; Loading @@ -61,7 +58,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { private int mStartPos; private final String mName; private final CloseGuard mCloseGuard = CloseGuard.get(); private final CloseGuard mCloseGuard; // May throw CursorWindowAllocationException private static native long nativeCreate(String name, int cursorWindowSize); Loading Loading @@ -147,7 +144,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { if (mWindowPtr == 0) { throw new AssertionError(); // Not possible, the native code won't return it. } mCloseGuard.open("CursorWindow.close"); mCloseGuard = createCloseGuard(); } /** Loading Loading @@ -175,7 +172,18 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { throw new AssertionError(); // Not possible, the native code won't return it. } mName = nativeGetName(mWindowPtr); mCloseGuard.open("CursorWindow.close"); mCloseGuard = createCloseGuard(); } @android.ravenwood.annotation.RavenwoodReplace private CloseGuard createCloseGuard() { final CloseGuard closeGuard = CloseGuard.get(); closeGuard.open("CursorWindow.close"); return closeGuard; } private CloseGuard createCloseGuard$ravenwood() { return null; } @Override Loading Loading @@ -749,6 +757,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { dispose(); } @android.ravenwood.annotation.RavenwoodReplace private static int getCursorWindowSize() { if (sCursorWindowSize < 0) { // The cursor window size. resource xml file specifies the value in kB. Loading @@ -759,6 +768,10 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { return sCursorWindowSize; } private static int getCursorWindowSize$ravenwood() { return 1024; } @Override public String toString() { return getName() + " {" + Long.toHexString(mWindowPtr) + "}"; Loading
core/java/android/database/SQLException.java +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.database; /** * An exception that indicates there was an error with SQL parsing or execution. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class SQLException extends RuntimeException { public SQLException() { } Loading
core/java/android/database/sqlite/SQLiteClosable.java +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import java.io.Closeable; * * This class implements a primitive reference counting scheme for database objects. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class SQLiteClosable implements Closeable { @UnsupportedAppUsage private int mReferenceCount = 1; Loading
core/java/android/database/sqlite/SQLiteException.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.database.SQLException; /** * A SQLite exception that indicates there was an error with SQL parsing or execution. */ @android.ravenwood.annotation.RavenwoodKeepWholeClass public class SQLiteException extends SQLException { public SQLiteException() { } Loading
core/tests/coretests/Android.bp +3 −1 Original line number Diff line number Diff line Loading @@ -202,12 +202,14 @@ android_ravenwood_test { "testng", ], srcs: [ "src/android/database/CursorWindowTest.java", "src/android/os/**/*.java", "src/com/android/internal/os/**/*.java", "src/android/util/**/*.java", "src/com/android/internal/os/**/*.java", "src/com/android/internal/os/LongArrayMultiStateCounterTest.java", "src/com/android/internal/util/**/*.java", "src/com/android/internal/power/EnergyConsumerStatsTest.java", ":FrameworksCoreTests{.aapt.srcjar}", ":FrameworksCoreTests-aidl", ":FrameworksCoreTests-helpers", Loading