/app/src/main/java/com/github/mobile/sync/ContentProviderAdapter.java

https://bitbucket.org/penkzhou/android · Java · 59 lines · 33 code · 8 blank · 18 comment · 0 complexity · 9309d37ce6816deda8feca06efc809a5 MD5 · raw file

  1. /*
  2. * Copyright 2012 GitHub Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.github.mobile.sync;
  17. import android.content.ContentProvider;
  18. import android.content.ContentValues;
  19. import android.database.Cursor;
  20. import android.net.Uri;
  21. /**
  22. * Content provider adapter that does nothing
  23. */
  24. public class ContentProviderAdapter extends ContentProvider {
  25. @Override
  26. public int delete(Uri uri, String selection, String[] selectionArgs) {
  27. return 0;
  28. }
  29. @Override
  30. public String getType(Uri uri) {
  31. return null;
  32. }
  33. @Override
  34. public Uri insert(Uri uri, ContentValues values) {
  35. return null;
  36. }
  37. @Override
  38. public boolean onCreate() {
  39. return true;
  40. }
  41. @Override
  42. public Cursor query(Uri uri, String[] projection, String selection,
  43. String[] selectionArgs, String sortOrder) {
  44. return null;
  45. }
  46. @Override
  47. public int update(Uri uri, ContentValues values, String selection,
  48. String[] selectionArgs) {
  49. return 0;
  50. }
  51. }