@@ -184,7 +184,16 @@ Item {
184184 if (event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) {
185185 event.accepted = callManager.handleMediaKey(false);
186186 } else if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
187− dialogs.onPowerKeyPressed();
187+ // FIXME: We only consider power key presses if the screen is
188+ // on because of bugs 1410830/1409003. The theory is that when
189+ // those bugs are encountered, there is a >2s delay between the
190+ // power press event and the power release event, which causes
191+ // the shutdown dialog to appear on resume. So to avoid that
192+ // symptom while we investigate the root cause, we simply won't
193+ // initiate any dialogs when the screen is off.
194+ if (Powerd.status === Powerd.On) {
195+ dialogs.onPowerKeyPressed();
196+ }
188197 event.accepted = true;
189198 } else {
190199 volumeKeyFilter.onKeyPressed(event.key);