Commit 4ec3084
committed
Fix: Refactored the SystemMediaControlResolver
The SystemMediaControlResolver has been refactored to better handle various Android versions and OEM customizations. It also introduces dedicated checks for One UI versions and displays a Toast message when media output settings cannot be opened.
Specific changes include:
* The logic for launching the system media control dialog has been refactored into a new private function `startSystemMediaControl()`.
* Added a new function `getOneUIVersionReadable()` to retrieve the One UI version.
* Fall back to `startSystemMediaControl()` when launching OEM-specific media control dialogs fails.
* Display a Toast message when media output settings cannot be opened.
* Added new strings in `strings.xml`.1 parent 951938d commit 4ec3084
1 file changed
Lines changed: 18 additions & 18 deletions
File tree
- app/src/main/java/org/akanework/gramophone/logic/utils/exoplayer/oem
app/src/main/java/org/akanework/gramophone/logic/utils/exoplayer/oem/SystemMediaControlResolver.kt
Lines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
75 | 85 | | |
76 | 86 | | |
77 | 87 | | |
| |||
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
133 | 146 | | |
134 | 147 | | |
135 | 148 | | |
| |||
140 | 153 | | |
141 | 154 | | |
142 | 155 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 156 | | |
0 commit comments