mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Init and quit the app in the "run" method of apps container
Change-Id: I3eb5adedca57fede14c4af67d72cbde697188000
This commit is contained in:
@@ -151,6 +151,12 @@ void AppsContainer::switchTo(App::Snapshot * snapshot) {
|
||||
}
|
||||
}
|
||||
|
||||
void AppsContainer::run() {
|
||||
switchTo(onBoardingAppSnapshot());
|
||||
Container::run();
|
||||
switchTo(nullptr);
|
||||
}
|
||||
|
||||
bool AppsContainer::updateBatteryState() {
|
||||
if (m_window.updateBatteryLevel() ||
|
||||
m_window.updateIsChargingState() ||
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
void suspend(bool checkIfPowerKeyReleased = false);
|
||||
virtual bool dispatchEvent(Ion::Events::Event event) override;
|
||||
void switchTo(App::Snapshot * snapshot) override;
|
||||
void run() override;
|
||||
bool updateBatteryState();
|
||||
void refreshPreferences();
|
||||
void displayExamModePopUp(bool activate);
|
||||
|
||||
@@ -3,7 +3,5 @@
|
||||
AppsContainer container;
|
||||
|
||||
void ion_app() {
|
||||
container.switchTo(container.onBoardingAppSnapshot());
|
||||
container.run();
|
||||
container.switchTo(nullptr);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
Container(Container&& other) = delete;
|
||||
Container& operator=(const Container& other) = delete;
|
||||
Container& operator=(Container&& other) = delete;
|
||||
void run();
|
||||
virtual void run();
|
||||
App * activeApp();
|
||||
virtual bool dispatchEvent(Ion::Events::Event event) override;
|
||||
virtual void switchTo(App::Snapshot * snapshot);
|
||||
|
||||
Reference in New Issue
Block a user