@NonNull
This commit is contained in:
parent
67d999b831
commit
c6054bb256
|
@ -9,6 +9,7 @@ import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.provider.BaseColumns;
|
import android.provider.BaseColumns;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import org.torproject.android.ui.hs.database.HSDatabase;
|
import org.torproject.android.ui.hs.database.HSDatabase;
|
||||||
|
@ -43,7 +44,7 @@ public class HSContentProvider extends ContentProvider {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
public Cursor query(@NonNull Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
||||||
//Si es una consulta a un ID concreto construimos el WHERE
|
//Si es una consulta a un ID concreto construimos el WHERE
|
||||||
String where = selection;
|
String where = selection;
|
||||||
if (uriMatcher.match(uri) == ONION_ID) {
|
if (uriMatcher.match(uri) == ONION_ID) {
|
||||||
|
@ -58,7 +59,7 @@ public class HSContentProvider extends ContentProvider {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public String getType(Uri uri) {
|
public String getType(@NonNull Uri uri) {
|
||||||
int match = uriMatcher.match(uri);
|
int match = uriMatcher.match(uri);
|
||||||
|
|
||||||
switch (match) {
|
switch (match) {
|
||||||
|
@ -73,7 +74,7 @@ public class HSContentProvider extends ContentProvider {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Uri insert(Uri uri, ContentValues values) {
|
public Uri insert(@NonNull Uri uri, ContentValues values) {
|
||||||
long regId;
|
long regId;
|
||||||
|
|
||||||
SQLiteDatabase db = mServerDB.getWritableDatabase();
|
SQLiteDatabase db = mServerDB.getWritableDatabase();
|
||||||
|
@ -86,7 +87,7 @@ public class HSContentProvider extends ContentProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int delete(Uri uri, String selection, String[] selectionArgs) {
|
public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) {
|
||||||
|
|
||||||
//Si es una consulta a un ID concreto construimos el WHERE
|
//Si es una consulta a un ID concreto construimos el WHERE
|
||||||
String where = selection;
|
String where = selection;
|
||||||
|
@ -105,7 +106,7 @@ public class HSContentProvider extends ContentProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
public int update(@NonNull Uri uri, ContentValues values, String selection, String[] selectionArgs) {
|
||||||
SQLiteDatabase db = mServerDB.getWritableDatabase();
|
SQLiteDatabase db = mServerDB.getWritableDatabase();
|
||||||
|
|
||||||
String where = selection;
|
String where = selection;
|
||||||
|
|
Loading…
Reference in New Issue