Use taskRootPackageName instead of packageName to load uid when usage
resource is USAGE_SOURCE_TASK_ROOT_ACTIVITY and taskRootPackageName is not empty. This logic is consistent with digital wellbeing: assign the screen-on time onto task root activity when usage resource is USAGE_SOURCE_TASK_ROOT_ACTIVITY. Bug: 260964679 Test: make RunSettingsRoboTests + manual Change-Id: I4c7ed342d8c00951879f5826bf79575f330ce86e
This commit is contained in:
@@ -256,7 +256,8 @@ public final class DataProcessor {
|
||||
break;
|
||||
}
|
||||
final AppUsageEvent appUsageEvent =
|
||||
ConvertUtils.convertToAppUsageEvent(context, event, userId);
|
||||
ConvertUtils.convertToAppUsageEvent(
|
||||
context, sUsageStatsManager, event, userId);
|
||||
if (appUsageEvent != null) {
|
||||
numEventsFetched++;
|
||||
appUsageEventList.add(appUsageEvent);
|
||||
|
Reference in New Issue
Block a user