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

Commit 69ffc042 authored by David Padlipsky's avatar David Padlipsky
Browse files

No error should be thrown if input gesture file cannot be found

The input-gestures.xml file can be missing if input gestures have not
yet been configured by the user. No longer throw an error in this
case as it is a valid state.

Bug: 394929430
Test: Manually on device
Flag: EXEMPT bugfix
Change-Id: Ibd9a8516ef179157023918426cf2ced8aac15558
parent 1e94bbb1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ public final class InputDataStore {
            final InputStream inputStream = mInputGestureFileInjector.openRead(userId);
            inputGestureDataList = readInputGesturesXml(inputStream, false);
            inputStream.close();
        } catch (FileNotFoundException exception) {
            // There are valid reasons for the file to be missing, such as shortcuts having not
            // been registered by the user.
            return List.of();
        } catch (IOException exception) {
            // In case we are unable to read from the file on disk or another IO operation error,
            // fail gracefully.