CaptioningManager: handle a case where caption calls enabled resource is not defined
Change-Id: I9a54aef7f3cdbf7fa8e0d894b9c4c0223ff85605 Bug: 215444065. Test: CaptioningManagerTest#testIsCallCaptioningEnabled
This commit is contained in:
@@ -254,7 +254,13 @@ public class CaptioningManager {
|
||||
* Returns true if system wide call captioning is enabled for this device.
|
||||
*/
|
||||
public boolean isCallCaptioningEnabled() {
|
||||
return mResources.getBoolean(R.bool.config_systemCaptionsServiceCallsEnabled);
|
||||
try {
|
||||
return mResources.getBoolean(
|
||||
R.bool.config_systemCaptionsServiceCallsEnabled);
|
||||
} catch (Resources.NotFoundException e) {
|
||||
// The resource may not be defined, return false in that case
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void notifyEnabledChanged() {
|
||||
|
||||
Reference in New Issue
Block a user