summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
index 86906da..d751461 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
@@ -22,6 +22,8 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
import android.content.pm.ThemeUtils;
import android.content.res.ThemeConfig;
import android.content.res.ThemeManager;
@@ -68,6 +70,8 @@ public class CyanogenSettingsPage extends SetupPage {
public static final String SETTING_METRICS = "settings.cyanogen.allow_metrics";
public static final String PRIVACY_POLICY_URI = "https://cyngn.com/oobe-legal?hideHeader=1";
+ private static final String WHISPERPUSH_PACKAGE = "org.whispersystems.whisperpush";
+
public CyanogenSettingsPage(Context context, SetupDataCallbacks callbacks) {
super(context, callbacks);
}
@@ -202,6 +206,14 @@ public class CyanogenSettingsPage extends SetupPage {
private static boolean hideWhisperPush(Context context) {
final int playServicesAvailable = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(context);
+ try {
+ PackageInfo pi = context.getPackageManager().getPackageInfo(WHISPERPUSH_PACKAGE, 0);
+ if (pi == null) {
+ return true;
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ return true;
+ }
return playServicesAvailable != ConnectionResult.SUCCESS
|| !SetupWizardUtils.hasTelephony(context)
|| (SetupWizardUtils.hasTelephony(context) &&