-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0000-playservicesutil.patch
More file actions
80 lines (78 loc) · 2.93 KB
/
0000-playservicesutil.patch
File metadata and controls
80 lines (78 loc) · 2.93 KB
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
diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/PlayServicesUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/PlayServicesUtil.java
index 6014335..461b238 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/util/PlayServicesUtil.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/util/PlayServicesUtil.java
@@ -22,41 +22,41 @@ public class PlayServicesUtil {
}
public static PlayServicesStatus getPlayServicesStatus(Context context) {
- int gcmStatus = 0;
-
- try {
- gcmStatus = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
- } catch (Throwable t) {
- Log.w(TAG, t);
- return PlayServicesStatus.MISSING;
- }
-
- Log.i(TAG, "Play Services: " + gcmStatus);
-
- switch (gcmStatus) {
- case ConnectionResult.SUCCESS:
- return PlayServicesStatus.SUCCESS;
- case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
- try {
- ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo("com.google.android.gms", 0);
-
- if (applicationInfo != null && !applicationInfo.enabled) {
- return PlayServicesStatus.MISSING;
- }
- } catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, e);
- }
-
- return PlayServicesStatus.NEEDS_UPDATE;
- case ConnectionResult.SERVICE_DISABLED:
- case ConnectionResult.SERVICE_MISSING:
- case ConnectionResult.SERVICE_INVALID:
- case ConnectionResult.API_UNAVAILABLE:
- case ConnectionResult.SERVICE_MISSING_PERMISSION:
+ // int gcmStatus = 0;
+
+ // try {
+ // gcmStatus = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
+ // } catch (Throwable t) {
+ // Log.w(TAG, t);
+ // return PlayServicesStatus.MISSING;
+ // }
+
+ // Log.i(TAG, "Play Services: " + gcmStatus);
+
+ // switch (gcmStatus) {
+ // case ConnectionResult.SUCCESS:
+ // return PlayServicesStatus.SUCCESS;
+ // case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
+ // try {
+ // ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo("com.google.android.gms", 0);
+
+ // if (applicationInfo != null && !applicationInfo.enabled) {
+ // return PlayServicesStatus.MISSING;
+ // }
+ // } catch (PackageManager.NameNotFoundException e) {
+ // Log.w(TAG, e);
+ // }
+
+ // return PlayServicesStatus.NEEDS_UPDATE;
+ // case ConnectionResult.SERVICE_DISABLED:
+ // case ConnectionResult.SERVICE_MISSING:
+ // case ConnectionResult.SERVICE_INVALID:
+ // case ConnectionResult.API_UNAVAILABLE:
+ // case ConnectionResult.SERVICE_MISSING_PERMISSION:
return PlayServicesStatus.MISSING;
- default:
- return PlayServicesStatus.TRANSIENT_ERROR;
- }
+ // default:
+ // return PlayServicesStatus.TRANSIENT_ERROR;
+ // }
}
}