waydroid: Show an error when Android ID is empty

This commit is contained in:
Florian RICHER 2025-08-14 21:38:53 +00:00
parent 7ebb4aa37c
commit a3e7d98660
2 changed files with 23 additions and 0 deletions

View file

@ -453,6 +453,10 @@ void WaydroidDBusObject::refreshAndroidId()
KAuth::ExecuteJob *executeJob = dynamic_cast<KAuth::ExecuteJob *>(job);
if (executeJob->error() == 0) {
m_androidId = executeJob->data()["android_id"].toString();
if (m_androidId.isEmpty()) {
Q_EMIT actionFailed(i18n("Android ID not found"));
}
} else {
m_androidId = "";
qCWarning(WAYDROIDINTEGRATIONPLUGIN) << "KAuth returned an error code:" << executeJob->error();

View file

@ -33,6 +33,25 @@ KCM.SimpleKCM {
text: i18n("We fetching your Android ID.\nIt can take a few seconds.")
}
Connections {
target: AIP.WaydroidDBusClient
function onActionFailed(error: string): void {
inlineMessage.text = error
inlineMessage.visible = true
inlineMessage.type = Kirigami.MessageType.Error
}
}
Kirigami.InlineMessage {
id: inlineMessage
Layout.fillWidth: true
visible: false
showCloseButton: true
}
ColumnLayout {
visible: AIP.WaydroidDBusClient.androidId !== ""
anchors.verticalCenter: parent.verticalCenter