/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/db/ |
D | AppUsageEventEntity.java | 32 public class AppUsageEventEntity { class 55 public AppUsageEventEntity( in AppUsageEventEntity() method in AppUsageEventEntity 111 public static AppUsageEventEntity create(ContentValues contentValues) { in create() 112 Builder builder = AppUsageEventEntity.newBuilder(); in create() 202 public AppUsageEventEntity build() { in build() 203 return new AppUsageEventEntity( in build()
|
D | AppUsageEventDao.java | 34 void insert(AppUsageEventEntity event); in insert() 38 void insertAll(List<AppUsageEventEntity> events); in insertAll() 42 List<AppUsageEventEntity> getAllAfter(long timestamp); in getAllAfter()
|
D | BatteryStateDatabase.java | 30 AppUsageEventEntity.class,
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/ |
D | ConvertUtilsTest.java | 41 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 256 assertThat(values.getAsLong(AppUsageEventEntity.KEY_UID)).isEqualTo(101L); in convertAppUsageEventToContentValues_returnsExpectedContentValues() 257 assertThat(values.getAsLong(AppUsageEventEntity.KEY_USER_ID)).isEqualTo(1001L); in convertAppUsageEventToContentValues_returnsExpectedContentValues() 258 assertThat(values.getAsLong(AppUsageEventEntity.KEY_TIMESTAMP)).isEqualTo(10001L); in convertAppUsageEventToContentValues_returnsExpectedContentValues() 259 assertThat(values.getAsInteger(AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE)).isEqualTo(1); in convertAppUsageEventToContentValues_returnsExpectedContentValues() 260 assertThat(values.getAsString(AppUsageEventEntity.KEY_PACKAGE_NAME)) in convertAppUsageEventToContentValues_returnsExpectedContentValues() 262 assertThat(values.getAsInteger(AppUsageEventEntity.KEY_INSTANCE_ID)).isEqualTo(100001); in convertAppUsageEventToContentValues_returnsExpectedContentValues() 263 assertThat(values.getAsString(AppUsageEventEntity.KEY_TASK_ROOT_PACKAGE_NAME)) in convertAppUsageEventToContentValues_returnsExpectedContentValues() 492 AppUsageEventEntity.KEY_UID, in convertToAppUsageEvent_returnExpectedResult() 493 AppUsageEventEntity.KEY_USER_ID, in convertToAppUsageEvent_returnExpectedResult() [all …]
|
D | DataProcessManagerTest.java | 46 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 145 AppUsageEventEntity.KEY_UID, in start_loadEmptyDatabaseAppUsageData() 146 AppUsageEventEntity.KEY_PACKAGE_NAME, in start_loadEmptyDatabaseAppUsageData() 147 AppUsageEventEntity.KEY_TIMESTAMP in start_loadEmptyDatabaseAppUsageData() 207 AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE, in start_loadExpectedAppUsageData() 208 AppUsageEventEntity.KEY_TIMESTAMP, in start_loadExpectedAppUsageData() 209 AppUsageEventEntity.KEY_USER_ID, in start_loadExpectedAppUsageData() 210 AppUsageEventEntity.KEY_INSTANCE_ID, in start_loadExpectedAppUsageData() 211 AppUsageEventEntity.KEY_PACKAGE_NAME in start_loadExpectedAppUsageData() 330 AppUsageEventEntity.KEY_UID, in start_currentUserLocked_emptyAppUsageList() [all …]
|
D | DatabaseUtilsTest.java | 48 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 118 assertThat(valuesList.get(0).getAsInteger(AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE)) in sendAppUsageEventData_returnsExpectedList() 120 assertThat(valuesList.get(1).getAsInteger(AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE)) in sendAppUsageEventData_returnsExpectedList() 267 new MatrixCursor(new String[] {AppUsageEventEntity.KEY_TIMESTAMP}); in getAppUsageStartTimestampOfUser_emptyCursorContent_returnEarliestTimestamp() 291 new MatrixCursor(new String[] {AppUsageEventEntity.KEY_TIMESTAMP}); in getAppUsageStartTimestampOfUser_returnExpectedResult() 313 AppUsageEventEntity.KEY_UID, in getAppUsageEventForUsers_emptyCursorContent_returnEmptyMap() 314 AppUsageEventEntity.KEY_USER_ID, in getAppUsageEventForUsers_emptyCursorContent_returnEmptyMap() 315 AppUsageEventEntity.KEY_PACKAGE_NAME, in getAppUsageEventForUsers_emptyCursorContent_returnEmptyMap() 316 AppUsageEventEntity.KEY_TIMESTAMP, in getAppUsageEventForUsers_emptyCursorContent_returnEmptyMap() 317 AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE in getAppUsageEventForUsers_emptyCursorContent_returnEmptyMap() [all …]
|
D | BatteryUsageContentProviderTest.java | 31 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 357 values.put(AppUsageEventEntity.KEY_UID, 101L); in insert_appUsageEvent_returnsExpectedResult() 358 values.put(AppUsageEventEntity.KEY_USER_ID, 1001L); in insert_appUsageEvent_returnsExpectedResult() 359 values.put(AppUsageEventEntity.KEY_TIMESTAMP, 10001L); in insert_appUsageEvent_returnsExpectedResult() 360 values.put(AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE, 1); in insert_appUsageEvent_returnsExpectedResult() 361 values.put(AppUsageEventEntity.KEY_PACKAGE_NAME, "com.android.settings1"); in insert_appUsageEvent_returnsExpectedResult() 362 values.put(AppUsageEventEntity.KEY_INSTANCE_ID, 100001L); in insert_appUsageEvent_returnsExpectedResult() 363 values.put(AppUsageEventEntity.KEY_TASK_ROOT_PACKAGE_NAME, "com.android.settings2"); in insert_appUsageEvent_returnsExpectedResult() 369 final List<AppUsageEventEntity> entities = in insert_appUsageEvent_returnsExpectedResult()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/ |
D | ConvertUtils.java | 40 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 147 values.put(AppUsageEventEntity.KEY_UID, event.getUid()); in convertAppUsageEventToContentValues() 148 values.put(AppUsageEventEntity.KEY_USER_ID, event.getUserId()); in convertAppUsageEventToContentValues() 149 values.put(AppUsageEventEntity.KEY_TIMESTAMP, event.getTimestamp()); in convertAppUsageEventToContentValues() 150 values.put(AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE, event.getType().getNumber()); in convertAppUsageEventToContentValues() 151 values.put(AppUsageEventEntity.KEY_PACKAGE_NAME, event.getPackageName()); in convertAppUsageEventToContentValues() 152 values.put(AppUsageEventEntity.KEY_INSTANCE_ID, event.getInstanceId()); in convertAppUsageEventToContentValues() 153 values.put(AppUsageEventEntity.KEY_TASK_ROOT_PACKAGE_NAME, event.getTaskRootPackageName()); in convertAppUsageEventToContentValues() 294 eventBuilder.setTimestamp(getLongFromCursor(cursor, AppUsageEventEntity.KEY_TIMESTAMP)); in convertToAppUsageEvent() 298 cursor, AppUsageEventEntity.KEY_APP_USAGE_EVENT_TYPE))); in convertToAppUsageEvent() [all …]
|
D | BatteryUsageContentProvider.java | 32 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 170 mAppUsageEventDao.insert(AppUsageEventEntity.create(contentValues)); in insert()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/db/ |
D | AppUsageEventEntityTest.java | 38 AppUsageEventEntity entity = in testBuilder_returnsExpectedResult() 39 AppUsageEventEntity.newBuilder() in testBuilder_returnsExpectedResult()
|
D | AppUsageEventDaoTest.java | 75 final List<AppUsageEventEntity> entities = mAppUsageEventDao.getAllAfter(TIMESTAMP1); in appUsageEventDao_insertAll() 135 final List<AppUsageEventEntity> entities = mAppUsageEventDao.getAllAfter(0); in appUsageEventDao_clearAllBefore() 155 AppUsageEventEntity entity, long timestamp, String packageName) { in assertAppUsageEvent()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/ |
D | BatteryTestUtils.java | 45 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 170 final AppUsageEventEntity entity = in insertDataToAppUsageEventTable() 171 new AppUsageEventEntity( in insertDataToAppUsageEventTable()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/bugreport/ |
D | LogUtils.java | 31 import com.android.settings.fuelgauge.batteryusage.db.AppUsageEventEntity; 107 final List<AppUsageEventEntity> eventList = in dumpAppUsageDatabaseHist()
|