Android.mk revision 1fd6e22b6a6c02f1c7a649a2c9caf419cf47e120
1#
2# Copyright (C) 2008 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#
16LOCAL_PATH := $(call my-dir)
17
18# We have a special case here where we build the library's resources
19# independently from its code, so we need to find where the resource
20# class source got placed in the course of building the resources.
21# Thus, the magic here.
22# Also, this module cannot depend directly on the R.java file; if it
23# did, the PRIVATE_* vars for R.java wouldn't be guaranteed to be correct.
24# Instead, it depends on the R.stamp file, which lists the corresponding
25# R.java file as a prerequisite.
26# TODO: find a more appropriate way to do this.
27framework_res_source_path := APPS/framework-res_intermediates/src
28
29# the library
30# ============================================================
31include $(CLEAR_VARS)
32
33# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
34LOCAL_SRC_FILES := $(call find-other-java-files,$(FRAMEWORKS_BASE_SUBDIRS))
35
36# EventLogTags files.
37LOCAL_SRC_FILES += \
38       core/java/android/content/EventLogTags.logtags \
39       core/java/android/speech/tts/EventLogTags.logtags \
40       core/java/android/webkit/EventLogTags.logtags \
41
42# The following filters out code we are temporarily not including at all.
43# TODO: Move AWT and beans (and associated harmony code) back into libcore.
44# TODO: Maybe remove javax.microedition entirely?
45# TODO: Move SyncML (org.mobilecontrol.*) into its own library.
46LOCAL_SRC_FILES := $(filter-out \
47			org/mobilecontrol/% \
48			,$(LOCAL_SRC_FILES))
49
50## READ ME: ########################################################
51##
52## When updating this list of aidl files, consider if that aidl is
53## part of the SDK API.  If it is, also add it to the list below that
54## is preprocessed and distributed with the SDK.  This list should
55## not contain any aidl files for parcelables, but the one below should
56## if you intend for 3rd parties to be able to send those objects
57## across process boundaries.
58##
59## READ ME: ########################################################
60LOCAL_SRC_FILES += \
61	core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl \
62	core/java/android/accessibilityservice/IAccessibilityServiceClient.aidl \
63	core/java/android/accounts/IAccountManager.aidl \
64	core/java/android/accounts/IAccountManagerResponse.aidl \
65	core/java/android/accounts/IAccountAuthenticator.aidl \
66	core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
67	core/java/android/app/IActivityController.aidl \
68	core/java/android/app/IActivityPendingResult.aidl \
69	core/java/android/app/IAlarmManager.aidl \
70	core/java/android/app/IBackupAgent.aidl \
71	core/java/android/app/IInstrumentationWatcher.aidl \
72	core/java/android/app/INotificationManager.aidl \
73	core/java/android/app/IProcessObserver.aidl \
74	core/java/android/app/ISearchManager.aidl \
75	core/java/android/app/ISearchManagerCallback.aidl \
76	core/java/android/app/IServiceConnection.aidl \
77	core/java/android/app/IThumbnailReceiver.aidl \
78	core/java/android/app/IThumbnailRetriever.aidl \
79	core/java/android/app/ITransientNotification.aidl \
80	core/java/android/app/IUiModeManager.aidl \
81	core/java/android/app/IWallpaperManager.aidl \
82	core/java/android/app/IWallpaperManagerCallback.aidl \
83	core/java/android/app/admin/IDevicePolicyManager.aidl \
84	core/java/android/app/backup/IBackupManager.aidl \
85	core/java/android/app/backup/IFullBackupRestoreObserver.aidl \
86	core/java/android/app/backup/IRestoreObserver.aidl \
87	core/java/android/app/backup/IRestoreSession.aidl \
88	core/java/android/bluetooth/IBluetooth.aidl \
89	core/java/android/bluetooth/IBluetoothA2dp.aidl \
90	core/java/android/bluetooth/IBluetoothCallback.aidl \
91	core/java/android/bluetooth/IBluetoothHeadset.aidl \
92	core/java/android/bluetooth/IBluetoothHeadsetPhone.aidl \
93	core/java/android/bluetooth/IBluetoothHealth.aidl \
94	core/java/android/bluetooth/IBluetoothHealthCallback.aidl \
95	core/java/android/bluetooth/IBluetoothInputDevice.aidl \
96	core/java/android/bluetooth/IBluetoothPan.aidl \
97	core/java/android/bluetooth/IBluetoothManager.aidl \
98	core/java/android/bluetooth/IBluetoothManagerCallback.aidl \
99	core/java/android/bluetooth/IBluetoothPbap.aidl \
100	core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \
101	core/java/android/content/IClipboard.aidl \
102	core/java/android/content/IContentService.aidl \
103	core/java/android/content/IIntentReceiver.aidl \
104	core/java/android/content/IIntentSender.aidl \
105	core/java/android/content/IOnPrimaryClipChangedListener.aidl \
106	core/java/android/content/ISyncAdapter.aidl \
107	core/java/android/content/ISyncContext.aidl \
108	core/java/android/content/ISyncStatusObserver.aidl \
109	core/java/android/content/pm/IPackageDataObserver.aidl \
110	core/java/android/content/pm/IPackageDeleteObserver.aidl \
111	core/java/android/content/pm/IPackageInstallObserver.aidl \
112	core/java/android/content/pm/IPackageManager.aidl \
113	core/java/android/content/pm/IPackageMoveObserver.aidl \
114	core/java/android/content/pm/IPackageStatsObserver.aidl \
115	core/java/android/database/IContentObserver.aidl \
116	core/java/android/hardware/ISerialManager.aidl \
117	core/java/android/hardware/display/IDisplayManager.aidl \
118	core/java/android/hardware/input/IInputManager.aidl \
119	core/java/android/hardware/input/IInputDevicesChangedListener.aidl \
120	core/java/android/hardware/usb/IUsbManager.aidl \
121	core/java/android/net/IConnectivityManager.aidl \
122	core/java/android/net/INetworkManagementEventObserver.aidl \
123	core/java/android/net/IThrottleManager.aidl \
124	core/java/android/net/INetworkPolicyListener.aidl \
125	core/java/android/net/INetworkPolicyManager.aidl \
126	core/java/android/net/INetworkStatsService.aidl \
127	core/java/android/net/INetworkStatsSession.aidl \
128	core/java/android/net/nsd/INsdManager.aidl \
129	core/java/android/nfc/INdefPushCallback.aidl \
130	core/java/android/nfc/INfcAdapter.aidl \
131	core/java/android/nfc/INfcAdapterExtras.aidl \
132	core/java/android/nfc/INfcTag.aidl \
133	core/java/android/os/ICancellationSignal.aidl \
134	core/java/android/os/IHardwareService.aidl \
135	core/java/android/os/IMessenger.aidl \
136	core/java/android/os/INetworkManagementService.aidl \
137	core/java/android/os/IPermissionController.aidl \
138	core/java/android/os/IPowerManager.aidl \
139	core/java/android/os/IRemoteCallback.aidl \
140	core/java/android/os/ISchedulingPolicyService.aidl \
141	core/java/android/os/IUpdateLock.aidl \
142        core/java/android/os/IUserManager.aidl \
143	core/java/android/os/IVibratorService.aidl \
144	core/java/android/service/dreams/IDreamManager.aidl \
145	core/java/android/service/dreams/IDreamService.aidl \
146	core/java/android/service/wallpaper/IWallpaperConnection.aidl \
147	core/java/android/service/wallpaper/IWallpaperEngine.aidl \
148	core/java/android/service/wallpaper/IWallpaperService.aidl \
149	core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl\
150	core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl\
151	core/java/android/view/accessibility/IAccessibilityManager.aidl \
152	core/java/android/view/accessibility/IAccessibilityManagerClient.aidl \
153	core/java/android/view/IApplicationToken.aidl \
154	core/java/android/view/IInputFilter.aidl \
155	core/java/android/view/IInputFilterHost.aidl \
156	core/java/android/view/IOnKeyguardExitResult.aidl \
157	core/java/android/view/IRotationWatcher.aidl \
158	core/java/android/view/IWindow.aidl \
159	core/java/android/view/IWindowManager.aidl \
160	core/java/android/view/IWindowSession.aidl \
161	core/java/android/speech/IRecognitionListener.aidl \
162	core/java/android/speech/IRecognitionService.aidl \
163	core/java/android/speech/tts/ITextToSpeechCallback.aidl \
164	core/java/android/speech/tts/ITextToSpeechService.aidl \
165	core/java/com/android/internal/app/IBatteryStats.aidl \
166	core/java/com/android/internal/app/IUsageStats.aidl \
167	core/java/com/android/internal/app/IMediaContainerService.aidl \
168	core/java/com/android/internal/appwidget/IAppWidgetService.aidl \
169	core/java/com/android/internal/appwidget/IAppWidgetHost.aidl \
170	core/java/com/android/internal/backup/IBackupTransport.aidl \
171	core/java/com/android/internal/policy/IFaceLockCallback.aidl \
172	core/java/com/android/internal/policy/IFaceLockInterface.aidl \
173	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
174	core/java/com/android/internal/os/IResultReceiver.aidl \
175	core/java/com/android/internal/statusbar/IStatusBar.aidl \
176	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
177	core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
178	core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
179	core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
180	core/java/com/android/internal/textservice/ITextServicesManager.aidl \
181	core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl \
182	core/java/com/android/internal/view/IInputContext.aidl \
183	core/java/com/android/internal/view/IInputContextCallback.aidl \
184	core/java/com/android/internal/view/IInputMethod.aidl \
185	core/java/com/android/internal/view/IInputMethodCallback.aidl \
186	core/java/com/android/internal/view/IInputMethodClient.aidl \
187	core/java/com/android/internal/view/IInputMethodManager.aidl \
188	core/java/com/android/internal/view/IInputMethodSession.aidl \
189	core/java/com/android/internal/widget/ILockSettings.aidl \
190	core/java/com/android/internal/widget/IRemoteViewsFactory.aidl \
191	core/java/com/android/internal/widget/IRemoteViewsAdapterConnection.aidl \
192	keystore/java/android/security/IKeyChainAliasCallback.aidl \
193	keystore/java/android/security/IKeyChainService.aidl \
194	location/java/android/location/ICountryDetector.aidl \
195	location/java/android/location/ICountryListener.aidl \
196	location/java/android/location/IGeocodeProvider.aidl \
197	location/java/android/location/IGpsStatusListener.aidl \
198	location/java/android/location/IGpsStatusProvider.aidl \
199	location/java/android/location/ILocationListener.aidl \
200	location/java/android/location/ILocationManager.aidl \
201	location/java/android/location/INetInitiatedListener.aidl \
202	location/java/com/android/internal/location/ILocationProvider.aidl \
203	media/java/android/media/IAudioService.aidl \
204	media/java/android/media/IAudioFocusDispatcher.aidl \
205	media/java/android/media/IAudioRoutesObserver.aidl \
206	media/java/android/media/IMediaScannerListener.aidl \
207	media/java/android/media/IMediaScannerService.aidl \
208	media/java/android/media/IRemoteControlClient.aidl \
209	media/java/android/media/IRemoteControlDisplay.aidl \
210	media/java/android/media/IRemoteVolumeObserver.aidl \
211	media/java/android/media/IRingtonePlayer.aidl \
212	telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
213	telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
214	telephony/java/com/android/internal/telephony/ITelephony.aidl \
215	telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
216	telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
217	telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl \
218	wifi/java/android/net/wifi/IWifiManager.aidl \
219	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
220	voip/java/android/net/sip/ISipSession.aidl \
221	voip/java/android/net/sip/ISipSessionListener.aidl \
222	voip/java/android/net/sip/ISipService.aidl
223#
224
225
226# FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
227LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
228
229LOCAL_INTERMEDIATE_SOURCES := \
230			$(framework_res_source_path)/android/R.java \
231			$(framework_res_source_path)/android/Manifest.java \
232			$(framework_res_source_path)/com/android/internal/R.java
233
234LOCAL_NO_STANDARD_LIBRARIES := true
235LOCAL_JAVA_LIBRARIES := bouncycastle core core-junit ext
236
237LOCAL_MODULE := framework
238LOCAL_MODULE_CLASS := JAVA_LIBRARIES
239
240# List of classes and interfaces which should be loaded by the Zygote.
241LOCAL_JAVA_RESOURCE_FILES += $(LOCAL_PATH)/preloaded-classes
242
243#LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
244
245LOCAL_DX_FLAGS := --core-library
246
247include $(BUILD_JAVA_LIBRARY)
248
249# Make sure that R.java and Manifest.java are built before we build
250# the source for this library.
251framework_res_R_stamp := \
252	$(call intermediates-dir-for,APPS,framework-res,,COMMON)/src/R.stamp
253$(full_classes_compiled_jar): $(framework_res_R_stamp)
254
255# Make sure that framework-res is installed when framework is.
256$(LOCAL_INSTALLED_MODULE): | $(dir $(LOCAL_INSTALLED_MODULE))framework-res.apk
257
258framework_built := $(call java-lib-deps,framework)
259
260# AIDL files to be preprocessed and included in the SDK,
261# relative to the root of the build tree.
262# ============================================================
263aidl_files := \
264	frameworks/base/core/java/android/accounts/IAccountManager.aidl \
265	frameworks/base/core/java/android/accounts/IAccountManagerResponse.aidl \
266	frameworks/base/core/java/android/accounts/IAccountAuthenticator.aidl \
267	frameworks/base/core/java/android/accounts/IAccountAuthenticatorResponse.aidl \
268	frameworks/base/core/java/android/app/Notification.aidl \
269	frameworks/base/core/java/android/app/PendingIntent.aidl \
270	frameworks/base/core/java/android/bluetooth/BluetoothDevice.aidl \
271	frameworks/base/core/java/android/bluetooth/BluetoothHealthAppConfiguration.aidl \
272	frameworks/base/core/java/android/content/ComponentName.aidl \
273	frameworks/base/core/java/android/content/Intent.aidl \
274	frameworks/base/core/java/android/content/IntentSender.aidl \
275	frameworks/base/core/java/android/content/PeriodicSync.aidl \
276	frameworks/base/core/java/android/content/SyncStats.aidl \
277	frameworks/base/core/java/android/content/res/Configuration.aidl \
278	frameworks/base/core/java/android/appwidget/AppWidgetProviderInfo.aidl \
279	frameworks/base/core/java/android/net/Uri.aidl \
280	frameworks/base/core/java/android/nfc/NdefMessage.aidl \
281	frameworks/base/core/java/android/nfc/NdefRecord.aidl \
282	frameworks/base/core/java/android/nfc/Tag.aidl \
283	frameworks/base/core/java/android/os/Bundle.aidl \
284	frameworks/base/core/java/android/os/DropBoxManager.aidl \
285	frameworks/base/core/java/android/os/ParcelFileDescriptor.aidl \
286	frameworks/base/core/java/android/os/ParcelUuid.aidl \
287	frameworks/base/core/java/android/view/KeyEvent.aidl \
288	frameworks/base/core/java/android/view/MotionEvent.aidl \
289	frameworks/base/core/java/android/view/Surface.aidl \
290	frameworks/base/core/java/android/view/WindowManager.aidl \
291	frameworks/base/core/java/android/widget/RemoteViews.aidl \
292	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
293	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSession.aidl \
294	frameworks/base/core/java/com/android/internal/textservice/ISpellCheckerSessionListener.aidl \
295	frameworks/base/core/java/com/android/internal/textservice/ITextServicesManager.aidl \
296	frameworks/base/core/java/com/android/internal/textservice/ITextServicesSessionListener.aidl \
297	frameworks/base/core/java/com/android/internal/view/IInputContext.aidl \
298	frameworks/base/core/java/com/android/internal/view/IInputMethod.aidl \
299	frameworks/base/core/java/com/android/internal/view/IInputMethodCallback.aidl \
300	frameworks/base/core/java/com/android/internal/view/IInputMethodClient.aidl \
301	frameworks/base/core/java/com/android/internal/view/IInputMethodManager.aidl \
302	frameworks/base/core/java/com/android/internal/view/IInputMethodSession.aidl \
303	frameworks/base/graphics/java/android/graphics/Bitmap.aidl \
304	frameworks/base/graphics/java/android/graphics/Rect.aidl \
305	frameworks/base/graphics/java/android/graphics/Region.aidl \
306	frameworks/base/location/java/android/location/Criteria.aidl \
307	frameworks/base/location/java/android/location/Geofence.aidl \
308	frameworks/base/location/java/android/location/Location.aidl \
309	frameworks/base/location/java/android/location/LocationRequest.aidl \
310	frameworks/base/location/java/com/android/internal/location/ProviderProperties.aidl \
311	frameworks/base/location/java/com/android/internal/location/ProviderRequest.aidl \
312	frameworks/base/telephony/java/android/telephony/ServiceState.aidl \
313	frameworks/base/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
314	frameworks/base/telephony/java/com/android/internal/telephony/ITelephony.aidl \
315
316gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
317$(gen): PRIVATE_SRC_FILES := $(aidl_files)
318ALL_SDK_FILES += $(gen)
319$(gen): $(aidl_files) | $(AIDL)
320		@echo Aidl Preprocess: $@
321		$(hide) $(AIDL) --preprocess $@ $(PRIVATE_SRC_FILES)
322
323# the documentation
324# ============================================================
325
326# TODO: deal with com/google/android/googleapps
327packages_to_document := \
328	android \
329	javax/microedition/khronos
330
331# Search through the base framework dirs for these packages.
332# The result will be relative to frameworks/base.
333fwbase_dirs_to_document := \
334	test-runner/src \
335	$(patsubst $(LOCAL_PATH)/%,%, \
336	  $(wildcard \
337	    $(foreach dir, $(FRAMEWORKS_BASE_JAVA_SRC_DIRS), \
338	      $(addprefix $(dir)/, $(packages_to_document)) \
339	     ) \
340	   ) \
341	 )
342
343# include definition of libcore_to_document
344include libcore/Docs.mk
345
346# include definition of junit_to_document
347include external/junit/Common.mk
348
349non_base_dirs := \
350	../../external/apache-http/src/org/apache/http \
351	../opt/telephony/src/java/android/telephony \
352	../opt/telephony/src/java/android/telephony/gsm \
353
354# These are relative to frameworks/base
355dirs_to_check_apis := \
356  $(fwbase_dirs_to_document) \
357	$(non_base_dirs)
358
359# These are relative to frameworks/base
360# FRAMEWORKS_BASE_SUBDIRS comes from build/core/pathmap.mk
361dirs_to_document := \
362	$(dirs_to_check_apis) \
363  $(addprefix ../../, $(FRAMEWORKS_SUPPORT_JAVA_SRC_DIRS))
364
365# These are relative to frameworks/base
366html_dirs := \
367	$(FRAMEWORKS_BASE_SUBDIRS) \
368	$(non_base_dirs)
369
370# Common sources for doc check and api check
371common_src_files := \
372	$(call find-other-html-files, $(html_dirs)) \
373	$(addprefix ../../libcore/, $(call libcore_to_document, $(LOCAL_PATH)/../../libcore)) \
374	$(addprefix ../../external/junit/, $(call junit_to_document, $(LOCAL_PATH)/../../external/junit))
375
376# These are relative to frameworks/base
377framework_docs_LOCAL_SRC_FILES := \
378	$(call find-other-java-files, $(dirs_to_document)) \
379	$(common_src_files)
380
381# These are relative to frameworks/base
382framework_docs_LOCAL_API_CHECK_SRC_FILES := \
383	$(call find-other-java-files, $(dirs_to_check_apis)) \
384	$(common_src_files)
385
386# This is used by ide.mk as the list of source files that are
387# always included.
388INTERNAL_SDK_SOURCE_DIRS := $(addprefix $(LOCAL_PATH)/,$(dirs_to_document))
389
390framework_docs_LOCAL_DROIDDOC_SOURCE_PATH := \
391	$(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
392
393framework_docs_LOCAL_INTERMEDIATE_SOURCES := \
394			$(framework_res_source_path)/android/R.java \
395			$(framework_res_source_path)/android/Manifest.java \
396			$(framework_res_source_path)/com/android/internal/R.java
397
398framework_docs_LOCAL_JAVA_LIBRARIES := \
399			bouncycastle \
400			core \
401			ext \
402			framework \
403			mms-common \
404			telephony-common \
405
406framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES
407framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html
408# The since flag (-since N.xml API_LEVEL) is used to add API Level information
409# to the reference documentation. Must be in order of oldest to newest.
410framework_docs_LOCAL_DROIDDOC_OPTIONS := \
411    -knowntags ./frameworks/base/docs/knowntags.txt \
412    -since ./frameworks/base/api/1.xml 1 \
413    -since ./frameworks/base/api/2.xml 2 \
414    -since ./frameworks/base/api/3.xml 3 \
415    -since ./frameworks/base/api/4.xml 4 \
416    -since ./frameworks/base/api/5.xml 5 \
417    -since ./frameworks/base/api/6.xml 6 \
418    -since ./frameworks/base/api/7.xml 7 \
419    -since ./frameworks/base/api/8.xml 8 \
420    -since ./frameworks/base/api/9.xml 9 \
421    -since ./frameworks/base/api/10.xml 10 \
422    -since ./frameworks/base/api/11.xml 11 \
423    -since ./frameworks/base/api/12.xml 12 \
424    -since ./frameworks/base/api/13.xml 13 \
425    -since ./frameworks/base/api/14.txt 14 \
426    -since ./frameworks/base/api/15.txt 15 \
427    -since ./frameworks/base/api/16.txt 16 \
428		-werror -hide 113 \
429		-overview $(LOCAL_PATH)/core/java/overview.html
430
431framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON)
432
433framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
434    frameworks/base/docs/knowntags.txt
435
436sample_dir := development/samples
437
438# the list here should match the list of samples included in the sdk samples package
439# (see development/build/sdk.atree)
440web_docs_sample_code_flags := \
441		-hdf android.hasSamples 1 \
442		-samplecode $(sample_dir)/AccelerometerPlay \
443		            resources/samples/AccelerometerPlay "Accelerometer Play" \
444		-samplecode $(sample_dir)/ActionBarCompat \
445		            resources/samples/ActionBarCompat "Action Bar Compatibility" \
446                -samplecode $(sample_dir)/AndroidBeamDemo \
447		            resources/samples/AndroidBeamDemo "Android Beam Demo" \
448		-samplecode $(sample_dir)/ApiDemos \
449		            resources/samples/ApiDemos "API Demos" \
450		-samplecode $(sample_dir)/Support4Demos \
451		            resources/samples/Support4Demos "API 4+ Support Demos" \
452		-samplecode $(sample_dir)/Support13Demos \
453		            resources/samples/Support13Demos "API 13+ Support Demos" \
454		-samplecode $(sample_dir)/BackupRestore \
455		            resources/samples/BackupRestore "Backup and Restore" \
456		-samplecode $(sample_dir)/BluetoothChat \
457		            resources/samples/BluetoothChat "Bluetooth Chat" \
458		-samplecode $(sample_dir)/BluetoothHDP \
459		            resources/samples/BluetoothHDP "Bluetooth HDP Demo" \
460		-samplecode $(sample_dir)/BusinessCard \
461		            resources/samples/BusinessCard "Business Card" \
462		-samplecode $(sample_dir)/ContactManager \
463		            resources/samples/ContactManager "Contact Manager" \
464		-samplecode $(sample_dir)/CubeLiveWallpaper \
465		            resources/samples/CubeLiveWallpaper "Cube Live Wallpaper" \
466		-samplecode $(sample_dir)/Home \
467		            resources/samples/Home "Home" \
468		-samplecode $(sample_dir)/HoneycombGallery \
469		            resources/samples/HoneycombGallery "Honeycomb Gallery" \
470		-samplecode $(sample_dir)/JetBoy \
471		            resources/samples/JetBoy "JetBoy" \
472		-samplecode $(sample_dir)/KeyChainDemo \
473		            resources/samples/KeyChainDemo "KeyChain Demo" \
474		-samplecode $(sample_dir)/LunarLander \
475		            resources/samples/LunarLander "Lunar Lander" \
476		-samplecode $(sample_dir)/training/ads-and-ux \
477		            resources/samples/training/ads-and-ux "Mobile Advertisement Integration" \
478		-samplecode $(sample_dir)/MultiResolution \
479		            resources/samples/MultiResolution "Multiple Resolutions" \
480		-samplecode $(sample_dir)/training/multiscreen/newsreader \
481		            resources/samples/newsreader "News Reader" \
482		-samplecode $(sample_dir)/NotePad \
483		            resources/samples/NotePad "Note Pad" \
484		-samplecode $(sample_dir)/SpellChecker/SampleSpellCheckerService \
485		            resources/samples/SpellChecker/SampleSpellCheckerService "Spell Checker Service" \
486		-samplecode $(sample_dir)/SpellChecker/HelloSpellChecker \
487		            resources/samples/SpellChecker/HelloSpellChecker "Spell Checker Client" \
488		-samplecode $(sample_dir)/SampleSyncAdapter \
489		            resources/samples/SampleSyncAdapter "Sample Sync Adapter" \
490		-samplecode $(sample_dir)/RandomMusicPlayer \
491		            resources/samples/RandomMusicPlayer "Random Music Player" \
492		-samplecode $(sample_dir)/RenderScript \
493		            resources/samples/RenderScript "RenderScript" \
494		-samplecode $(sample_dir)/SearchableDictionary \
495		            resources/samples/SearchableDictionary "Searchable Dictionary v2" \
496		-samplecode $(sample_dir)/SipDemo \
497		            resources/samples/SipDemo "SIP Demo" \
498		-samplecode $(sample_dir)/Snake \
499		            resources/samples/Snake "Snake" \
500		-samplecode $(sample_dir)/SoftKeyboard \
501		            resources/samples/SoftKeyboard "Soft Keyboard" \
502		-samplecode $(sample_dir)/Spinner  \
503		            resources/samples/Spinner "Spinner" \
504		-samplecode $(sample_dir)/SpinnerTest \
505		            resources/samples/SpinnerTest "SpinnerTest" \
506		-samplecode $(sample_dir)/StackWidget \
507		            resources/samples/StackWidget "StackView Widget" \
508		-samplecode $(sample_dir)/TicTacToeLib  \
509		            resources/samples/TicTacToeLib "TicTacToeLib" \
510		-samplecode $(sample_dir)/TicTacToeMain \
511		            resources/samples/TicTacToeMain "TicTacToeMain" \
512		-samplecode $(sample_dir)/ToyVpn \
513		            resources/samples/ToyVpn "Toy VPN Client" \
514		-samplecode $(sample_dir)/USB \
515		            resources/samples/USB "USB" \
516		-samplecode $(sample_dir)/WeatherListWidget \
517		            resources/samples/WeatherListWidget "Weather List Widget" \
518		-samplecode $(sample_dir)/WiFiDirectDemo \
519                            resources/samples/WiFiDirectDemo "Wi-Fi Direct Demo" \
520		-samplecode $(sample_dir)/Wiktionary \
521		            resources/samples/Wiktionary "Wiktionary" \
522		-samplecode $(sample_dir)/WiktionarySimple \
523		            resources/samples/WiktionarySimple "Wiktionary (Simplified)" \
524		-samplecode $(sample_dir)/VoiceRecognitionService \
525		            resources/samples/VoiceRecognitionService "Voice Recognition Service" \
526		-samplecode $(sample_dir)/VoicemailProviderDemo \
527		            resources/samples/VoicemailProviderDemo "Voicemail Provider Demo" \
528		-samplecode $(sample_dir)/XmlAdapters \
529		            resources/samples/XmlAdapters "XML Adapters" \
530		-samplecode $(sample_dir)/TtsEngine \
531		            resources/samples/TtsEngine "Text To Speech Engine" \
532		-samplecode $(sample_dir)/training/device-management-policy \
533		            resources/samples/training/device-management-policy "Device Management Policy"
534
535
536## SDK version identifiers used in the published docs
537  # major[.minor] version for current SDK. (full releases only)
538framework_docs_SDK_VERSION:=4.1
539  # release version (ie "Release x")  (full releases only)
540framework_docs_SDK_REL_ID:=1
541
542framework_docs_LOCAL_DROIDDOC_OPTIONS += \
543		-hdf sdk.version $(framework_docs_SDK_VERSION) \
544		-hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
545		-hdf sdk.preview 0 \
546
547# ====  the api stubs and current.xml ===========================
548include $(CLEAR_VARS)
549
550LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
551LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
552LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
553LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
554LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
555LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
556LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
557LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
558
559LOCAL_MODULE := api-stubs
560
561LOCAL_DROIDDOC_OPTIONS:=\
562		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
563		-stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_stubs_current_intermediates/src \
564		-api $(INTERNAL_PLATFORM_API_FILE) \
565		-nodocs
566
567LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
568
569LOCAL_UNINSTALLABLE_MODULE := true
570
571include $(BUILD_DROIDDOC)
572
573# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
574$(full_target): $(framework_built) $(gen)
575$(INTERNAL_PLATFORM_API_FILE): $(full_target)
576$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
577
578# ====  check javadoc comments but don't generate docs ========
579include $(CLEAR_VARS)
580
581LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
582LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
583LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
584LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
585LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
586LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
587LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
588LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
589
590LOCAL_MODULE := doc-comment-check
591
592LOCAL_DROIDDOC_OPTIONS:=\
593		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
594		-parsecomments
595
596LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
597
598LOCAL_UNINSTALLABLE_MODULE := true
599
600include $(BUILD_DROIDDOC)
601
602# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
603$(full_target): $(framework_built) $(gen)
604
605droidcore: doc-comment-check-docs
606
607# ====  static html in the pdk ==================================
608include $(CLEAR_VARS)
609
610LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
611LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
612LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
613LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
614LOCAL_DROIDDOC_HTML_DIR:=../../vendor/pdk/data/google/docs
615LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
616LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
617
618LOCAL_MODULE := offline-pdk
619
620LOCAL_DROIDDOC_OPTIONS:=\
621		-hdf android.whichdoc offline \
622		-hdf android.whichmodule $(LOCAL_MODULE)
623
624LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-pdk
625
626include $(BUILD_DROIDDOC)
627
628static_doc_index_redirect := $(out_dir)/index.html
629$(static_doc_index_redirect): \
630	$(LOCAL_PATH)/docs/docs-documentation-redirect.html | $(ACP)
631	$(hide) mkdir -p $(dir $@)
632	$(hide) $(ACP) $< $@
633
634$(full_target): $(static_doc_index_redirect)
635$(full_target): $(framework_built)
636
637# ====  static html in the sdk ==================================
638include $(CLEAR_VARS)
639
640LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
641LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
642LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
643LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
644LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
645LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
646LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
647LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
648
649LOCAL_MODULE := offline-sdk
650
651LOCAL_DROIDDOC_OPTIONS:=\
652		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
653                $(web_docs_sample_code_flags) \
654                -offlinemode \
655		-title "Android SDK" \
656		-proofread $(OUT_DOCS)/$(LOCAL_MODULE)-proofread.txt \
657		-todo $(OUT_DOCS)/$(LOCAL_MODULE)-docs-todo.html \
658		-sdkvalues $(OUT_DOCS) \
659		-hdf android.whichdoc offline
660
661
662LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
663
664include $(BUILD_DROIDDOC)
665
666static_doc_index_redirect := $(out_dir)/index.html
667$(static_doc_index_redirect): \
668	$(LOCAL_PATH)/docs/docs-documentation-redirect.html | $(ACP)
669	$(hide) mkdir -p $(dir $@)
670	$(hide) $(ACP) $< $@
671
672$(full_target): $(static_doc_index_redirect)
673$(full_target): $(framework_built)
674
675# ==== docs for the web (on the google app engine server) =======================
676include $(CLEAR_VARS)
677
678LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
679LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
680LOCAL_STATIC_JAVA_LIBRARIES:=$(framework_docs_LOCAL_STATIC_JAVA_LIBRARIES)
681LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES)
682LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
683LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
684LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
685LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
686LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
687
688LOCAL_MODULE := online-sdk
689
690LOCAL_DROIDDOC_OPTIONS:= \
691		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
692		$(web_docs_sample_code_flags) \
693		-toroot / \
694		-hdf android.whichdoc online \
695		-hdf template.showLanguageMenu true
696
697LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
698
699include $(BUILD_DROIDDOC)
700
701# explicitly specify that online-sdk depends on framework-res and any generated docs
702$(full_target): framework-res-package-target
703
704# ==== docs that have all of the stuff that's @hidden =======================
705include $(CLEAR_VARS)
706
707LOCAL_SRC_FILES:=$(framework_docs_LOCAL_SRC_FILES)
708LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
709LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) framework
710LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
711LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
712LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
713LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
714LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
715
716LOCAL_MODULE := hidden
717LOCAL_DROIDDOC_OPTIONS:=\
718		$(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
719		-title "Android SDK - Including hidden APIs."
720#		-hidden
721
722LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
723
724include $(BUILD_DROIDDOC)
725
726# Build ext.jar
727# ============================================================
728
729# NOTICE notes for non-obvious sections
730# apache-http - covered by the Apache Commons section.
731
732
733ext_dirs := \
734	../../external/nist-sip/java \
735	../../external/apache-http/src \
736	../../external/tagsoup/src \
737	../../external/libphonenumber/java/src
738
739ext_src_files := $(call all-java-files-under,$(ext_dirs))
740
741ext_res_dirs := \
742	../../external/libphonenumber/java/src
743
744# ====  the library  =========================================
745include $(CLEAR_VARS)
746
747LOCAL_SRC_FILES := $(ext_src_files)
748
749LOCAL_NO_STANDARD_LIBRARIES := true
750LOCAL_JAVA_LIBRARIES := core
751LOCAL_JAVA_RESOURCE_DIRS := $(ext_res_dirs)
752LOCAL_MODULE_TAGS := optional
753LOCAL_MODULE := ext
754
755LOCAL_DX_FLAGS := --core-library
756
757include $(BUILD_JAVA_LIBRARY)
758
759
760# Include subdirectory makefiles
761# ============================================================
762
763# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
764# team really wants is to build the stuff defined by this makefile.
765ifeq (,$(ONE_SHOT_MAKEFILE))
766include $(call first-makefiles-under,$(LOCAL_PATH))
767endif
768