am e64a8bbc: am e4035827: Merge "Always initialize local boolean variables when possible" into klp-dev
* commit 'e64a8bbc37bf3370fb315c1a353274bc7481e352': Always initialize local boolean variables when possible
This commit is contained in:
@@ -2135,12 +2135,11 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
|
||||
}
|
||||
}
|
||||
|
||||
bool metaStateChanged = false;
|
||||
int32_t oldMetaState = mMetaState;
|
||||
int32_t newMetaState = updateMetaState(keyCode, down, oldMetaState);
|
||||
if (oldMetaState != newMetaState) {
|
||||
bool metaStateChanged = oldMetaState != newMetaState;
|
||||
if (metaStateChanged) {
|
||||
mMetaState = newMetaState;
|
||||
metaStateChanged = true;
|
||||
updateLedState(false);
|
||||
}
|
||||
|
||||
@@ -2932,7 +2931,6 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
|
||||
int32_t rawHeight = mRawPointerAxes.y.maxValue - mRawPointerAxes.y.minValue + 1;
|
||||
|
||||
// Get associated display dimensions.
|
||||
bool viewportChanged = false;
|
||||
DisplayViewport newViewport;
|
||||
if (mParameters.hasAssociatedDisplay) {
|
||||
if (!mConfig.getDisplayInfo(mParameters.associatedDisplayIsExternal, &newViewport)) {
|
||||
@@ -2946,9 +2944,9 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
|
||||
} else {
|
||||
newViewport.setNonDisplayViewport(rawWidth, rawHeight);
|
||||
}
|
||||
if (mViewport != newViewport) {
|
||||
bool viewportChanged = mViewport != newViewport;
|
||||
if (viewportChanged) {
|
||||
mViewport = newViewport;
|
||||
viewportChanged = true;
|
||||
|
||||
if (mDeviceMode == DEVICE_MODE_DIRECT || mDeviceMode == DEVICE_MODE_POINTER) {
|
||||
// Convert rotated viewport to natural surface coordinates.
|
||||
@@ -3017,9 +3015,8 @@ void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
|
||||
}
|
||||
|
||||
// If moving between pointer modes, need to reset some state.
|
||||
bool deviceModeChanged;
|
||||
if (mDeviceMode != oldDeviceMode) {
|
||||
deviceModeChanged = true;
|
||||
bool deviceModeChanged = mDeviceMode != oldDeviceMode;
|
||||
if (deviceModeChanged) {
|
||||
mOrientedRanges.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user