Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebb0485c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Add perflock for NotificationBar drag animation"

parents 6acbaa4b ea21248c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2312,6 +2312,10 @@
    <integer name="ascrollboost_timeout">0</integer>
    <integer-array name="ascrollboost_param_value"/>

    <!-- cpu boost for PanelView fling -->
    <bool name="config_enableCpuBoostForPanelViewFling">false</bool>
    <integer-array name="panelview_flingboost_param_value" />

   <!-- Configuration to play sms ringtone during MO/MT call -->
   <bool name="config_sms_ringtone_incall">false</bool>
    <!-- IpReachability monitor enable/Disable -->
+4 −0
Original line number Diff line number Diff line
@@ -2365,6 +2365,10 @@
  <java-symbol type="integer" name="ascrollboost_timeout" />
  <java-symbol type="array" name="ascrollboost_param_value" />

  <!-- cpu boost for PanelView fling -->
  <java-symbol type="bool" name="config_enableCpuBoostForPanelViewFling" />
  <java-symbol type="array" name="panelview_flingboost_param_value" />

  <!-- for wifi auto connection -->
  <java-symbol type="bool" name="wifi_autocon" />
  <!-- Configuration to play sms ringtone during MO/MT call -->
+22 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.systemui.doze.DozeLog;
import com.android.systemui.statusbar.FlingAnimationUtils;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import android.util.BoostFramework;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -85,6 +86,11 @@ public abstract class PanelView extends FrameLayout {
    private ObjectAnimator mPeekAnimator;
    private VelocityTrackerInterface mVelocityTracker;
    private FlingAnimationUtils mFlingAnimationUtils;
    /**
     * For PanelView fling perflock call
     */
    private BoostFramework mPerf = null;
    private int mBoostParamVal[];

    /**
     * Whether an instant expand request is currently pending and we are just waiting for layout.
@@ -190,6 +196,13 @@ public abstract class PanelView extends FrameLayout {
        mLinearOutSlowInInterpolator =
                AnimationUtils.loadInterpolator(context, android.R.interpolator.linear_out_slow_in);
        mBounceInterpolator = new BounceInterpolator();
        boolean lIsPerfBoostEnabled = context.getResources().getBoolean(
                com.android.internal.R.bool.config_enableCpuBoostForPanelViewFling);
        if (lIsPerfBoostEnabled) {
            mBoostParamVal = context.getResources().getIntArray(
                    com.android.internal.R.array.panelview_flingboost_param_value);
            mPerf = new BoostFramework();
        }
    }

    protected void loadDimens() {
@@ -659,16 +672,25 @@ public abstract class PanelView extends FrameLayout {
                                / collapseSpeedUpFactor));
            }
        }
        if (mPerf != null) {
            mPerf.perfLockAcquire(0, mBoostParamVal);
        }
        animator.addListener(new AnimatorListenerAdapter() {
            private boolean mCancelled;

            @Override
            public void onAnimationCancel(Animator animation) {
                if (mPerf != null) {
                    mPerf.perfLockRelease();
                }
                mCancelled = true;
            }

            @Override
            public void onAnimationEnd(Animator animation) {
                if (mPerf != null) {
                    mPerf.perfLockRelease();
                }
                if (clearAllExpandHack && !mCancelled) {
                    setExpandedHeightInternal(getMaxPanelHeight());
                }