Merge "Add additional logging for region sampling helper" into rvc-dev am: f83fb7e2ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11937066 Change-Id: Id28d1c97411a49c1315b75638bee6b3eaaa4069c
This commit is contained in:
@@ -57,7 +57,6 @@ public final class NavigationBarTransitions extends BarTransitions implements
|
||||
}
|
||||
|
||||
private final NavigationBarView mView;
|
||||
private final IStatusBarService mBarService;
|
||||
private final LightBarTransitionsController mLightTransitionsController;
|
||||
private final boolean mAllowAutoDimWallpaperNotVisible;
|
||||
private boolean mWallpaperVisible;
|
||||
@@ -82,8 +81,6 @@ public final class NavigationBarTransitions extends BarTransitions implements
|
||||
public NavigationBarTransitions(NavigationBarView view, CommandQueue commandQueue) {
|
||||
super(view, R.drawable.nav_background);
|
||||
mView = view;
|
||||
mBarService = IStatusBarService.Stub.asInterface(
|
||||
ServiceManager.getService(Context.STATUS_BAR_SERVICE));
|
||||
mLightTransitionsController = new LightBarTransitionsController(
|
||||
view.getContext(), this, commandQueue);
|
||||
mAllowAutoDimWallpaperNotVisible = view.getContext().getResources()
|
||||
|
||||
@@ -140,6 +140,7 @@ public class NavigationBarView extends FrameLayout implements
|
||||
private boolean mInCarMode = false;
|
||||
private boolean mDockedStackExists;
|
||||
private boolean mImeVisible;
|
||||
private boolean mScreenOn = true;
|
||||
|
||||
private final SparseArray<ButtonDispatcher> mButtonDispatchers = new SparseArray<>();
|
||||
private final ContextualButtonGroup mContextualButtonGroup;
|
||||
@@ -573,6 +574,7 @@ public class NavigationBarView extends FrameLayout implements
|
||||
|
||||
/** To be called when screen lock/unlock state changes */
|
||||
public void onScreenStateChanged(boolean isScreenOn) {
|
||||
mScreenOn = isScreenOn;
|
||||
if (isScreenOn) {
|
||||
if (isGesturalModeOnDefaultDisplay(getContext(), mNavBarMode)) {
|
||||
mRegionSamplingHelper.start(mSamplingBounds);
|
||||
@@ -1217,6 +1219,7 @@ public class NavigationBarView extends FrameLayout implements
|
||||
dumpButton(pw, "a11y", getAccessibilityButton());
|
||||
|
||||
pw.println(" }");
|
||||
pw.println(" mScreenOn: " + mScreenOn);
|
||||
|
||||
if (mNavigationInflaterView != null) {
|
||||
mNavigationInflaterView.dump(pw);
|
||||
|
||||
@@ -41,7 +41,6 @@ public class RegionSamplingHelper implements View.OnAttachStateChangeListener,
|
||||
private final View mSampledView;
|
||||
|
||||
private final CompositionSamplingListener mSamplingListener;
|
||||
private final Runnable mUpdateSamplingListener = this::updateSamplingListener;
|
||||
|
||||
/**
|
||||
* The requested sampling bounds that we want to sample from
|
||||
@@ -59,6 +58,7 @@ public class RegionSamplingHelper implements View.OnAttachStateChangeListener,
|
||||
private float mLastMedianLuma;
|
||||
private float mCurrentMedianLuma;
|
||||
private boolean mWaitingOnDraw;
|
||||
private boolean mIsDestroyed;
|
||||
|
||||
// Passing the threshold of this luminance value will make the button black otherwise white
|
||||
private final float mLuminanceThreshold;
|
||||
@@ -130,6 +130,7 @@ public class RegionSamplingHelper implements View.OnAttachStateChangeListener,
|
||||
void stopAndDestroy() {
|
||||
stop();
|
||||
mSamplingListener.destroy();
|
||||
mIsDestroyed = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,12 +230,17 @@ public class RegionSamplingHelper implements View.OnAttachStateChangeListener,
|
||||
pw.println(" sampleView isAttached: " + mSampledView.isAttachedToWindow());
|
||||
pw.println(" sampleView isScValid: " + (mSampledView.isAttachedToWindow()
|
||||
? mSampledView.getViewRootImpl().getSurfaceControl().isValid()
|
||||
: "false"));
|
||||
: "notAttached"));
|
||||
pw.println(" mSamplingEnabled: " + mSamplingEnabled);
|
||||
pw.println(" mSamplingListenerRegistered: " + mSamplingListenerRegistered);
|
||||
pw.println(" mSamplingRequestBounds: " + mSamplingRequestBounds);
|
||||
pw.println(" mRegisteredSamplingBounds: " + mRegisteredSamplingBounds);
|
||||
pw.println(" mLastMedianLuma: " + mLastMedianLuma);
|
||||
pw.println(" mCurrentMedianLuma: " + mCurrentMedianLuma);
|
||||
pw.println(" mWindowVisible: " + mWindowVisible);
|
||||
pw.println(" mWaitingOnDraw: " + mWaitingOnDraw);
|
||||
pw.println(" mRegisteredStopLayer: " + mRegisteredStopLayer);
|
||||
pw.println(" mIsDestroyed: " + mIsDestroyed);
|
||||
}
|
||||
|
||||
public interface SamplingCallback {
|
||||
|
||||
Reference in New Issue
Block a user