Merge "Add perfetto traces to privateProfile CUJs" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
519be86c57
@@ -45,6 +45,7 @@ import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Trace;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.Log;
|
||||
@@ -220,6 +221,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
* when animation is not running.
|
||||
*/
|
||||
public void reset() {
|
||||
Trace.beginSection("PrivateProfileManager#reset");
|
||||
// Ensure the state of the header view is what it should be before animating.
|
||||
updateView();
|
||||
getMainRecyclerView().setChildAttachedConsumer(null);
|
||||
@@ -239,6 +241,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
executeLock();
|
||||
}
|
||||
addPrivateSpaceDecorator(updatedState);
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
/** Returns whether or not Private Space Settings Page is available. */
|
||||
@@ -312,7 +315,9 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
|
||||
/** Collapses the private space before the app list has been updated. */
|
||||
void executeLock() {
|
||||
Trace.beginSection("PrivateProfileManager#executeLock");
|
||||
MAIN_EXECUTOR.execute(() -> updatePrivateStateAnimator(false));
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
void setAnimationRunning(boolean isAnimationRunning) {
|
||||
@@ -359,6 +364,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
if (mPSHeader == null) {
|
||||
return;
|
||||
}
|
||||
Trace.beginSection("PrivateProfileManager#updateView");
|
||||
Log.d(TAG, "bindPrivateSpaceHeaderViewElements: " + "Updating view with state: "
|
||||
+ getCurrentState());
|
||||
mPSHeader.setAlpha(1);
|
||||
@@ -417,6 +423,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
}
|
||||
}
|
||||
mPSHeader.invalidate();
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
/** Sets the enablement of the profile when header or button is clicked. */
|
||||
@@ -821,6 +828,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
ActivityAllAppsContainerView<?>.AdapterHolder mainAdapterHolder = mAllApps.mAH.get(MAIN);
|
||||
List<BaseAllAppsAdapter.AdapterItem> adapterItems =
|
||||
mainAdapterHolder.mAppsList.getAdapterItems();
|
||||
Trace.beginSection("PrivateProfileManager#expandPrivateSpace");
|
||||
if (Flags.enablePrivateSpace() && Flags.privateSpaceAnimation()
|
||||
&& mAllApps.isPersonalTab()) {
|
||||
// Animate the text and settings icon.
|
||||
@@ -830,6 +838,7 @@ public class PrivateProfileManager extends UserProfileManager {
|
||||
getPsHeaderHeight(), deviceProfile.allAppsCellHeightPx);
|
||||
updatePrivateStateAnimator(true);
|
||||
}
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
private void exitSearchAndExpand() {
|
||||
|
||||
Reference in New Issue
Block a user