Skip to content
Commit 0f07c5e8 authored by Nandana Dutt's avatar Nandana Dutt
Browse files

Fix retrieval of instant app cookies from cache

The in-memory cache stores cookies by user-id and package so that
pending persistence can be easily canceled. CTS tests that do "set
cooke -> uninstall pkg -> install pkg -> get cookie" fail on devices
that are fast enough to complete the install within 1 second. This is
because the cache lookup used the package object, which would be
regenerated on install and no longer equal to the old package object.

Changing the look up to package name instead fixes this issue since package
names are stable across installs.

BUG: 110379319
Test: cts-tradefed run cts -m CtsAppSecurityHostTestCases -t
android.appsecurity.cts.InstantCookieHostTest (Reproduced the failed tests before the change, and ensured they now pass).

Change-Id: Ie0138399c715e7a69bea2421fad013559ba75ae3
parent 89b325a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment