Skip to content

Commit

Permalink
Add possibility to do not remind while in voice communication (Viber,…
Browse files Browse the repository at this point in the history
… Skype, etc calls)
  • Loading branch information
httpdispatch committed Sep 26, 2019
1 parent 925a396 commit 8cb2a7c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class PhoneStateUtils {
*/
public static boolean isCallActive(Context context) {
AudioManager manager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
return manager.getMode() == AudioManager.MODE_IN_CALL;
int mode = manager.getMode();
return mode == AudioManager.MODE_IN_CALL || mode == AudioManager.MODE_IN_COMMUNICATION || mode == AudioManager.MODE_RINGTONE;
}
}

0 comments on commit 8cb2a7c

Please sign in to comment.