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

Commit 82aaf21a 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

am: bbea1f43

Change-Id: I4899434b32a6f2685fdbfe3d25a854917832f25d
parents c778c6fd bbea1f43
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) {