diff options
-rw-r--r-- | Android.mk | 12 | ||||
-rw-r--r-- | AndroidManifest.xml | 3 | ||||
-rw-r--r-- | proguard.flags | 13 | ||||
-rw-r--r-- | src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java | 5 | ||||
-rw-r--r-- | src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java | 7 |
5 files changed, 8 insertions, 32 deletions
@@ -14,19 +14,15 @@ LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ android-support-v13 \ - play \ libphonenumber \ org.cyanogenmod.platform.sdk -LOCAL_JAVA_LIBRARIES := telephony-common +LOCAL_JAVA_LIBRARIES := \ + org.cyanogenmod.platform.internal \ + telephony-common -# Include res dir from chips -google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res -res_dir := $(google_play_dir) res - -LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res LOCAL_AAPT_FLAGS := --auto-add-overlay -LOCAL_AAPT_FLAGS += --extra-packages com.google.android.gms include frameworks/opt/setupwizard/library/common.mk diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9bd0603..f45029e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -69,9 +69,6 @@ android:taskAffinity="com.android.wizard" android:name=".SetupWizardApp"> - <meta-data android:name="com.google.android.gms.version" - android:value="@integer/google_play_services_version" /> - <activity android:name=".ui.SetupWizardActivity" android:label="@string/product_name" android:launchMode="singleInstance" diff --git a/proguard.flags b/proguard.flags index cae5d2c..5684616 100644 --- a/proguard.flags +++ b/proguard.flags @@ -2,18 +2,6 @@ protected Object[][] getContents(); } -# Keep SafeParcelable value, needed for reflection. This is required to support backwards -# compatibility of some classes. --keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { - public static final *** NULL; -} - -# Keep the names of classes/members we need for client functionality. --keepnames @com.google.android.gms.common.annotation.KeepName class * --keepclassmembernames class * { - @com.google.android.gms.common.annotation.KeepName *; -} - # Needed for Parcelable/SafeParcelable Creators to not get stripped -keepnames class * implements android.os.Parcelable { public static final ** CREATOR; @@ -22,4 +10,3 @@ # Needed when building against the Marshmallow SDK -dontwarn org.apache.http.** -dontwarn android.support.** --dontwarn com.google.android.gms.**
\ No newline at end of file diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index 3226044..4674b1f 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -29,6 +29,8 @@ import com.android.internal.telephony.TelephonyIntents; import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.util.SetupWizardUtils; +import org.cyanogenmod.internal.util.PackageManagerUtils; + import java.util.ArrayList; public class CMSetupWizardData extends AbstractSetupData { @@ -68,7 +70,8 @@ public class CMSetupWizardData extends AbstractSetupData { pages.add(new MobileDataPage(mContext, this) .setHidden(!isSimInserted() || mMobileDataEnabled)); } - final boolean hasGMS = SetupWizardUtils.hasGMS(mContext); + final boolean hasGMS = PackageManagerUtils + .isAppInstalled(mContext, "com.google.android.gms"); if (hasGMS) { pages.add(new GmsAccountPage(mContext, this)); } diff --git a/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java b/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java index 34961a9..a900e7d 100644 --- a/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java +++ b/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java @@ -39,8 +39,6 @@ import android.util.Log; /*import com.android.internal.os.IKillSwitchService;*/ import com.cyanogenmod.setupwizard.SetupWizardApp; -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GooglePlayServicesUtil; import cyanogenmod.providers.CMSettings; import static android.content.res.ThemeConfig.SYSTEM_DEFAULT; @@ -197,11 +195,6 @@ public class SetupWizardUtils { return UserHandle.getCallingUserHandle().isOwner(); } - public static boolean hasGMS(Context context) { - return GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) != - ConnectionResult.SERVICE_MISSING; - } - public static boolean accountExists(Context context, String accountType) { return AccountManager.get(context).getAccountsByType(accountType).length > 0; } |