aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-12-13 18:37:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-12-13 18:37:31 +0000
commit550cb2ce304a8b32f7cdace0d508ee910a004a32 (patch)
tree568dbd89e682e492158457c4d26d800fe90ced55
parent73a8f220c05f681e8c20aa5200b78d9559f96b41 (diff)
parent40765f4b2c67fc41b195d3523be5683304c1dc3a (diff)
downloadqemu-snap-temp-L17400000957803975.tar.gz
Merge "Merge cherrypicks of ['aosp/2349527'] into emu-31-release." into emu-31-releasesnap-temp-L17400000957803975
-rw-r--r--android/android-emu/android/skin/qt/emulator-qt-window.cpp6
-rw-r--r--android/android-emu/android/skin/qt/emulator-qt-window.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/android/android-emu/android/skin/qt/emulator-qt-window.cpp b/android/android-emu/android/skin/qt/emulator-qt-window.cpp
index 41d25b3007..5ed55c8f3c 100644
--- a/android/android-emu/android/skin/qt/emulator-qt-window.cpp
+++ b/android/android-emu/android/skin/qt/emulator-qt-window.cpp
@@ -1525,6 +1525,8 @@ void EmulatorQtWindow::show() {
QObject::connect(window()->windowHandle(), &QWindow::screenChanged, this,
&EmulatorQtWindow::onScreenChanged);
+ QObject::connect(qGuiApp, &QGuiApplication::applicationStateChanged, this,
+ &EmulatorQtWindow::onApplicationStateChanged);
#if QT_VERSION >= 0x060000
QObject::connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this,
&EmulatorQtWindow::onScreenConfigChanged);
@@ -2204,6 +2206,10 @@ void EmulatorQtWindow::onScreenConfigChanged() {
}
}
+void EmulatorQtWindow::onApplicationStateChanged(Qt::ApplicationState state) {
+ TelephonyPage::updateModemTime();
+}
+
void EmulatorQtWindow::showEvent(QShowEvent* event) {
mStartupTimer.stop();
mStartupDialog->hide();
diff --git a/android/android-emu/android/skin/qt/emulator-qt-window.h b/android/android-emu/android/skin/qt/emulator-qt-window.h
index e8b59181c0..768963a814 100644
--- a/android/android-emu/android/skin/qt/emulator-qt-window.h
+++ b/android/android-emu/android/skin/qt/emulator-qt-window.h
@@ -39,6 +39,7 @@
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QFrame>
+#include <QGuiApplication>
#include <QImage>
#include <QImageReader>
#include <QMessageBox>
@@ -401,7 +402,7 @@ public slots:
void onScreenConfigChanged();
void onScreenChanged(QScreen* newScreen);
-
+ void onApplicationStateChanged(Qt::ApplicationState state);
bool event(QEvent* ev) override; // Used to resume the MV on un-minimize
public: