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

Commit 366ac0a8 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Added logging for OverviewProxyService"

parents 14b93353 bd824571
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -51,7 +51,8 @@ import java.util.List;
 */
 */
public class OverviewProxyService implements CallbackController<OverviewProxyListener>, Dumpable {
public class OverviewProxyService implements CallbackController<OverviewProxyListener>, Dumpable {


    private static final String TAG = "OverviewProxyService";
    public static final String TAG_OPS = "OverviewProxyService";
    public static final boolean DEBUG_OVERVIEW_PROXY = false;
    private static final long BACKOFF_MILLIS = 5000;
    private static final long BACKOFF_MILLIS = 5000;


    private final Context mContext;
    private final Context mContext;
@@ -96,12 +97,12 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
                try {
                try {
                    service.linkToDeath(mOverviewServiceDeathRcpt, 0);
                    service.linkToDeath(mOverviewServiceDeathRcpt, 0);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    Log.e(TAG, "Lost connection to launcher service", e);
                    Log.e(TAG_OPS, "Lost connection to launcher service", e);
                }
                }
                try {
                try {
                    mOverviewProxy.onBind(mSysUiProxy);
                    mOverviewProxy.onBind(mSysUiProxy);
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    Log.e(TAG, "Failed to call onBind()", e);
                    Log.e(TAG_OPS, "Failed to call onBind()", e);
                }
                }
                notifyConnectionChanged();
                notifyConnectionChanged();
            }
            }
@@ -211,7 +212,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis


    @Override
    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println(TAG + " state:");
        pw.println(TAG_OPS + " state:");
        pw.print("  mConnectionBackoffAttempts="); pw.println(mConnectionBackoffAttempts);
        pw.print("  mConnectionBackoffAttempts="); pw.println(mConnectionBackoffAttempts);
        pw.print("  isCurrentUserSetup="); pw.println(mDeviceProvisionedController
        pw.print("  isCurrentUserSetup="); pw.println(mDeviceProvisionedController
                .isCurrentUserSetup());
                .isCurrentUserSetup());
+5 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,8 @@ import com.android.systemui.tuner.TunerService;
import static android.view.WindowManager.DOCKED_INVALID;
import static android.view.WindowManager.DOCKED_INVALID;
import static android.view.WindowManager.DOCKED_LEFT;
import static android.view.WindowManager.DOCKED_LEFT;
import static android.view.WindowManager.DOCKED_TOP;
import static android.view.WindowManager.DOCKED_TOP;
import static com.android.systemui.OverviewProxyService.DEBUG_OVERVIEW_PROXY;
import static com.android.systemui.OverviewProxyService.TAG_OPS;


/**
/**
 * Class to detect gestures on the navigation bar.
 * Class to detect gestures on the navigation bar.
@@ -118,6 +120,9 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
            event.transform(mTransformGlobalMatrix);
            event.transform(mTransformGlobalMatrix);
            try {
            try {
                overviewProxy.onMotionEvent(event);
                overviewProxy.onMotionEvent(event);
                if (DEBUG_OVERVIEW_PROXY) {
                    Log.d(TAG_OPS, "Send MotionEvent: " + event.toString());
                }
                return true;
                return true;
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                Log.e(TAG, "Callback failed", e);
                Log.e(TAG, "Callback failed", e);
+14 −0
Original line number Original line Diff line number Diff line
@@ -49,6 +49,8 @@ import com.android.systemui.shared.recents.utilities.Utilities;


import static android.view.WindowManagerPolicyConstants.NAV_BAR_LEFT;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_LEFT;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_BOTTOM;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_BOTTOM;
import static com.android.systemui.OverviewProxyService.DEBUG_OVERVIEW_PROXY;
import static com.android.systemui.OverviewProxyService.TAG_OPS;


/**
/**
 * Class to detect gestures on the navigation bar and implement quick scrub and switch.
 * Class to detect gestures on the navigation bar and implement quick scrub and switch.
@@ -144,6 +146,9 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene
                    try {
                    try {
                        final IOverviewProxy overviewProxy = mOverviewEventSender.getProxy();
                        final IOverviewProxy overviewProxy = mOverviewEventSender.getProxy();
                        overviewProxy.onQuickSwitch();
                        overviewProxy.onQuickSwitch();
                        if (DEBUG_OVERVIEW_PROXY) {
                            Log.d(TAG_OPS, "Quick Switch");
                        }
                    } catch (RemoteException e) {
                    } catch (RemoteException e) {
                        Log.e(TAG, "Failed to send start of quick switch.", e);
                        Log.e(TAG, "Failed to send start of quick switch.", e);
                    }
                    }
@@ -256,6 +261,9 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene
                        if (mQuickScrubActive) {
                        if (mQuickScrubActive) {
                            try {
                            try {
                                overviewProxy.onQuickScrubProgress(scrubFraction);
                                overviewProxy.onQuickScrubProgress(scrubFraction);
                                if (DEBUG_OVERVIEW_PROXY) {
                                    Log.d(TAG_OPS, "Quick Scrub Progress:" + scrubFraction);
                                }
                            } catch (RemoteException e) {
                            } catch (RemoteException e) {
                                Log.e(TAG, "Failed to send progress of quick scrub.", e);
                                Log.e(TAG, "Failed to send progress of quick scrub.", e);
                            }
                            }
@@ -355,6 +363,9 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene
            mTrackAnimator.start();
            mTrackAnimator.start();
            try {
            try {
                mOverviewEventSender.getProxy().onQuickScrubStart();
                mOverviewEventSender.getProxy().onQuickScrubStart();
                if (DEBUG_OVERVIEW_PROXY) {
                    Log.d(TAG_OPS, "Quick Scrub Start");
                }
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                Log.e(TAG, "Failed to send start of quick scrub.", e);
                Log.e(TAG, "Failed to send start of quick scrub.", e);
            }
            }
@@ -369,6 +380,9 @@ public class QuickScrubController extends GestureDetector.SimpleOnGestureListene
            mQuickScrubEndAnimator.start();
            mQuickScrubEndAnimator.start();
            try {
            try {
                mOverviewEventSender.getProxy().onQuickScrubEnd();
                mOverviewEventSender.getProxy().onQuickScrubEnd();
                if (DEBUG_OVERVIEW_PROXY) {
                    Log.d(TAG_OPS, "Quick Scrub End");
                }
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                Log.e(TAG, "Failed to send end of quick scrub.", e);
                Log.e(TAG, "Failed to send end of quick scrub.", e);
            }
            }