History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/sqlite/SqlChecker.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e2e9ac275e487ce558579ee65ff8f122cf498b07 06-Oct-2016 Makoto Onuki <omakoto@google.com> Don't expose raw usage stats to clients; return "low-res" values.

- "times_used" now return values after the following conversion:
value == 0 -> 0
value < 10 -> 1
10 <= value <= 19 -> 10
20 <= value <= 29 -> 20
:
:

- "last_time_used" now returns values in day granularity.

Test: run-all-tests.sh
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check \
com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a \
-m CtsProviderTestCases

Bug 31753890

Change-Id: Ief2b93ce7775bb6482c03ceb1ba0fd367d51eed8
/packages/providers/ContactsProvider/src/com/android/providers/contacts/sqlite/SqlChecker.java
9d70f53e0d2eda1356af27b2a083c96257ff872e 20-Sep-2016 Makoto Onuki <omakoto@google.com> SQL token checker to detect uses of hidden tables/columns

- Detect invalid SQL code (e.g. contains a semi-colon)
in not only WHERE for query() but in other places too.

- Disallow use of the word "select" and table/view names
in the supplied code to prevent subqueries.

- This mechanism will be used to hide columns in the futire too.

Test: adb shell am instrument -w com.android.providers.contacts.tests

Bug 31559073

Change-Id: Ib4293b4caf7e341186ee8bd4cc2d7dad7155c48d
/packages/providers/ContactsProvider/src/com/android/providers/contacts/sqlite/SqlChecker.java