You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement more APIs
This commit is contained in:
@@ -3,7 +3,9 @@ package android.content;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
import android.database.AbstractCursor;
|
||||
import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
|
||||
@@ -23,4 +25,18 @@ public class ContentResolver {
|
||||
public ParcelFileDescriptor openFileDescriptor(Uri uri, String mode) throws FileNotFoundException {
|
||||
return ParcelFileDescriptor.open(new File(uri.uri), ParcelFileDescriptor.parseMode(mode));
|
||||
}
|
||||
|
||||
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
||||
return new AbstractCursor() {
|
||||
public int getCount() { return 0; }
|
||||
public String[] getColumnNames() { return new String[0]; }
|
||||
public String getString(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public short getShort(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public int getInt(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public long getLong(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public float getFloat(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public double getDouble(int column) { throw new IndexOutOfBoundsException(); }
|
||||
public boolean isNull(int column) { throw new IndexOutOfBoundsException(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user