Minimal Phone Mode (part-3)
Introduces a separate database for minimal device mode. When minimal device mode is enabled/disabled: 1. WellbeingModel receives onChange event from ContentObserver 2. WellbeingModel called DWB's ContentProvider for latest state in minimal device mode 3. Based on the state, WellbeingModel calls LauncherProvider to put launcher into normal/minimal mode. 4. When going from normal -> minimal, Launcher switches to a different database, namely minimal.db, then proceed to database initialization. 5. If the database hasn't been initialized yet, Launcher will call ContentResolver#openInputStream with following uri: content://com.google.android.apps.wellbeing.api/launcher_layout to get the default layout xml. 6. The default layout is then saved in database, and the database is considered initialized and doesn't need to go through step 5 again in the future. 7. In case of minimal -> normal, Launcher switches back to its original database (e.g. launcher.db if the grid size is 5x5), then reload launcher. Bug: 161462256 Change-Id: I6bafa66440da23281f63454b698ea56b15960022
Loading
Please register or sign in to comment