Repository navigation
Commit dba83ca
fix(widget): open the tapped note from the note list widget
The note list widget used WidgetUtil.pendingIntentFlagCompat() for its
PendingIntent template, which adds FLAG_IMMUTABLE on Android 14+ (API 34+).
An immutable PendingIntent cannot be modified at send time, so the
per-item fill-in intent carrying the note id was discarded and
EditNoteActivity received an intent without PARAM_NOTE_ID, falling back
to creating a new note instead of opening the tapped one.
Use FLAG_MUTABLE explicitly (as SingleNoteWidget already does) so the
fill-in intent with the note id is applied, and use the appWidgetId as
PendingIntent request code so widget instances no longer share one
PendingIntent.
Affected devices: Android 14 and newer (API 34+). On Android 12-13
pendingIntentFlagCompat() returned FLAG_MUTABLE and on Android 11 and
below no flag was added, so the fill-in intent worked there.
AI-assistant: Cline Extension 1.x (GLM-5.3)
Signed-off-by: Mark <mark-smirnow@yandex.ru>1 parent e6aab55 commit dba83ca
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
| 100 | + | |
102 | 101 | | |
103 | | - | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
0 commit comments