diff options
| author | 2025-02-26 13:09:02 -0800 | |
|---|---|---|
| committer | 2025-02-26 13:09:02 -0800 | |
| commit | a3cf7cd709d5f7199453eba89a9e416d95113b08 (patch) | |
| tree | a73006bb03b89d91016d9d7cad8a80bee4e82e24 | |
| parent | f716acf021c2e727404c237b4c331bf1f2fe0a25 (diff) | |
| parent | 69ffc042de1d24e40e808645b0fd69b837b7acc5 (diff) | |
Merge "No error should be thrown if input gesture file cannot be found" into main
| -rw-r--r-- | services/core/java/com/android/server/input/InputDataStore.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/input/InputDataStore.java b/services/core/java/com/android/server/input/InputDataStore.java index 834f8154240e..6ed50b6fbdcb 100644 --- a/services/core/java/com/android/server/input/InputDataStore.java +++ b/services/core/java/com/android/server/input/InputDataStore.java @@ -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. |