Merge "Don't inform usage stats of interaction for a toast" into nyc-mr1-dev

This commit is contained in:
Amith Yamasani
2016-09-21 21:38:18 +00:00
committed by Android (Google) Code Review

View File

@@ -20700,8 +20700,10 @@ public final class ActivityManagerService extends ActivityManagerNative
isInteraction = nowElapsed > app.fgInteractionTime + SERVICE_USAGE_INTERACTION_TIME; isInteraction = nowElapsed > app.fgInteractionTime + SERVICE_USAGE_INTERACTION_TIME;
} }
} else { } else {
isInteraction = app.curProcState // If the app was being forced to the foreground, by say a Toast, then
<= ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND; // no need to treat it as an interaction
isInteraction = app.forcingToForeground == null
&& app.curProcState <= ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
app.fgInteractionTime = 0; app.fgInteractionTime = 0;
} }
if (isInteraction && (!app.reportedInteraction if (isInteraction && (!app.reportedInteraction