Reflect UnifiedNlp changes

This commit is contained in:
mar-v-in 2014-12-26 16:26:14 +01:00
parent 975ff9bd69
commit de24dcc33c
3 changed files with 30 additions and 14 deletions

View File

@ -17,19 +17,34 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
unified_dir := ../UnifiedNlp
res_dir := res $(unified_dir)/res
appcompat_dir := ../../../prebuilts/sdk/current/support/v7/appcompat
res_dir := res $(unified_dir)/res $(appcompat_dir)/res
LOCAL_SRC_FILES := $(call all-java-files-under, src) \
$(call all-Iaidl-files-under, src) \
$(call all-java-files-under, $(unified_dir)/src) \
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += $(call all-Iaidl-files-under, src)
LOCAL_SRC_FILES += $(call all-java-files-under, $(unified_dir)/src)
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir))
LOCAL_AAPT_FLAGS := --auto-add-overlay --extra-packages org.microg.nlp
LOCAL_AAPT_FLAGS := --auto-add-overlay \
--extra-packages android.support.v7.appcompat \
--extra-packages org.microg.nlp \
# For some reason framework has to be added here else GeocoderParams is not found,
# this way everything else is duplicated, but atleast compiles...
LOCAL_JAVA_LIBRARIES := com.google.android.maps framework com.android.location.provider
LOCAL_JAVA_LIBRARIES := com.google.android.maps \
framework \
com.android.location.provider
# Include compat v9 files if necassary
ifeq ($(shell [ $(PLATFORM_SDK_VERSION) -ge 17 ] && echo true), true)
LOCAL_JAVA_LIBRARIES += UnifiedNlpCompatV9
endif
LOCAL_STATIC_JAVA_LIBRARIES := UnifiedNlpApi \
android-support-v4 \
android-support-v7-appcompat \
LOCAL_STATIC_JAVA_LIBRARIES := UnifiedNlpApi
LOCAL_PACKAGE_NAME := GmsCore
LOCAL_SDK_VERSION := current
LOCAL_PRIVILEGED_MODULE := true

View File

@ -17,7 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="5089036">
android:versionCode="6111030">
<uses-sdk android:minSdkVersion="16" />
@ -31,6 +31,7 @@
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:theme="@style/AppTheme"
android:label="@string/gms_app_name">
<uses-library
android:name="com.android.location.provider"
@ -77,8 +78,8 @@
</service>
<activity
android:name="org.microg.nlp.ui.LocationBackendConfig"
android:theme="@android:style/Theme.Holo.Light">
android:name="org.microg.nlp.ui.SettingsActivity"
android:label="@string/nlp_settings_label">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View File

@ -87,12 +87,12 @@ public class AuthManagerServiceImpl extends IAuthManagerService.Stub {
}
private void checkPackage(String packageName, int callerUid, int callingUid) {
if (callerUid != callingUid) {
if (callerUid != 0 && callerUid != callingUid) {
throw new SecurityException("callerUid [" + callerUid + "] and real calling uid [" + callingUid + "] mismatch!");
}
String[] packagesForUid = context.getPackageManager().getPackagesForUid(callerUid);
if (!Arrays.asList(packagesForUid).contains(packageName)) {
throw new SecurityException("callerUid [" + callerUid + "] is not related to packageName [" + packageName + "]");
String[] packagesForUid = context.getPackageManager().getPackagesForUid(callingUid);
if (packagesForUid != null && !Arrays.asList(packagesForUid).contains(packageName)) {
throw new SecurityException("callingUid [" + callingUid + "] is not related to packageName [" + packageName + "]");
}
}