BridgeContentProvider.java revision c2e9651bf386a1f7bf7fc706cf5424950570470c
1/* 2 * Copyright (C) 2010 The Android Open Source Project 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 17package com.android.layoutlib.bridge.android; 18 19import android.content.ContentProviderOperation; 20import android.content.ContentProviderResult; 21import android.content.ContentValues; 22import android.content.IContentProvider; 23import android.content.OperationApplicationException; 24import android.content.res.AssetFileDescriptor; 25import android.database.Cursor; 26import android.database.CursorWindow; 27import android.database.IBulkCursor; 28import android.database.IContentObserver; 29import android.net.Uri; 30import android.os.Bundle; 31import android.os.IBinder; 32import android.os.ParcelFileDescriptor; 33import android.os.RemoteException; 34 35import java.io.FileNotFoundException; 36import java.util.ArrayList; 37 38/** 39 * Mock implementation of {@link IContentProvider}. 40 * 41 * TODO: never return null when the method is not supposed to. Return fake data instead. 42 */ 43public final class BridgeContentProvider implements IContentProvider { 44 45 public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> arg0) 46 throws RemoteException, OperationApplicationException { 47 // TODO Auto-generated method stub 48 return null; 49 } 50 51 public int bulkInsert(Uri arg0, ContentValues[] arg1) throws RemoteException { 52 // TODO Auto-generated method stub 53 return 0; 54 } 55 56 public IBulkCursor bulkQuery(Uri arg0, String[] arg1, String arg2, String[] arg3, 57 String arg4, IContentObserver arg5, CursorWindow arg6) throws RemoteException { 58 // TODO Auto-generated method stub 59 return null; 60 } 61 62 public Bundle call(String arg0, String arg1, Bundle arg2) throws RemoteException { 63 // TODO Auto-generated method stub 64 return null; 65 } 66 67 public int delete(Uri arg0, String arg1, String[] arg2) throws RemoteException { 68 // TODO Auto-generated method stub 69 return 0; 70 } 71 72 public String getType(Uri arg0) throws RemoteException { 73 // TODO Auto-generated method stub 74 return null; 75 } 76 77 public Uri insert(Uri arg0, ContentValues arg1) throws RemoteException { 78 // TODO Auto-generated method stub 79 return null; 80 } 81 82 public AssetFileDescriptor openAssetFile(Uri arg0, String arg1) throws RemoteException, 83 FileNotFoundException { 84 // TODO Auto-generated method stub 85 return null; 86 } 87 88 public ParcelFileDescriptor openFile(Uri arg0, String arg1) throws RemoteException, 89 FileNotFoundException { 90 // TODO Auto-generated method stub 91 return null; 92 } 93 94 public Cursor query(Uri arg0, String[] arg1, String arg2, String[] arg3, String arg4) 95 throws RemoteException { 96 // TODO Auto-generated method stub 97 return null; 98 } 99 100 public int update(Uri arg0, ContentValues arg1, String arg2, String[] arg3) 101 throws RemoteException { 102 // TODO Auto-generated method stub 103 return 0; 104 } 105 106 public IBinder asBinder() { 107 // TODO Auto-generated method stub 108 return null; 109 } 110 111 public String[] getStreamTypes(Uri arg0, String arg1) throws RemoteException { 112 // TODO Auto-generated method stub 113 return null; 114 } 115 116 public AssetFileDescriptor openTypedAssetFile(Uri arg0, String arg1, Bundle arg2) 117 throws RemoteException, FileNotFoundException { 118 // TODO Auto-generated method stub 119 return null; 120 } 121 122} 123