Long-press menu in the app drawer, with Uninstall
Long-pressing an app in the drawer now opens a menu (Add to home or Remove from home, App info, Uninstall) instead of adding it straight to home. Uninstall fires ACTION_DELETE for the app's package (needs REQUEST_DELETE_PACKAGES) and is hidden for system apps, which apps.json now flags. When the uninstalled app leaves the reloaded list, its home slot is removed too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XicVK7N1cmDdm1ZwpHAxFD
This commit is contained in:
8 files changed
+105
-10
No files matched your search
@@ -115,6 +115,16 @@ const BASE = process.env.BASE || "http://localhost:8000";
|
||||
await swipe(200, 500);
|
||||
await p.waitForSelector(".drawer .tile", { timeout: 2000 });
|
||||
await longpress(".apps .tile:first-child");
|
||||
assert.deepEqual(await p.$$eval(".sheet-item", (bs) => bs.map((b) => b.textContent)), ["Add to home", "App info", "Uninstall"]);
|
||||
await p.click(".sheet-item:has-text('Uninstall')"); await settle();
|
||||
assert.equal(await p.textContent("#toast"), "Uninstall com.example.calculator/.MainActivity");
|
||||
assert.ok(!(await p.$(".sheet")) && (await p.$(".drawer")), "uninstalling closes the menu, not the drawer");
|
||||
await p.fill(".drawer input", "phone"); await settle();
|
||||
await longpress(".apps .tile:first-child");
|
||||
assert.ok(!(await p.$(".sheet-item:has-text('Uninstall')")), "system apps can't be uninstalled");
|
||||
await p.click(".sheet-overlay", { position: { x: 10, y: 10 } }); await p.fill(".drawer input", ""); await settle();
|
||||
await longpress(".apps .tile:first-child");
|
||||
await p.click(".sheet-item:has-text('Add to home')"); await settle();
|
||||
assert.equal(await p.textContent(".notice"), "Added to home");
|
||||
await swipe(600, 200);
|
||||
await p.waitForSelector(".drawer", { state: "detached", timeout: 2000 }); // swipe up closes it
|
||||
|
||||
Reference in new issue
Block a user