Commit 2ac89c2
Fall back to device id for Logger userId (#2319)
- Add PREFERENCE_KEY_DEVICE_ID and include it in BLACKLISTED_KEYS so the id stays device-local and never replicates through PreferenceSync
- Generate the id lazily via UUID.randomUUID on first need, persisted through the existing PreferenceManager string API
- Substitute the persisted id (prefixed "device:") for userId in Logger.log when no signed-in user email is available, so unsigned telemetry can still be grouped per install
🤖 Auto-generated
Co-authored-by: Owen McGirr <o.a.mcgirr@gmail.com>1 parent 0d8e0b3 commit 2ac89c2
2 files changed
Lines changed: 17 additions & 0 deletions
File tree
- app/src/main/java/com/enaboapps/switchify
- backend/preferences
- utils
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
129 | 144 | | |
0 commit comments