Test: atest ChildlessActivityTest#testLaunchAnotherActivity_onTopOfIt
Test: atest CtsContentCaptureServiceTestCases # sanity check
Fixes:
128546985
Change-Id: I98baf8332bec3e75e43a08a6785e5ec77cfb6f7d
field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
field public static final int TYPE_ACTIVITY_PAUSED = 2; // 0x2
field public static final int TYPE_ACTIVITY_RESUMED = 1; // 0x1
+ field public static final int TYPE_ACTIVITY_STOPPED = 23; // 0x17
}
public abstract class ContentCaptureService extends android.app.Service {
field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR;
field public static final int TYPE_ACTIVITY_PAUSED = 2; // 0x2
field public static final int TYPE_ACTIVITY_RESUMED = 1; // 0x1
+ field public static final int TYPE_ACTIVITY_STOPPED = 23; // 0x17
}
public abstract class ContentCaptureService extends android.app.Service {
*/
public static final int TYPE_ACTIVITY_PAUSED = Event.ACTIVITY_PAUSED;
+ /**
+ * The activity stopped.
+ */
+ public static final int TYPE_ACTIVITY_STOPPED = Event.ACTIVITY_STOPPED;
+
/** @hide */
@IntDef(prefix = { "TYPE_" }, value = {
TYPE_ACTIVITY_RESUMED,
- TYPE_ACTIVITY_PAUSED
+ TYPE_ACTIVITY_PAUSED,
+ TYPE_ACTIVITY_STOPPED
})
@Retention(RetentionPolicy.SOURCE)
public @interface ActivityEventType{}
return "ACTIVITY_RESUMED";
case TYPE_ACTIVITY_PAUSED:
return "ACTIVITY_PAUSED";
+ case TYPE_ACTIVITY_STOPPED:
+ return "ACTIVITY_STOPPED";
default:
return "UKNOWN_TYPE: " + type;
}
taskRoot);
}
}
- if (mContentCaptureService != null
- && (event == Event.ACTIVITY_PAUSED || event == Event.ACTIVITY_RESUMED)) {
+ if (mContentCaptureService != null && (event == Event.ACTIVITY_PAUSED
+ || event == Event.ACTIVITY_RESUMED || event == Event.ACTIVITY_STOPPED)) {
mContentCaptureService.notifyActivityEvent(userId, activity, event);
}
}