[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
Loading
Please register or sign in to comment