Commit 1048f52
authored
fix: resolve view crash (#1444)
## 📜 Description
Fixed `IllegalViewOperationException` crash on Android.
## 💡 Motivation and Context
Original code has been introduced in
#1355
and further started to be used in
#1352
Now if view is not found it throws an unhandled exception and crashes
the app. In reality we already handle "view not found" exception, so we
should just add a proper try/catch block to handle this error correctly
in Kotlin code 🤞
Closes
#1443
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### Android
- wrap `resolveView` with `catch (e: IllegalViewOperationException)`;
## 🤔 How Has This Been Tested?
Tested via e2e pipeline.
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed1 parent 9a5761d commit 1048f52
1 file changed
Lines changed: 11 additions & 1 deletion
File tree
- android/src/main/java/com/reactnativekeyboardcontroller/modules
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
93 | 103 | | |
94 | 104 | | |
95 | 105 | | |
| |||
0 commit comments