Refactor nativeSetEarcEnabled

In a scenario where HdmiEarcController calls nativeSetEarcEnabled,
and  mEArc is a null object triggering a NullPointerException,
which leads to a system_server crash, therefore adding a catch for
NullPointerException.

Bug: 370612254
Test: Success to catch NullPointerObject exception.

Change-Id: Ia3e6beb3d39fcb5e9cc1407b38488b1da605d55f
1 file changed