After i flashed my phone with LineageOS which is a custom rom, my equalizer got alot of UnsupportedOperationExceptions
.
getStrengthSupported also returns false on custom roms but true on stock android.
For now i just disable my equalizer if i catch this exception in a try-catch.
But i was wondering if there is another way so i can also support custom roms.
if (mBassBoost.getStrengthSupported()) {
mBassBoost.setEnabled((short) progress > 0);
mBassBoost.setStrength((short) progress);
Log.i(TAG, "mBassBoost StrengthSupported: "+ mBassBoost.getStrengthSupported());
}else{
Log.e(TAG, "mBassBoost StrengthSupported: "+ mBassBoost.getStrengthSupported());
}
mBassBoostProgress = (int)progress;
Log.i(TAG, "BassBoost Rounded Strength: " + mBassBoost.getRoundedStrength());