summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/input/InputDataStore.java4
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.