Snap for 9239178 from 1194a6156c to udc-release
Change-Id: Idf940cda92214c39bf8e60ea08489dd9c76728ac
This commit is contained in:
commit
290a5bf68a
3 files changed
+27
-8
No files matched your search
@@ -473,6 +473,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
private int mPackageId = 0;
|
||||
private long mLatencyInMillis;
|
||||
private int mQueryLength = -1;
|
||||
private int mSubEventType = 0;
|
||||
|
||||
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
|
||||
mContext = context;
|
||||
@@ -509,6 +510,12 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsLatencyLogger withSubEventType(int type) {
|
||||
this.mSubEventType = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(EventEnum event) {
|
||||
if (IS_VERBOSE) {
|
||||
@@ -526,7 +533,8 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
mPackageId, // package_id
|
||||
mLatencyInMillis, // latency_in_millis
|
||||
mType.getId(), //type
|
||||
mQueryLength // query_length
|
||||
mQueryLength, // query_length
|
||||
mSubEventType // sub_event_type
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -781,7 +781,6 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -813,6 +812,13 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets sub event type.
|
||||
*/
|
||||
default StatsLatencyLogger withSubEventType(int type) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets packageId of log message.
|
||||
*/
|
||||
|
||||
@@ -44,8 +44,6 @@ public class ScrollableLayoutManager extends GridLayoutManager {
|
||||
* whereas widgets will have strictly increasing values
|
||||
* sample values: 0, 10, 50, 60, 110
|
||||
*/
|
||||
|
||||
//
|
||||
private int[] mTotalHeightCache = new int[1];
|
||||
private int mLastValidHeightIndex = 0;
|
||||
|
||||
@@ -62,16 +60,23 @@ public class ScrollableLayoutManager extends GridLayoutManager {
|
||||
@Override
|
||||
public void layoutDecorated(@NonNull View child, int left, int top, int right, int bottom) {
|
||||
super.layoutDecorated(child, left, top, right, bottom);
|
||||
mCachedSizes.put(
|
||||
mRv.getChildViewHolder(child).getItemViewType(), child.getMeasuredHeight());
|
||||
updateCachedSize(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void layoutDecoratedWithMargins(@NonNull View child, int left, int top, int right,
|
||||
int bottom) {
|
||||
super.layoutDecoratedWithMargins(child, left, top, right, bottom);
|
||||
mCachedSizes.put(
|
||||
mRv.getChildViewHolder(child).getItemViewType(), child.getMeasuredHeight());
|
||||
updateCachedSize(child);
|
||||
}
|
||||
|
||||
private void updateCachedSize(@NonNull View child) {
|
||||
int viewType = mRv.getChildViewHolder(child).getItemViewType();
|
||||
int size = child.getMeasuredHeight();
|
||||
if (mCachedSizes.get(viewType, -1) != size) {
|
||||
invalidateScrollCache();
|
||||
}
|
||||
mCachedSizes.put(viewType, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user