Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. diff --git a/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java b/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java
  2. index a6eb029..6a37ef6 100644
  3. --- a/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java
  4. +++ b/src/com/cyanogenmod/setupwizard/util/SetupWizardUtils.java
  5. @@ -73,6 +73,9 @@ public class SetupWizardUtils {
  6.  
  7. private static final String TAG = SetupWizardUtils.class.getSimpleName();
  8.  
  9. + private static final String GMS_PACKAGE = "com.google.android.gms";
  10. + private statuc final String GMS_SUW_PACKAGE = "com.google.android.setupwizard";
  11. +
  12. private SetupWizardUtils(){}
  13.  
  14. public static SharedPreferences getPrefs(Context context) {
  15. @@ -166,15 +169,15 @@ public class SetupWizardUtils {
  16. }
  17.  
  18. public static boolean hasGMS(Context context) {
  19. - if (PackageManagerUtils.isAppInstalled(context, "com.google.android.gms") &&
  20. - PackageManagerUtils.isAppInstalled(context, "com.google.android.setupwizard")) {
  21. + if (PackageManagerUtils.isAppInstalled(context, GMS_PACKAGE) &&
  22. + PackageManagerUtils.isAppInstalled(context, GMS_SUW_PACKAGE)) {
  23. PackageManager packageManager = context.getPackageManager();
  24. if (LOGV) {
  25. Log.v(TAG, "com.google.android.setupwizard state =" + packageManager
  26. - .getApplicationEnabledSetting("com.google.android.setupwizard"));
  27. + .getApplicationEnabledSetting(GMS_SUW_PACKAGE));
  28. }
  29. return packageManager
  30. - .getApplicationEnabledSetting("com.google.android.setupwizard") !=
  31. + .getApplicationEnabledSetting(GMS_SUW_PACKAGE) !=
  32. COMPONENT_ENABLED_STATE_DISABLED;
  33. }
  34. return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement