Commit 224c8fd
committed
Ask the scope table, not the uid map, whether an install matters
A scope row names a package; the cache derived from it is keyed by uid.
Uninstalling a target and installing it again crosses that gap: the app
returns under a new uid, the entry under the old one went when
ACTION_UID_REMOVED rebuilt the cache, and the install handler — which
recognised a target by looking its uid up in that same cache — matched
nothing and asked for no rebuild. The row it is still configured under
sat there unread.
Which left the configuration correct and inert. The manager reads the
table, so it went on showing the target ticked, truthfully; the draft
and the saved set agreed, so no apply bar appeared and there was no
difference to write. Nothing on that screen could put it right. It took
a scope edit on some other module, or the next boot, to rebuild the map
and bring the app back into a scope it had never left.
Removal now asks for its own rebuild for the same reason it should
always have: the entry was cleaned up only incidentally, by the
ACTION_UID_REMOVED that follows a uid actually being retired — which a
package sharing one never is, and which a daemon that was not running
never hears. What is left behind is keyed by a uid that no longer names
the app, and Android hands a freed app id to the next installer to ask.
The uid test stays behind the new one for the scope rows no table holds:
a module in its own scope, and the self-scope derived for a legacy one.1 parent d2c101a commit 224c8fd
2 files changed
Lines changed: 49 additions & 3 deletions
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
315 | 325 | | |
316 | 326 | | |
317 | 327 | | |
| |||
323 | 333 | | |
324 | 334 | | |
325 | 335 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
329 | 353 | | |
330 | 354 | | |
331 | 355 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
146 | 168 | | |
147 | 169 | | |
148 | 170 | | |
| |||
0 commit comments