OSDN Git Service

Add Slices Data object and DB Contract
authorMatthew Fritze <mfritze@google.com>
Mon, 11 Dec 2017 23:01:11 +0000 (15:01 -0800)
committerMatthew Fritze <mfritze@google.com>
Wed, 13 Dec 2017 18:59:47 +0000 (10:59 -0800)
commit7fddfebf6ceb7bdf2fd0c63e878594f9b98122ae
tree5a246149d331488a2462c457c5eeeae87f4a6ff9
parent84e8c795b1bc4617a1608d94dfa6523f527d059c
Add Slices Data object and DB Contract

Add in a Data object used to represent one row
in a new SQLite database used for building Slices.

The database has the following schema:
- Key
- Title
- Subtitle
- Screentitle
- Icon
- Fragment
- Controller

The key is the preference key.
Title, subtitle and Icon are for UI info.
Screentitle and fragment are for the intent.
Controller is used to get dynamic ui info (like summary),
and to take actions on the slice (like a toggle).

The actual indexing and a Slice will be handled in a subsquent CL,
but a prototype can be found here: ag/3324435

Test: robotests
Bug: 67996923
Change-Id: Id91deb58a3ab89ce1dab5a3f34cdb9ade6263aa8
AndroidManifest.xml
src/com/android/settings/search/DatabaseIndexingUtils.java
src/com/android/settings/slices/SettingsSliceProvider.java [moved from src/com/android/settings/SettingsSliceProvider.java with 67% similarity]
src/com/android/settings/slices/SliceBroadcastReceiver.java [moved from src/com/android/settings/SliceBroadcastReceiver.java with 85% similarity]
src/com/android/settings/slices/SliceData.java [new file with mode: 0644]
src/com/android/settings/slices/SlicesDatabaseHelper.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/search/SearchIndexProviderCodeInspector.java
tests/robotests/src/com/android/settings/slices/SliceDataTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/slices/SlicesDatabaseHelperTest.java [new file with mode: 0644]