ITextServicesManager_Stub_Delegate.java revision f1dee199a009fec5e3a5d1469f654098261f8b06
1/*
2 * Copyright (C) 2011 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.internal.textservice;
18
19import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
20
21import android.os.Bundle;
22import android.os.IBinder;
23import android.os.RemoteException;
24import android.view.textservice.SpellCheckerInfo;
25import android.view.textservice.SpellCheckerSubtype;
26
27
28/**
29 * Delegate used to provide new implementation of a select few methods of
30 * {@link ITextServicesManager$Stub}
31 *
32 * Through the layoutlib_create tool, the original  methods of Stub have been replaced
33 * by calls to methods of the same name in this delegate class.
34 *
35 */
36public class ITextServicesManager_Stub_Delegate {
37
38    @LayoutlibDelegate
39    public static ITextServicesManager asInterface(IBinder obj) {
40        // ignore the obj and return a fake interface implementation
41        return new FakeTextServicesManager();
42    }
43
44    private static class FakeTextServicesManager implements ITextServicesManager {
45
46        public void finishSpellCheckerService(ISpellCheckerSessionListener arg0)
47                throws RemoteException {
48            // TODO Auto-generated method stub
49
50        }
51
52        public SpellCheckerInfo getCurrentSpellChecker(String arg0) throws RemoteException {
53            // TODO Auto-generated method stub
54            return null;
55        }
56
57        public SpellCheckerSubtype getCurrentSpellCheckerSubtype(String arg0, boolean arg1)
58                throws RemoteException {
59            // TODO Auto-generated method stub
60            return null;
61        }
62
63        public SpellCheckerInfo[] getEnabledSpellCheckers() throws RemoteException {
64            // TODO Auto-generated method stub
65            return null;
66        }
67
68        public void getSpellCheckerService(String arg0, String arg1,
69                ITextServicesSessionListener arg2, ISpellCheckerSessionListener arg3, Bundle arg4)
70                throws RemoteException {
71            // TODO Auto-generated method stub
72
73        }
74
75        public boolean isSpellCheckerEnabled() throws RemoteException {
76            // TODO Auto-generated method stub
77            return false;
78        }
79
80        public void setCurrentSpellChecker(String arg0, String arg1) throws RemoteException {
81            // TODO Auto-generated method stub
82
83        }
84
85        public void setCurrentSpellCheckerSubtype(String arg0, int arg1) throws RemoteException {
86            // TODO Auto-generated method stub
87
88        }
89
90        public void setSpellCheckerEnabled(boolean arg0) throws RemoteException {
91            // TODO Auto-generated method stub
92
93        }
94
95        public IBinder asBinder() {
96            // TODO Auto-generated method stub
97            return null;
98        }
99
100    }
101 }
102