Skip to content

Commit 51c47be

Browse files
committed
Move preferHMS read into supports both platforms block
1 parent 1d20e4b commit 51c47be

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,12 @@ int getDeviceType() {
370370
if (supportsADM())
371371
return UserState.DEVICE_TYPE_FIREOS;
372372

373-
Context context = OneSignal.appContext;
374-
boolean preferHMS = context != null && OSUtils.getManifestMetaBoolean(context, PREFER_HMS_METADATA_NAME);
375373
boolean supportsHMS = supportsHMS();
376374
boolean supportsFCM = supportsGooglePush();
377375

378376
if (supportsFCM && supportsHMS) {
377+
Context context = OneSignal.appContext;
378+
boolean preferHMS = context != null && OSUtils.getManifestMetaBoolean(context, PREFER_HMS_METADATA_NAME);
379379
return preferHMS ? UserState.DEVICE_TYPE_HUAWEI: UserState.DEVICE_TYPE_ANDROID;
380380
}
381381

0 commit comments

Comments
 (0)