Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6ef97cd authored by Robin Lee's avatar Robin Lee
Browse files

Fix NullPointerException thrown by logging

When `properties` is null, this propagates a NullPointerException back
to the caller instead of cleanly reporting null like it's supposed to.

Issue introduced in Iec7ba6fc59912f44341fbe8d7f99193b9ead52f0 from the
start of this function and is fixed by just printing `object` instead
of `object.toString()`.

Test: atest AssistIntentConditionalTest
Bug: 158682298
Change-Id: Ic64f6fba65895e9facc9994f5d1a353081ab3253
(cherry picked from commit 935906e1)
parent 8d411d94
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -697,7 +697,7 @@ public class SoundTriggerService extends SystemService {
            synchronized (mLock) {
            synchronized (mLock) {
                ModuleProperties properties = mSoundTriggerHelper.getModuleProperties();
                ModuleProperties properties = mSoundTriggerHelper.getModuleProperties();
                sEventLogger.log(new SoundTriggerLogger.StringEvent(
                sEventLogger.log(new SoundTriggerLogger.StringEvent(
                        "getModuleProperties(): " + properties.toString()));
                        "getModuleProperties(): " + properties));
                return properties;
                return properties;
            }
            }
        }
        }