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

Commit b1c23eed authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/33787925',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/33787925', 'googleplex-android-review.googlesource.com/33814574'] into sparse-13579422-L37700030012705343.
SPARSE_CHANGE: Iddc01cbb2138615ea28631991bc6b415e5aa3020
SPARSE_CHANGE: I92353399e55afa020d0b2129b54c456c95db4596

Change-Id: Ibc766f6f3ad9f1975264164d951555ee0daa2397
parents 7da508ad 2147baa4
Loading
Loading
Loading
Loading
+10 −11
Original line number Original line Diff line number Diff line
@@ -21142,6 +21142,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (isHorizontalScrollBarEnabled() || isVerticalScrollBarEnabled()) {
        if (isHorizontalScrollBarEnabled() || isVerticalScrollBarEnabled()) {
            if (invalidate) {
                // Invalidate to show the scrollbars
                postInvalidateOnAnimation();
            }
            if (scrollCache.state == ScrollabilityCache.OFF) {
            if (scrollCache.state == ScrollabilityCache.OFF) {
                // FIXME: this is copied from WindowManagerService.
                // FIXME: this is copied from WindowManagerService.
                // We should get this value from the system when it
                // We should get this value from the system when it
@@ -21157,18 +21162,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            scrollCache.state = ScrollabilityCache.ON;
            scrollCache.state = ScrollabilityCache.ON;
            // Schedule our fader to run if it's not already scheduled
            // Schedule our fader to run if it's not already scheduled
            if (!scrollCache.fadeScrollBarsScheduled) {
            if (!scrollCache.fadeScrollBarsScheduled && mAttachInfo != null) {
                if (invalidate) {
                    // Invalidate to show the scrollbars
                    postInvalidateOnAnimation();
                }
                if (mAttachInfo != null) {
                final Handler handler = mAttachInfo.mHandler;
                final Handler handler = mAttachInfo.mHandler;
                scrollCache.handler = handler;
                scrollCache.handler = handler;
                scrollCache.fadeScrollBarsScheduled = true;
                scrollCache.fadeScrollBarsScheduled = true;
                handler.postAtTime(scrollCache, fadeStartTime);
                handler.postAtTime(scrollCache, fadeStartTime);
            }
            }
            }
            return true;
            return true;
        }
        }
+1 −19
Original line number Original line Diff line number Diff line
@@ -162,20 +162,6 @@ public class AdbService extends IAdbManager.Stub {
            mContentResolver.registerContentObserver(
            mContentResolver.registerContentObserver(
                    Settings.Global.getUriFor(Settings.Global.ADB_WIFI_ENABLED),
                    Settings.Global.getUriFor(Settings.Global.ADB_WIFI_ENABLED),
                    false, mObserver);
                    false, mObserver);

            /*
             * The observer will only trigger when the value *changes*.
             * We need to initialize the state according to the current setting value.
             */
            if (Settings.Global.getInt(mContentResolver,
                                       Settings.Global.ADB_ENABLED, 0) != 0) {
                mObserver.setInitialAdbState(true, AdbTransportType.USB);
            }

            if (Settings.Global.getInt(mContentResolver,
                                       Settings.Global.ADB_WIFI_ENABLED, 0) != 0) {
                mObserver.setInitialAdbState(true, AdbTransportType.WIFI);
            }
        } catch (Exception e) {
        } catch (Exception e) {
            Slog.e(TAG, "Error in registerContentObservers", e);
            Slog.e(TAG, "Error in registerContentObservers", e);
        }
        }
@@ -211,10 +197,6 @@ public class AdbService extends IAdbManager.Stub {
                setAdbEnabled(shouldEnable, AdbTransportType.WIFI);
                setAdbEnabled(shouldEnable, AdbTransportType.WIFI);
            }
            }
        }
        }

        private void setInitialAdbState(boolean enable, byte transportType) {
            setAdbEnabled(enable, transportType);
        }
    }
    }


    private static final String TAG = AdbService.class.getSimpleName();
    private static final String TAG = AdbService.class.getSimpleName();
@@ -244,7 +226,7 @@ public class AdbService extends IAdbManager.Stub {


    private final AdbDebuggingManager mDebuggingManager;
    private final AdbDebuggingManager mDebuggingManager;


    private AdbSettingsObserver mObserver;
    private ContentObserver mObserver;


    private AdbService(Context context) {
    private AdbService(Context context) {
        mContext = context;
        mContext = context;