Search code examples
androidandroid-sourcelineageos

AOSP: What makes LineageOS Setup Wizard run in LockTask mode?


I have noticed that when you flash a device and run it for the first time you get into the setup wizard. I assume that application is run in so called LockTask mode (Kiosk mode for dedicated devices) because it has only one navbar button (usually "back" button, "home", for example, is hidden).

Here are my questions:

  1. Does setup wizard actually run in Kiosk mode? If yes, how to implement this? (I didn't find anything in LineageOS sources)
  2. If no, what is the way of partially disabling navbar buttons?

Solution

  • I finally figured that out. Setup wizards usually use so called “google setupcompat” library. It allows to hide both status and navigation bars and it can show us only “back” button instead of all of them. Functionality stated above can be found here https://cs.android.com/android/platform/superproject/main/+/main:external/setupcompat/main/java/com/google/android/setupcompat/util/SystemBarHelper.java