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

Commit bbea1f43 authored by mike dooley's avatar mike dooley Committed by android-build-merger
Browse files

Merge "Fixing a couple crashes in the SoundTriggerTestApp" into pi-dev

am: 67890e0e

Change-Id: I834d2a80f9dede5e1d2f3be73c9d71821c94e2ab
parents 9c8900ce 67890e0e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -828,7 +828,12 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
    // internalClearGlobalStateLocked() cleans up the telephony and power save listeners.
    private void internalClearGlobalStateLocked() {
        // Unregister from call state changes.
        long token = Binder.clearCallingIdentity();
        try {
            mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
        } finally {
            Binder.restoreCallingIdentity(token);
        }

        // Unregister from power save mode changes.
        if (mPowerSaveModeListener != null) {
+3 −2
Original line number Diff line number Diff line
@@ -435,9 +435,10 @@ public class SoundTriggerTestService extends Service {
            if (!file.getName().endsWith(".properties")) {
                continue;
            }
            try {

            try (FileInputStream in = new FileInputStream(file)) {
                Properties properties = new Properties();
                properties.load(new FileInputStream(file));
                properties.load(in);
                createModelInfo(properties);
                loadedModel = true;
            } catch (Exception e) {