Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "fix SliceMetrics typo and disambiguate logTouch" into pi-dev
Browse files Browse the repository at this point in the history
am: 362b352

Change-Id: Id01778f18acba57ad19353e814fd0f8f278c3bc2
  • Loading branch information
cwren authored and android-build-merger committed Mar 28, 2018
2 parents 725f2df + 362b352 commit 315c41b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/current.txt
Expand Up @@ -7291,7 +7291,7 @@ package android.app.slice {
public class SliceMetrics {
ctor public SliceMetrics(android.content.Context, android.net.Uri);
method public void logHidden();
method public void logTouch(android.net.Uri);
method public void logTouch(int, android.net.Uri);
method public void logVisible();
}

Expand Down
17 changes: 13 additions & 4 deletions core/java/android/app/slice/SliceMetrics.java
Expand Up @@ -25,7 +25,7 @@
/**
* Metrics interface for slices.
*
* This is called by SliceView, so Slice develoers should
* This is called by SliceView, so Slice developers should
* not need to reference this class.
*
* @see androidx.slice.widget.SliceView
Expand Down Expand Up @@ -55,9 +55,18 @@ public void logHidden() {
}

/**
* To be called whenever the use interacts with a slice.
*@param subSlice The URI of the sub-slice that is the subject of the interaction.
* To be called whenever the user invokes a discrete action via a slice.
*
* <P>
* Use this for discrete events like a tap or the end of a drag,
* not for a continuous streams of events, such as the motion during a gesture.
* </P>
*
* @see androidx.slice.widget.EventInfo#actionType
*
* @param actionType The type of the event.
* @param subSlice The URI of the sub-slice that is the subject of the interaction.
*/
public void logTouch(@NonNull Uri subSlice) {
public void logTouch(int actionType, @NonNull Uri subSlice) {
}
}

0 comments on commit 315c41b

Please sign in to comment.