Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d99098f authored by Cassy Chun-Crogan's avatar Cassy Chun-Crogan
Browse files

[DocsUI] Return specified val when cursor doesn't have an int column

Update getCursorInt() so that when the cursor is null or the column
doesn't exist, a default value is specified by the caller. Previously,
0 was always returned. However this doesn't work when 0 can be a legit
value as then we can't tell the difference between a 0 value and a
null/missing value.

This is important as progress updates get introduced in b/415947063
and we need to tell the difference between 0% and no progress.

Keep the original getCursorInt() and have it use 0 as the default
value as there are many existing callers of this method.

Flag: EXEMPT this is not behind a flag
Bug: 415947063
Test: atest com.android.documentsui.base.DocumentInfoTest#testGetCursorInt
Change-Id: I0129129415ac0dc8863f7938c11c1323fb1c9484
parent 1b65fbf7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment