github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/clients/android/src/org/camlistore/DummyNullCallback.java (about) 1 /* 2 Copyright 2011 Google 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 17 package org.camlistore; 18 19 import android.os.RemoteException; 20 21 /** 22 * No-op callback for service to use when it doesn't have a real callback. 23 * Avoids a lot of null checks. 24 */ 25 public class DummyNullCallback extends IStatusCallback.Stub { 26 27 private static final IStatusCallback.Stub mInstance = new DummyNullCallback(); 28 29 public static IStatusCallback.Stub instance() { 30 return mInstance; 31 } 32 33 @Override 34 public void logToClient(String stuff) throws RemoteException { 35 } 36 37 @Override 38 public void setByteStatus(long done, int inFlight, long total) throws RemoteException { 39 } 40 41 @Override 42 public void setUploading(boolean uploading) throws RemoteException { 43 } 44 45 @Override 46 public void setUploadStatusText(String text) throws RemoteException { 47 } 48 49 @Override 50 public void setFileStatus(int done, int inFlight, int total) throws RemoteException { 51 } 52 53 @Override 54 public void setUploadStatsText(String text) throws RemoteException { 55 } 56 }