Commit 574a6c7
Android Oreo (8.0) Support
Summary:
Apps targeting Android 8.0 (API level 26) cannot use `TYPE_SYSTEM_OVERLAY ` and `TYPE_SYSTEM_OVERLAY `. Targeting 26 will cause the app to crash when in `DEV_MODE`.
https://developer.android.com/about/versions/oreo/android-8.0-changes.html#cwt
This PR replaces uses of these overlay flags with the new `TYPE_APPLICATION_OVERLAY` when running on a device with Android 8.0 or later.
When using `TYPE_APPLICATION_OVERLAY` it still requires the `SYSTEM_ALERT_WINDOW` permission, just like previous android versions.
https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#TYPE_APPLICATION_OVERLAY
https://github.com/AndrewJack/react-native-android-oreo tested here
Closes facebook#15601
Reviewed By: achen1
Differential Revision: D5801619
Pulled By: shergin
fbshipit-source-id: 27d1b9bb64018e7f12f9c3d3d222f1fda468b1241 parent b2a8323 commit 574a6c7
File tree
4 files changed
+22
-5
lines changed- ReactAndroid/src/main/java/com/facebook/react/devsupport
4 files changed
+22
-5
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
334 | | - | |
| 333 | + | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
| |||
473 | 472 | | |
474 | 473 | | |
475 | 474 | | |
476 | | - | |
| 475 | + | |
477 | 476 | | |
478 | 477 | | |
479 | 478 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments