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