car/src/main/java/androidx/car/moderator/SpeedBumpController.java
void stop() {
        if (mCarUxRestrictionsManager != null) {
            try {
                mCarUxRestrictionsManager.unregisterListener();
            } catch (CarNotConnectedException e) {
                // Do nothing.
                Log.w(TAG, "stop(); cannot unregister listener.");
            }
            mCarUxRestrictionsManager = null;
        }
        try {
            if (mCar != null && mCar.isConnected()) {
                mCar.disconnect();
            }
        } catch (IllegalStateException e) {
            // Do nothing.
            Log.w(TAG, "stop(); cannot disconnect from Car.");
        }
    }
/**
     * Stops monitoring any changes in {@link CarUxRestrictions}.
     *
     * <p>This method should be called from {@code Activity}'s {@link Activity#onStop()}, or at the
     * time of this adapter being discarded.
     */
Stops monitoring any changes in  CarUxRestrictions.
This method should be called from  Activity's  Activity#onStop(), or at the
time of this adapter being discarded.
Stops monitoring any changes in CarUxRestrictions . This method should be called from Activity ' s Activity#onStop () or at the time of this adapter being discarded .
void stop() {
        if (mCarUxRestrictionsManager != null) {
            try {
                mCarUxRestrictionsManager.unregisterListener();
            } catch (CarNotConnectedException e) {
                Log.w(TAG, "stop(); cannot unregister listener.");
            }
            mCarUxRestrictionsManager = null;
        }
        try {
            if (mCar != null && mCar.isConnected()) {
                mCar.disconnect();
            }
        } catch (IllegalStateException e) {
            Log.w(TAG, "stop(); cannot disconnect from Car.");
        }
    }
void stop ( ) { if ( mCarUxRestrictionsManager != null ) { try { mCarUxRestrictionsManager . unregisterListener ( ) ; } catch ( CarNotConnectedException e ) { Log . w ( TAG , "stop(); cannot unregister listener." ) ; } mCarUxRestrictionsManager = null ; } try { if ( mCar != null && mCar . isConnected ( ) ) { mCar . disconnect ( ) ; } } catch ( IllegalStateException e ) { Log . w ( TAG , "stop(); cannot disconnect from Car." ) ; } }
Stops monitoring any changes in {@link CarUxRestrictions}.
Stops monitoring any changes in { @link CarUxRestrictions } .
// Do nothing. // Do nothing.