Skip to content

Commit 458b89b

Browse files
committed
Added Android stubs
1 parent b160bad commit 458b89b

File tree

8 files changed

+656
-0
lines changed

8 files changed

+656
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (C) 2006 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 android.app;
18+
19+
import android.content.Intent;
20+
import android.os.Bundle;
21+
22+
public class Activity {
23+
24+
public void onCreate(Bundle bundle) {
25+
}
26+
27+
public Intent getIntent() {
28+
return null;
29+
}
30+
31+
public Object findViewById(int id) {
32+
return null;
33+
}
34+
35+
public void setContentView(int view) {
36+
}
37+
38+
}
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
/*
2+
* Copyright (C) 2006 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 android.content;
18+
19+
import android.net.Uri;
20+
import android.os.Bundle;
21+
22+
import java.io.PrintWriter;
23+
import java.net.URISyntaxException;
24+
import java.util.Set;
25+
26+
public class Intent implements Cloneable {
27+
28+
public static Intent createChooser(Intent target, CharSequence title) {
29+
return null;
30+
}
31+
32+
public Intent() {
33+
}
34+
35+
public Intent(Intent o) {
36+
}
37+
38+
@Override
39+
public Object clone() {
40+
return null;
41+
}
42+
43+
public Intent(String action) {
44+
}
45+
46+
public Intent(String action, Uri uri) {
47+
}
48+
49+
public Intent(Context packageContext, Class<?> cls) {
50+
}
51+
52+
public Intent(String action, Uri uri, Context packageContext, Class<?> cls) {
53+
}
54+
55+
public static Intent makeMainSelectorActivity(String selectorAction, String selectorCategory) {
56+
return null;
57+
}
58+
59+
public static Intent getIntent(String uri) throws URISyntaxException {
60+
return null;
61+
}
62+
63+
public static Intent getIntentOld(String uri) throws URISyntaxException {
64+
return null;
65+
}
66+
67+
public static void printIntentArgsHelp(PrintWriter pw, String prefix) {
68+
}
69+
70+
public boolean hasCategory(String category) {
71+
return false;
72+
}
73+
74+
public Set<String> getCategories() {
75+
return null;
76+
}
77+
78+
public int getContentUserHint() {
79+
return 0;
80+
}
81+
82+
public String getLaunchToken() {
83+
return null;
84+
}
85+
86+
public void setLaunchToken(String launchToken) {
87+
}
88+
89+
public boolean hasExtra(String name) {
90+
return false;
91+
}
92+
93+
public boolean hasFileDescriptors() {
94+
return false;
95+
}
96+
97+
public void setAllowFds(boolean allowFds) {
98+
}
99+
100+
public void setDefusable(boolean defusable) {
101+
}
102+
103+
public Object getExtra(String name) {
104+
return null;
105+
}
106+
107+
public boolean getBooleanExtra(String name, boolean defaultValue) {
108+
return false;
109+
}
110+
111+
public byte getByteExtra(String name, byte defaultValue) {
112+
return 0;
113+
}
114+
115+
public short getShortExtra(String name, short defaultValue) {
116+
return 0;
117+
}
118+
119+
public char getCharExtra(String name, char defaultValue) {
120+
return '0';
121+
}
122+
123+
public int getIntExtra(String name, int defaultValue) {
124+
return 0;
125+
}
126+
127+
public long getLongExtra(String name, long defaultValue) {
128+
return 0;
129+
}
130+
131+
public float getFloatExtra(String name, float defaultValue) {
132+
return 0;
133+
}
134+
135+
public double getDoubleExtra(String name, double defaultValue) {
136+
return 0;
137+
}
138+
139+
public String getStringExtra(String string) {
140+
return null;
141+
}
142+
143+
public void removeUnsafeExtras() {
144+
}
145+
146+
public boolean canStripForHistory() {
147+
return false;
148+
}
149+
150+
public Intent maybeStripForHistory() {
151+
return null;
152+
}
153+
154+
public boolean isExcludingStopped() {
155+
return false;
156+
}
157+
158+
public void removeCategory(String category) {
159+
}
160+
161+
public void prepareToLeaveUser(int userId) {
162+
}
163+
164+
public boolean filterEquals(Intent other) {
165+
return false;
166+
}
167+
168+
public int filterHashCode() {
169+
return 0;
170+
}
171+
172+
@Override
173+
public String toString() {
174+
return null;
175+
}
176+
177+
public String toInsecureString() {
178+
return null;
179+
}
180+
181+
public String toInsecureStringWithClip() {
182+
return null;
183+
}
184+
185+
public String toShortString(boolean secure, boolean comp, boolean extras, boolean clip) {
186+
return null;
187+
}
188+
189+
public void toShortString(StringBuilder b, boolean secure, boolean comp, boolean extras, boolean clip) {
190+
}
191+
192+
public Bundle getExtras() {
193+
return null;
194+
}
195+
196+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (C) 2007 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 android.os;
18+
19+
public final class Bundle {
20+
public Bundle() {
21+
}
22+
23+
public Bundle(ClassLoader loader) {
24+
}
25+
26+
public Bundle(int capacity) {
27+
}
28+
29+
public Bundle(Bundle b) {
30+
}
31+
32+
public static Bundle forPair(String key, String value) {
33+
return null;
34+
}
35+
36+
public boolean setAllowFds(boolean allowFds) {
37+
return false;
38+
}
39+
40+
public void setDefusable(boolean defusable) {
41+
}
42+
43+
public static Bundle setDefusable(Bundle bundle, boolean defusable) {
44+
return null;
45+
}
46+
47+
@Override
48+
public Object clone() {
49+
return null;
50+
}
51+
52+
public Bundle deepCopy() {
53+
return null;
54+
}
55+
56+
public void remove(String key) {
57+
}
58+
59+
public void putAll(Bundle bundle) {
60+
}
61+
62+
public int getSize() {
63+
return 0;
64+
}
65+
66+
public boolean hasFileDescriptors() {
67+
return false;
68+
}
69+
70+
public Bundle filterValues() {
71+
return null;
72+
}
73+
74+
@Override
75+
public synchronized String toString() {
76+
return null;
77+
}
78+
79+
public synchronized String toShortString() {
80+
return null;
81+
}
82+
83+
public String getString(String string) {
84+
return null;
85+
}
86+
87+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (C) 2006 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 android.util;
18+
19+
public interface AttributeSet {
20+
public int getAttributeCount();
21+
22+
default String getAttributeNamespace (int index) {
23+
return null;
24+
}
25+
26+
public String getAttributeName(int index);
27+
28+
public String getAttributeValue(int index);
29+
30+
public String getAttributeValue(String namespace, String name);
31+
32+
public String getPositionDescription();
33+
34+
public int getAttributeNameResource(int index);
35+
36+
public int getAttributeListValue(String namespace, String attribute,
37+
String[] options, int defaultValue);
38+
39+
public boolean getAttributeBooleanValue(String namespace, String attribute,
40+
boolean defaultValue);
41+
42+
public int getAttributeResourceValue(String namespace, String attribute,
43+
int defaultValue);
44+
45+
public int getAttributeIntValue(String namespace, String attribute,
46+
int defaultValue);
47+
48+
public int getAttributeUnsignedIntValue(String namespace, String attribute,
49+
int defaultValue);
50+
51+
public float getAttributeFloatValue(String namespace, String attribute,
52+
float defaultValue);
53+
54+
public int getAttributeListValue(int index, String[] options, int defaultValue);
55+
56+
public boolean getAttributeBooleanValue(int index, boolean defaultValue);
57+
58+
public int getAttributeResourceValue(int index, int defaultValue);
59+
60+
public int getAttributeIntValue(int index, int defaultValue);
61+
62+
public int getAttributeUnsignedIntValue(int index, int defaultValue);
63+
64+
public float getAttributeFloatValue(int index, float defaultValue);
65+
66+
public String getIdAttribute();
67+
68+
public String getClassAttribute();
69+
70+
public int getIdAttributeResourceValue(int defaultValue);
71+
72+
public int getStyleAttribute();
73+
74+
}

0 commit comments

Comments
 (0)