blob: 7d60776637306ccc4ae9dd6b5310792a07a57147 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
# Local modifications:
# * b/31757757 Precompiled proto classes have been included.
# * b/36215428 dialer/oem/res/values-mcc3* have been pruned
# * removed com.google.android.backup.api_key. This should be added to
# the manifest in the top level directory.
# * removed com.google.android.geo.API_KEY key. This should be added to
# the manifest files in java/com/android/incallui/calllocation/impl/
# and /java/com/android/incallui/maps/impl/
# * b/35391680 apache temporarily included in the top level directory.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
ifeq ($(TARGET_BUILD_APPS),)
support_library_root_dir := frameworks/support
else
support_library_root_dir := prebuilts/sdk/current/support
endif
# The base directory for Dialer sources.
BASE_DIR := java/com/android
# Primary dialer module sources.
SRC_DIRS := \
apache \
$(BASE_DIR)/contacts/common \
$(BASE_DIR)/dialer \
$(BASE_DIR)/incallui \
$(BASE_DIR)/voicemail
# Exclude files incompatible with AOSP.
EXCLUDE_FILES := \
$(BASE_DIR)/incallui/calllocation/impl/AuthException.java \
$(BASE_DIR)/incallui/calllocation/impl/CallLocationImpl.java \
$(BASE_DIR)/incallui/calllocation/impl/CallLocationModule.java \
$(BASE_DIR)/incallui/calllocation/impl/DownloadMapImageTask.java \
$(BASE_DIR)/incallui/calllocation/impl/GoogleLocationSettingHelper.java \
$(BASE_DIR)/incallui/calllocation/impl/HttpFetcher.java \
$(BASE_DIR)/incallui/calllocation/impl/LocationFragment.java \
$(BASE_DIR)/incallui/calllocation/impl/LocationHelper.java \
$(BASE_DIR)/incallui/calllocation/impl/LocationPresenter.java \
$(BASE_DIR)/incallui/calllocation/impl/LocationUrlBuilder.java \
$(BASE_DIR)/incallui/calllocation/impl/ReverseGeocodeTask.java \
$(BASE_DIR)/incallui/calllocation/impl/TrafficStatsTags.java \
$(BASE_DIR)/incallui/maps/impl/MapsImpl.java \
$(BASE_DIR)/incallui/maps/impl/MapsModule.java \
$(BASE_DIR)/incallui/maps/impl/StaticMapFragment.java
# All Dialers resources.
# find . -type d -name "res" | uniq | sort
RES_DIRS := \
assets/product/res \
assets/quantum/res \
$(BASE_DIR)/contacts/common/res \
$(BASE_DIR)/dialer/app/res \
$(BASE_DIR)/dialer/app/voicemail/error/res \
$(BASE_DIR)/dialer/blocking/res \
$(BASE_DIR)/dialer/callcomposer/camera/camerafocus/res \
$(BASE_DIR)/dialer/callcomposer/cameraui/res \
$(BASE_DIR)/dialer/callcomposer/res \
$(BASE_DIR)/dialer/calldetails/res \
$(BASE_DIR)/dialer/calllogutils/res \
$(BASE_DIR)/dialer/common/res \
$(BASE_DIR)/dialer/dialpadview/res \
$(BASE_DIR)/dialer/interactions/res \
$(BASE_DIR)/dialer/notification/res \
$(BASE_DIR)/dialer/oem/res \
$(BASE_DIR)/dialer/phonenumberutil/res \
$(BASE_DIR)/dialer/postcall/res \
$(BASE_DIR)/dialer/shortcuts/res \
$(BASE_DIR)/dialer/theme/res \
$(BASE_DIR)/dialer/util/res \
$(BASE_DIR)/dialer/voicemailstatus/res \
$(BASE_DIR)/dialer/widget/res \
$(BASE_DIR)/incallui/answer/impl/affordance/res \
$(BASE_DIR)/incallui/answer/impl/answermethod/res \
$(BASE_DIR)/incallui/answer/impl/hint/res \
$(BASE_DIR)/incallui/answer/impl/res \
$(BASE_DIR)/incallui/audioroute/res \
$(BASE_DIR)/incallui/autoresizetext/res \
$(BASE_DIR)/incallui/calllocation/impl/res \
$(BASE_DIR)/incallui/commontheme/res \
$(BASE_DIR)/incallui/contactgrid/res \
$(BASE_DIR)/incallui/hold/res \
$(BASE_DIR)/incallui/incall/impl/res \
$(BASE_DIR)/incallui/res \
$(BASE_DIR)/incallui/sessiondata/res \
$(BASE_DIR)/incallui/video/impl/res \
$(BASE_DIR)/incallui/wifi/res \
$(BASE_DIR)/voicemail/impl/res
# Dialer manifest files to merge.
# find . -type f -name "AndroidManifest.xml" | uniq | sort
DIALER_MANIFEST_FILES += \
$(BASE_DIR)/contacts/common/AndroidManifest.xml \
$(BASE_DIR)/dialer/app/AndroidManifest.xml \
$(BASE_DIR)/dialer/app/manifests/activities/AndroidManifest.xml \
$(BASE_DIR)/dialer/app/voicemail/error/AndroidManifest.xml \
$(BASE_DIR)/dialer/backup/AndroidManifest.xml \
$(BASE_DIR)/dialer/blocking/AndroidManifest.xml \
$(BASE_DIR)/dialer/callcomposer/AndroidManifest.xml \
$(BASE_DIR)/dialer/callcomposer/camera/AndroidManifest.xml \
$(BASE_DIR)/dialer/callcomposer/camera/camerafocus/AndroidManifest.xml \
$(BASE_DIR)/dialer/callcomposer/cameraui/AndroidManifest.xml \
$(BASE_DIR)/dialer/calldetails/AndroidManifest.xml \
$(BASE_DIR)/dialer/calllogutils/AndroidManifest.xml \
$(BASE_DIR)/dialer/common/AndroidManifest.xml \
$(BASE_DIR)/dialer/dialpadview/AndroidManifest.xml \
$(BASE_DIR)/dialer/interactions/AndroidManifest.xml \
$(BASE_DIR)/dialer/notification/AndroidManifest.xml \
$(BASE_DIR)/dialer/oem/AndroidManifest.xml \
$(BASE_DIR)/dialer/phonenumberutil/AndroidManifest.xml \
$(BASE_DIR)/dialer/postcall/AndroidManifest.xml \
$(BASE_DIR)/dialer/shortcuts/AndroidManifest.xml \
$(BASE_DIR)/dialer/simulator/impl/AndroidManifest.xml \
$(BASE_DIR)/dialer/theme/AndroidManifest.xml \
$(BASE_DIR)/dialer/util/AndroidManifest.xml \
$(BASE_DIR)/dialer/voicemailstatus/AndroidManifest.xml \
$(BASE_DIR)/dialer/widget/AndroidManifest.xml \
$(BASE_DIR)/incallui/AndroidManifest.xml \
$(BASE_DIR)/incallui/answer/impl/affordance/AndroidManifest.xml \
$(BASE_DIR)/incallui/answer/impl/AndroidManifest.xml \
$(BASE_DIR)/incallui/answer/impl/answermethod/AndroidManifest.xml \
$(BASE_DIR)/incallui/answer/impl/hint/AndroidManifest.xml \
$(BASE_DIR)/incallui/audioroute/AndroidManifest.xml \
$(BASE_DIR)/incallui/autoresizetext/AndroidManifest.xml \
$(BASE_DIR)/incallui/commontheme/AndroidManifest.xml \
$(BASE_DIR)/incallui/contactgrid/AndroidManifest.xml \
$(BASE_DIR)/incallui/hold/AndroidManifest.xml \
$(BASE_DIR)/incallui/incall/impl/AndroidManifest.xml \
$(BASE_DIR)/incallui/sessiondata/AndroidManifest.xml \
$(BASE_DIR)/incallui/video/impl/AndroidManifest.xml \
$(BASE_DIR)/incallui/wifi/AndroidManifest.xml \
$(BASE_DIR)/voicemail/impl/AndroidManifest.xml
# Merge all manifest files.
LOCAL_FULL_LIBS_MANIFEST_FILES := \
$(addprefix $(LOCAL_PATH)/, $(DIALER_MANIFEST_FILES))
LOCAL_SRC_FILES := $(call all-java-files-under, $(SRC_DIRS))
LOCAL_SRC_FILES := $(filter-out $(EXCLUDE_FILES),$(LOCAL_SRC_FILES))
# Include protocol buffers and use the nano compiler.
LOCAL_SRC_FILES += $(call all-proto-files-under, $(SRC_DIRS))
LOCAL_PROTOC_OPTIMIZE_TYPE := nano
LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)
LOCAL_PROTO_JAVA_OUTPUT_PARAMS := enum_style=java
LOCAL_RESOURCE_DIR := \
$(addprefix $(LOCAL_PATH)/, $(RES_DIRS)) \
$(support_library_root_dir)/design/res \
$(support_library_root_dir)/transition/res \
$(support_library_root_dir)/v7/appcompat/res \
$(support_library_root_dir)/v7/cardview/res \
$(support_library_root_dir)/v7/recyclerview/res
# We specify each package explicitly to glob resource files.
LOCAL_AAPT_FLAGS := \
--auto-add-overlay \
--extra-packages android.support.design \
--extra-packages android.support.transition \
--extra-packages android.support.v7.appcompat \
--extra-packages android.support.v7.cardview \
--extra-packages android.support.v7.recyclerview \
--extra-packages com.android.contacts.common \
--extra-packages com.android.dialer.app \
--extra-packages com.android.dialer.app.voicemail.error \
--extra-packages com.android.dialer.blocking \
--extra-packages com.android.dialer.callcomposer \
--extra-packages com.android.dialer.callcomposer \
--extra-packages com.android.dialer.callcomposer.camera \
--extra-packages com.android.dialer.callcomposer.camera.camerafocus \
--extra-packages com.android.dialer.callcomposer.cameraui \
--extra-packages com.android.dialer.calldetails \
--extra-packages com.android.dialer.calllogutils \
--extra-packages com.android.dialer.common \
--extra-packages com.android.dialer.dialpadview \
--extra-packages com.android.dialer.interactions \
--extra-packages com.android.dialer.notification \
--extra-packages com.android.dialer.oem \
--extra-packages com.android.dialer.phonenumberutil \
--extra-packages com.android.dialer.postcall \
--extra-packages com.android.dialer.shortcuts \
--extra-packages com.android.dialer.util \
--extra-packages com.android.dialer.voicemailstatus \
--extra-packages com.android.dialer.widget \
--extra-packages com.android.incallui \
--extra-packages com.android.incallui.answer.impl \
--extra-packages com.android.incallui.answer.impl.affordance \
--extra-packages com.android.incallui.answer.impl.affordance \
--extra-packages com.android.incallui.answer.impl.answermethod \
--extra-packages com.android.incallui.answer.impl.hint \
--extra-packages com.android.incallui.audioroute \
--extra-packages com.android.incallui.autoresizetext \
--extra-packages com.android.incallui.calllocation \
--extra-packages com.android.incallui.calllocation.impl \
--extra-packages com.android.incallui.commontheme \
--extra-packages com.android.incallui.contactgrid \
--extra-packages com.android.incallui.hold \
--extra-packages com.android.incallui.incall.impl \
--extra-packages com.android.incallui.maps.impl \
--extra-packages com.android.incallui.sessiondata \
--extra-packages com.android.incallui.video \
--extra-packages com.android.incallui.video.impl \
--extra-packages com.android.incallui.wifi \
--extra-packages com.android.phone.common \
--extra-packages com.android.voicemail \
--extra-packages com.android.voicemail.impl \
--extra-packages com.android.voicemail.impl.fetch \
--extra-packages com.android.voicemail.impl.settings \
--extra-packages com.android.voicemail.settings \
--extra-packages me.leolin.shortcutbadger
LOCAL_STATIC_JAVA_LIBRARIES := \
android-common \
android-support-design \
android-support-transition \
android-support-v13 \
android-support-v4 \
android-support-v7-appcompat \
android-support-v7-cardview \
android-support-v7-recyclerview \
com.android.vcard \
dialer-dagger2 \
dialer-disklrucache \
dialer-gifdecoder \
dialer-glide \
dialer-guava \
dialer-javax-annotation-api \
dialer-libshortcutbadger \
jsr305 \
libphonenumber \
libprotobuf-java-nano \
volley
LOCAL_JAVA_LIBRARIES := \
org.apache.http.legacy \
# TODO: Jack seems to require these in both LOCAL_JAVA_LIBRARIES and with
# --processorpath, javac is fine with just --processorpath
LOCAL_JAVA_LIBRARIES += \
dialer-dagger2-compiler \
dialer-dagger2 \
dialer-dagger2-producers \
dialer-guava \
dialer-javax-annotation-api \
dialer-javax-inject \
dialer-auto-value \
# Libraries needed by the compiler (JACK) to generate code.
PROCESSOR_LIBRARIES_TARGET := \
dialer-dagger2-compiler \
dialer-dagger2 \
dialer-dagger2-producers \
dialer-guava \
dialer-javax-annotation-api \
dialer-javax-inject \
dialer-auto-value \
# Resolve the jar paths.
PROCESSOR_JARS := $(call java-lib-deps, $(PROCESSOR_LIBRARIES_TARGET))
# Necessary for annotation processors to work correctly.
LOCAL_ADDITIONAL_DEPENDENCIES += $(PROCESSOR_JARS)
LOCAL_JACK_FLAGS += --processorpath $(call normalize-path-list,$(PROCESSOR_JARS))
LOCAL_JAVAC_FLAGS += --processorpath $(call normalize-path-list,$(PROCESSOR_JARS))
LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(incallui_dir)/proguard.flags
LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := Dialer
LOCAL_CERTIFICATE := shared
LOCAL_PRIVILEGED_MODULE := true
include $(BUILD_PACKAGE)
# Cleanup local state
BASE_DIR :=
SRC_DIRS :=
EXCLUDE_FILES :=
RES_DIRS :=
DIALER_MANIFEST_FILES :=
PROCESSOR_LIBRARIES_TARGET :=
PROCESSOR_JARS :=
# Create references to prebuilt libraries.
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.6/dagger-compiler-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-auto-common:../../../prebuilts/tools/common/m2/repository/com/google/auto/auto-common/0.6/auto-common-0.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-auto-value:../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.3/auto-value-1.3$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.6/dagger-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.6/dagger-producers-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-disklrucache:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/disklrucache/1.0.0-SNAPSHOT/disklrucache-1.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-gifdecoder:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/gifdecoder/1.0.0-SNAPSHOT/gifdecoder-1.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-glide:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/glide/4.0.0-SNAPSHOT/glide-4.0.0-SNAPSHOT$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-javax-annotation-api:../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-javax-inject:../../../prebuilts/tools/common/m2/repository/javax/inject/javax.inject/1/javax.inject-1$(COMMON_JAVA_PACKAGE_SUFFIX) \
dialer-libshortcutbadger:../../../prebuilts/tools/common/m2/repository/me/leolin/ShortcutBadger/1.1.13/ShortcutBadger-1.1.13$(COMMON_JAVA_PACKAGE_SUFFIX)
include $(BUILD_MULTI_PREBUILT)
include $(CLEAR_VARS)
|