mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Remove unnecessary code now that minSdk is 21.
This commit is contained in:
committed by
Cody Henthorne
parent
8cfd02aff2
commit
3e7dc79fe8
@@ -169,10 +169,8 @@ public abstract class AudioManagerCompat {
|
||||
public static AudioManagerCompat create(@NonNull Context context) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
return new Api26AudioManagerCompat(context);
|
||||
} else if (Build.VERSION.SDK_INT >= 21) {
|
||||
return new Api21AudioManagerCompat(context);
|
||||
} else {
|
||||
return new Api19AudioManagerCompat(context);
|
||||
return new Api21AudioManagerCompat(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +240,6 @@ public abstract class AudioManagerCompat {
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(21)
|
||||
private static class Api21AudioManagerCompat extends Api19AudioManagerCompat {
|
||||
|
||||
private static AudioAttributes AUDIO_ATTRIBUTES = new AudioAttributes.Builder()
|
||||
|
||||
@@ -158,7 +158,7 @@ class FullSignalAudioManager(context: Context, eventListener: EventListener?) :
|
||||
updateAudioDeviceState()
|
||||
|
||||
wiredHeadsetReceiver = WiredHeadsetReceiver()
|
||||
context.registerReceiver(wiredHeadsetReceiver, IntentFilter(if (Build.VERSION.SDK_INT >= 21) AudioManager.ACTION_HEADSET_PLUG else Intent.ACTION_HEADSET_PLUG))
|
||||
context.registerReceiver(wiredHeadsetReceiver, IntentFilter(AudioManager.ACTION_HEADSET_PLUG))
|
||||
|
||||
state = State.PREINITIALIZED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user