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

Commit 0bf6ec9e authored by Craig Mautner's avatar Craig Mautner
Browse files

Clean up warnings.

Change-Id: I1dfe21e5f64364c90565b594e28074cabe7daa64
parent 2268e7ee
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     * manager with lock held.  (This lock will be acquired in places
     * where the window manager is calling in with its own lock held.)
     */
    final Object mLock = new Object();
    private final Object mLock = new Object();

    Context mContext;
    IWindowManager mWindowManager;
@@ -694,9 +694,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            // Double the time it takes to take a screenshot from the keyguard
            return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER *
                    ViewConfiguration.getGlobalActionKeyTimeout());
        } else {
            return ViewConfiguration.getGlobalActionKeyTimeout();
        }
        return ViewConfiguration.getGlobalActionKeyTimeout();
    }

    private void cancelPendingScreenshotChordAction() {
@@ -739,6 +738,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    };

    private final Runnable mScreenshotRunnable = new Runnable() {
        @Override
        public void run() {
            takeScreenshot();
        }
@@ -845,6 +845,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    }

    /** {@inheritDoc} */
    @Override
    public void init(Context context, IWindowManager windowManager,
            WindowManagerFuncs windowManagerFuncs) {
        mContext = context;
@@ -947,6 +948,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    @Override
    public void setInitialDisplaySize(Display display, int width, int height, int density) {
        mDisplay = display;

+7 −7
Original line number Diff line number Diff line
@@ -118,6 +118,9 @@ public final class DisplayManagerService extends IDisplayManager.Stub {

    // The synchronization root for the display manager.
    // This lock guards most of the display manager's state.
    // NOTE: This is synchronized on while holding WindowManagerService.mWindowMap so never call
    // into WindowManagerService methods that require mWindowMap while holding this unless you are
    // very very sure that no deadlock can occur.
    private final SyncRoot mSyncRoot = new SyncRoot();

    // True if in safe mode.
@@ -158,7 +161,7 @@ public final class DisplayManagerService extends IDisplayManager.Stub {
            new CopyOnWriteArrayList<DisplayTransactionListener>();

    // Set to true if all displays have been blanked by the power manager.
    private int mAllDisplayBlankStateFromPowerManager;
    private int mAllDisplayBlankStateFromPowerManager = DISPLAY_BLANK_STATE_UNKNOWN;

    // Set to true when there are pending display changes that have yet to be applied
    // to the surface flinger state.
@@ -541,9 +544,8 @@ public final class DisplayManagerService extends IDisplayManager.Stub {
            synchronized (mSyncRoot) {
                if (mWifiDisplayAdapter != null) {
                    return mWifiDisplayAdapter.getWifiDisplayStatusLocked();
                } else {
                    return new WifiDisplayStatus();
                }
                return new WifiDisplayStatus();
            }
        } finally {
            Binder.restoreCallingIdentity(token);
@@ -812,11 +814,9 @@ public final class DisplayManagerService extends IDisplayManager.Stub {
            Slog.w(TAG, "Missing logical display to use for physical display device: "
                    + device.getDisplayDeviceInfoLocked());
            return;
        } else {
            boolean isBlanked = (mAllDisplayBlankStateFromPowerManager
                    == DISPLAY_BLANK_STATE_BLANKED);
            display.configureDisplayInTransactionLocked(device, isBlanked);
        }
        boolean isBlanked = (mAllDisplayBlankStateFromPowerManager == DISPLAY_BLANK_STATE_BLANKED);
        display.configureDisplayInTransactionLocked(device, isBlanked);

        // Update the viewports if needed.
        DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked();
+1 −2
Original line number Diff line number Diff line
@@ -267,8 +267,7 @@ class ScreenRotationAnimation {
    private void setSnapshotTransformInTransaction(Matrix matrix, float alpha) {
        if (mSurface != null) {
            matrix.getValues(mTmpFloats);
            mSurface.setPosition(mTmpFloats[Matrix.MTRANS_X],
                    mTmpFloats[Matrix.MTRANS_Y]);
            mSurface.setPosition(mTmpFloats[Matrix.MTRANS_X], mTmpFloats[Matrix.MTRANS_Y]);
            mSurface.setMatrix(
                    mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
                    mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
+17 −12
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ public class WindowManagerService extends IWindowManager.Stub
    // This is held as long as we have the screen frozen, to give us time to
    // perform a rotation animation when turning off shows the lock screen which
    // changes the orientation.
    PowerManager.WakeLock mScreenFrozenLock;
    private PowerManager.WakeLock mScreenFrozenLock;

    final AppTransition mAppTransition;
    boolean mStartingIconInTransition = false;
@@ -761,8 +761,7 @@ public class WindowManagerService extends IWindowManager.Stub
        mPowerManager = pm;
        mPowerManager.setPolicy(mPolicy);
        PowerManager pmc = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
        mScreenFrozenLock = pmc.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
                "SCREEN_FROZEN");
        mScreenFrozenLock = pmc.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SCREEN_FROZEN");
        mScreenFrozenLock.setReferenceCounted(false);

        mAppTransition = new AppTransition(context, mH);
@@ -4714,6 +4713,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    @Override
    public void closeSystemDialogs(String reason) {
        synchronized(mWindowMap) {
            final AllWindowsIterator iterator = new AllWindowsIterator();
@@ -4735,6 +4735,7 @@ public class WindowManagerService extends IWindowManager.Stub
        return Math.abs(scale);
    }

    @Override
    public void setAnimationScale(int which, float scale) {
        if (!checkCallingPermission(android.Manifest.permission.SET_ANIMATION_SCALE,
                "setAnimationScale()")) {
@@ -5468,8 +5469,7 @@ public class WindowManagerService extends IWindowManager.Stub

        mWindowsFreezingScreen = true;
        mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
        mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT,
                WINDOW_FREEZE_TIMEOUT_DURATION);
        mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT, WINDOW_FREEZE_TIMEOUT_DURATION);
        mWaitingForConfig = true;
        getDefaultDisplayContentLocked().layoutNeeded = true;
        startFreezingDisplayLocked(inTransaction, 0, 0);
@@ -5540,13 +5540,16 @@ public class WindowManagerService extends IWindowManager.Stub
        return true;
    }

    @Override
    public int getRotation() {
        return mRotation;
    }

    @Override
    public int watchRotation(IRotationWatcher watcher) {
        final IBinder watcherBinder = watcher.asBinder();
        IBinder.DeathRecipient dr = new IBinder.DeathRecipient() {
            @Override
            public void binderDied() {
                synchronized (mWindowMap) {
                    for (int i=0; i<mRotationWatchers.size(); i++) {
@@ -8277,7 +8280,10 @@ public class WindowManagerService extends IWindowManager.Stub
                    if (DEBUG_LAYOUT_REPEATS) debugLayoutRepeats("On entry to LockedInner",
                        displayContent.pendingLayoutChanges);

                    if ((adjustWallpaperWindowsLocked() & ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
                    if ((displayContent.pendingLayoutChanges &
                            WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0 &&
                            (adjustWallpaperWindowsLocked() &
                                    ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
                        assignLayersLocked(windows);
                        displayContent.layoutNeeded = true;
                    }
@@ -9338,15 +9344,14 @@ public class WindowManagerService extends IWindowManager.Stub
        } catch (FileNotFoundException e) {
        } catch (IOException e) {
        } finally {
            if (in != null) {
            if (ind != null) {
                try {
                    in.close();
                    ind.close();
                } catch (IOException e) {
                }
            }
            if (ind != null) {
            } else if (in != null) {
                try {
                    ind.close();
                    in.close();
                } catch (IOException e) {
                }
            }
+18 −12
Original line number Diff line number Diff line
@@ -223,30 +223,36 @@ final class WindowState implements WindowManagerPolicy.WindowState {
     */
    boolean mRelayoutCalled;

    // If the application has called relayout() with changes that can
    // impact its window's size, we need to perform a layout pass on it
    // even if it is not currently visible for layout.  This is set
    // when in that case until the layout is done.
    /**
     * If the application has called relayout() with changes that can
     * impact its window's size, we need to perform a layout pass on it
     * even if it is not currently visible for layout.  This is set
     * when in that case until the layout is done.
     */
    boolean mLayoutNeeded;

    // Currently running an exit animation?
    /** Currently running an exit animation? */
    boolean mExiting;

    // Currently on the mDestroySurface list?
    /** Currently on the mDestroySurface list? */
    boolean mDestroying;

    // Completely remove from window manager after exit animation?
    /** Completely remove from window manager after exit animation? */
    boolean mRemoveOnExit;

    // Set when the orientation is changing and this window has not yet
    // been updated for the new orientation.
    /**
     * Set when the orientation is changing and this window has not yet
     * been updated for the new orientation.
     */
    boolean mOrientationChanging;

    // Is this window now (or just being) removed?
    /** Is this window now (or just being) removed? */
    boolean mRemoved;

    // Temp for keeping track of windows that have been removed when
    // rebuilding window list.
    /**
     * Temp for keeping track of windows that have been removed when
     * rebuilding window list.
     */
    boolean mRebuilding;

    // Input channel and input window handle used by the input dispatcher.