Просмотр исходного кода

android: make check more resilient

If action is null (observed on some old devices) we'll get an exception.
Reversing the check fixes it since Actions.XXX is statically defined.
master
Saúl Ibarra Corretgé 6 лет назад
Родитель
Сommit
c2ed296178

+ 2
- 2
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeetOngoingConferenceService.java Просмотреть файл

@@ -87,7 +87,7 @@ public class JitsiMeetOngoingConferenceService extends Service
87 87
     @Override
88 88
     public int onStartCommand(Intent intent, int flags, int startId) {
89 89
         final String action = intent.getAction();
90
-        if (action.equals(Actions.START)) {
90
+        if (Actions.START.equals(action)) {
91 91
             Notification notification = OngoingNotification.buildOngoingConferenceNotification();
92 92
             if (notification == null) {
93 93
                 stopSelf();
@@ -96,7 +96,7 @@ public class JitsiMeetOngoingConferenceService extends Service
96 96
                 startForeground(OngoingNotification.NOTIFICATION_ID, notification);
97 97
                 JitsiMeetLogger.i(TAG + " Service started");
98 98
             }
99
-        } else if (action.equals(Actions.HANGUP)) {
99
+        } else if (Actions.HANGUP.equals(action)) {
100 100
             JitsiMeetLogger.i(TAG + " Hangup requested");
101 101
             // Abort all ongoing calls
102 102
             if (AudioModeModule.useConnectionService()) {

Загрузка…
Отмена
Сохранить