Commit 5d3d994
committed
Provide @ApplicationPasswordsClientId binding and guard SiteStore
The WordPress/Jetpack app had never bound a `@ApplicationPasswordsClientId`
in its Dagger graph, so any call into `ApplicationPasswordsStore` would
throw NoSuchElementException. This was latent — no production caller
hit the path on this app — until the new
`SiteStore.createApplicationPassword` started routing My Site through it
and crashed the app on launch.
- Provide `@ApplicationPasswordsClientId` from a new
`ApplicationPasswordsClientIdModule`, using the same device-interpolated
app name the Custom Tab flow already passes through `app_name`
("Jetpack Android App on <device>" / "WordPress Android App on …").
- Short-circuit `SiteStore.createApplicationPassword` to NotSupported
when the configuration is disabled, so we degrade gracefully rather
than crash if the binding is ever absent again.1 parent 86cb425 commit 5d3d994
2 files changed
Lines changed: 46 additions & 0 deletions
File tree
- WordPress/src/main/java/org/wordpress/android/modules
- libs/fluxc/src/main/java/org/wordpress/android/fluxc/store
Lines changed: 33 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 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
| |||
2402 | 2405 | | |
2403 | 2406 | | |
2404 | 2407 | | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
2405 | 2418 | | |
2406 | 2419 | | |
2407 | 2420 | | |
| |||
0 commit comments