Skip to content

Commit b2af407

Browse files
committed
HMS classes Exception -> NoClassDefFoundError
1 parent 84604ec commit b2af407

File tree

1 file changed

+3
-3
lines changed
  • OneSignalSDK/onesignal/src/main/java/com/onesignal

1 file changed

+3
-3
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OSUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private static boolean hasHMSAvailabilityLibrary() {
156156
try {
157157
// noinspection ConstantConditions
158158
return com.huawei.hms.api.HuaweiApiAvailability.class != null;
159-
} catch (Exception e) {
159+
} catch (NoClassDefFoundError e) {
160160
return false;
161161
}
162162
}
@@ -165,7 +165,7 @@ private static boolean hasHMSPushKitLibrary() {
165165
try {
166166
// noinspection ConstantConditions
167167
return com.huawei.hms.aaid.HmsInstanceId.class != null;
168-
} catch (Exception e) {
168+
} catch (NoClassDefFoundError e) {
169169
return false;
170170
}
171171
}
@@ -174,7 +174,7 @@ private static boolean hasHMSAGConnectLibrary() {
174174
try {
175175
// noinspection ConstantConditions
176176
return com.huawei.agconnect.config.AGConnectServicesConfig.class != null;
177-
} catch (Exception e) {
177+
} catch (NoClassDefFoundError e) {
178178
return false;
179179
}
180180
}

0 commit comments

Comments
 (0)