Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java |
=================================================================== |
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java |
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ContentBlockerContentProvider.java |
@@ -28,24 +28,25 @@ import org.adblockplus.sbrowser.contentb |
import android.content.ContentProvider; |
import android.content.ContentValues; |
import android.content.Intent; |
import android.database.Cursor; |
import android.net.Uri; |
import android.os.Bundle; |
import android.os.ParcelFileDescriptor; |
+import android.support.annotation.NonNull; |
import android.util.Log; |
public class ContentBlockerContentProvider extends ContentProvider |
{ |
private static final String TAG = ContentBlockerContentProvider.class.getSimpleName(); |
@Override |
- public Bundle call(String method, String arg, Bundle extras) |
+ public Bundle call(@NonNull String method, String arg, Bundle extras) |
{ |
// As of SBC interface v1.4 we return `null` here to signal that we do not |
// use encryption |
return null; |
} |
private void setApplicationActivated() |
{ |
@@ -54,17 +55,17 @@ public class ContentBlockerContentProvid |
if (!applicationActivated) |
{ |
SharedPrefsUtils.putBoolean(this.getContext(), R.string.key_application_activated, true); |
} |
} |
@Override |
- public ParcelFileDescriptor openFile(final Uri uri, final String mode) |
+ public ParcelFileDescriptor openFile(@NonNull final Uri uri, @NonNull final String mode) |
throws FileNotFoundException |
{ |
try |
{ |
this.setApplicationActivated(); |
Log.d(TAG, "Writing filters..."); |
final File filterFile = Engine.getOrCreateCachedFilterFile(getContext()); |
Log.d(TAG, "Delivering filters..."); |
@@ -82,39 +83,39 @@ public class ContentBlockerContentProvid |
{ |
Log.i(TAG, "onCreate() called"); |
getContext().startService(new Intent(getContext(), EngineService.class)); |
Log.i(TAG, "Requested service startup"); |
return true; |
} |
@Override |
- public Cursor query(final Uri uri, final String[] projection, final String selection, |
+ public Cursor query(@NonNull final Uri uri, final String[] projection, final String selection, |
final String[] selectionArgs, final String sortOrder) |
{ |
return null; |
} |
@Override |
- public String getType(final Uri uri) |
- { |
- return null; |
- } |
- |
- @Override |
- public Uri insert(final Uri uri, final ContentValues values) |
+ public String getType(@NonNull final Uri uri) |
{ |
return null; |
} |
@Override |
- public int delete(final Uri uri, final String selection, final String[] selectionArgs) |
+ public Uri insert(@NonNull final Uri uri, final ContentValues values) |
+ { |
+ return null; |
+ } |
+ |
+ @Override |
+ public int delete(@NonNull final Uri uri, final String selection, final String[] selectionArgs) |
{ |
return 0; |
} |
@Override |
- public int update(final Uri uri, final ContentValues values, final String selection, |
+ public int update(@NonNull final Uri uri, final ContentValues values, final String selection, |
final String[] selectionArgs) |
{ |
return 0; |
} |
} |