on xenial help sign in
Save password when updating the system

Prior to this change, installing a system update from the Wizard would cause it to forget the password you'd selected. This change saves the password before rebooting, and when the user comes back they'll be at the "Welcome to Ubuntu Touch" page.

commit524dc070a1b4d807d9e2c182b65c95843f72b4fe authorDalton Durst <dalton@ubports.com> dateMon 4 May 2020, 11:14 (6 years ago) parent368923e
2 files changed+9−5
qml/Wizard/Pages.qml+8−5 qml/Wizard/Pages/79-system-update.qml+1
qml/Wizard/Pages.qml+8−5
@@ -84,19 +84,22 @@ StyledItem {
8484 }
8585 }
8686
87− function quitWizard() {
88− pageStack.currentPage.enabled = false;
89−
87+ function savePassword() {
9088 if (password != "") {
91− var errorMsg = securityPrivacy.setSecurity("", password, passwordMethod)
89+ var errorMsg = securityPrivacy.setSecurity("", password, passwordMethod);
9290 if (errorMsg !== "") {
9391 // Ignore (but log) any errors, since we're past where the user set
9492 // the method. Worst case, we just leave the user with a swipe
9593 // security method and they fix it in the system settings.
96− console.log("Wizard: Error setting security method:", errorMsg)
94+ console.log("Wizard: Error setting security method:", errorMsg);
9795 }
9896 }
9997
98+ }
99+
100+ function quitWizard() {
101+ pageStack.currentPage.enabled = false;
102+ savePassword();
100103 quit();
101104 }
102105
qml/Wizard/Pages/79-system-update.qml+1
@@ -116,6 +116,7 @@ LocalComponents.Page {
116116 objectName: "installButton"
117117 anchors.fill: parent
118118 onClicked: {
119+ root.savePassword();
119120 System.skipUntilFinishedPage();
120121 SystemImage.applyUpdate();
121122 }