- Update RetailDemoModeService to not do anything outside demo mode.
- Add am command get-started-user-state which is needed for cts tests.
- Update unit tests for RetailDemoModeService.
Bug: 31342350
Test: adb shell am instrument -e class com.android.server.retaildemo.RetailDemoModeServiceTest -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Idf50512facd27d47d7111e75cbc2f7b260f49740
Earlier change to resolve merge conflicts was breaking the current test
because mocked context was used to get wifi manager. Mocking wifi
manager to fix the test and added a check that setWifiEnabled is called
when wifi is not already on.
Test: adb shell am instrument -e class
com.android.server.retaildemo.RetailDemoModeServiceTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Bug: 31833031
Change-Id: Idd123d50df6ee6db51417645fc877abebe555dc0
A customer may switch off wifi in a retail environment, which will lead
to no internet connectivity in the following sessions, which is not
desirable. Fixing it by enabling wifi at the beginning of every new demo
session.
Bug: 31689469
Change-Id: Ie7eb17bfe8fbee185d5bfe6ac7a590ca5dabdc29
Increasing the inactivity timeout to 90 seconds to accomodate the longest
app. demo video for retail. Also, removing the warning dialog by setting
the countdown timeout to 0, so it can be re-enabled by overriding the value
through gservices if needed.
Bug: 30426773
Bug: 30866394
Change-Id: I6735943adfaf3d210ed9eb9163b5c7ce8dcf53ec
In case of a reboot mApkToPackageMap becomes empty, but packages can still
be installed in user 0. We need to repopulate the cache again.
Bug: 30280710
Change-Id: Ia18e93c351b5af80de434e8c5311b961b314a9fb
Because RetailDemoModeService was switching user before KeyguardService
was started, KeyguardViewMediator was missing the call to setCurrentUser
on user switch. Setting the current user from keyguardState in
onServiceConnected, if there was a user switch that happened earlier.
Also changed RetailDemoModeService to switch user after it receives boot
phase BOOT_COMPLETE.
Bug: 30038980
Change-Id: I142570529097199ccc50849297ae67ca49d35534
Need a system property so that init can listen to changes to
it and restrict the battery driver from charging the battery beyond
an optimal charge level when the device is in retail demo mode
Bug: 30230924
Change-Id: I277acf27a442ec8f37aac2b01a1a8e0164947a45
Allow outgoing calls, but clear the call log when
the next demo session starts so that the next
customer doesn't see any residue.
Fixes: 30220132
Change-Id: Ice71ba750f43fb31bf657d6ae31da62abbd72cfc
LockSettingsService cleans up data for an user on receiving
ACTION_USER_ADDED. As a result, the value set by the
RetailDemoModeService was getting lost.
Bug: 29912660
Change-Id: I2414a5586ab0187bc003cd6ee8b9f1645406235f
Bluetooth is currently not multi-user aware, so bluetooth pairings are
carrying across demo users. Have to disable bluetooth config to prevent
security risks in retail environments.
Bug: 30039481
Change-Id: I28ad0d9585a4e6e22af8772132d585c01b33abc9
Adding a global setting for timeouts used in retail demo mode.
Also renaming the protected intent ACTION_RESET_DEMO to reflect proper
owner package.
Bug: 29917613
Change-Id: I9a174503626ab28cceb5024a8e63d27612439b92
Apks preloaded in /data/preloads/apps are now automatically installed when
device is running in demo mode.
Apps are also installed into system user, so that they can be cached for
the next demo user session.
Bug: 29908713
Change-Id: If0fb45bb31c169a1e3020621a173867b8530532d
Removing explicit call to setView which was distorting the layout
of a standard AlertDialog. Used the correct unicode characted for
apostrophe. Also removed calls to enable demo mode launcher for user 0.
Bug: 29520255
Change-Id: Id876f01f8e51c02634c03fce1ea93a15b111fc27
Count each demo user creation and time between
first touch (to dismiss the video) and the start
of inactivity timeout.
Fixed an NPE in SysUI when user switcher is missing.
Bug: 29540372
Change-Id: I7bc0e0dde75e7b213a025683c15c9b3e750643a9
Muting ringer and media volume and turning off the flashlight
before starting a new session. Also, resetting the configuration of any
new demo user to the configuration of user 0 on the device. Moved
RetailDemoModeService and RetailDemoModeServiceInternal to more
appropriate new packages
Bug: 29519612
Change-Id: Ib65f89ce61afab2d2f1b2dd0c761f5d35a466181