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