All the trivial cases, plus some fixes to try to
mitigate collisions with the complex ones.
Complex services to follow in another CL,
Bug: 32584866
Test: make framework services
Change-Id: Ie9663600171d8ede11676e9d66f009dbb06def03
When device is provisioned, we delete all files from /data/preloads
except file_cache. We should do best effort to keep file_cache during
the first config_keepPreloadsMinDays. After that,
persist.sys.preloads.file_cache_expired is set to 1, which indicates
that cache can be deleted when additional storage space is requested.
Bug: 34690396
Test: Manual + RetailDemoModeServiceTest
Change-Id: Ie584a9dd6689bcc5e6b3cb448e95dfe5f73d2eeb
Adapts all notifications used by system services to use channels.
Channels are initialized by SystemServer after the NotificationService
has started.
Test: runtest systemui-notification
Change-Id: I25c45293b786adb57787aeab4c2613c9d7c89dab
The same application can run as either an instant app or an installed
app. Store this setting per-user instead of based upon the install
location.
Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iff565bb1ac10d631499f0bd0f69b401cb073c10e
Reset mDeviceInDemoMode when the device exits demo mode. This isn't a
supported configuration in the production devices, but it's used for CTS
in order to run tests back-to-back without reprovisioning the device.
Fixes: 34938521
Test: RetailDemoModeServiceTest
Change-Id: I5a7134815b2817e7b02b1a2df71932faee967e8d
When clearing /data/preloads directory, keep files in file_cache directory.
The content there will only be removed if systems runs low on storage.
Test: manual + RetailDemoModeServiceTest
Bug: 31008665
Change-Id: Id335d84940ee829617986f5345f169271a333de1
Bug: 34358856
Test: manually verified that tapping the Reset notification
triggers a reset after initial provisioning.
Change-Id: I7cf4db729384630a85b22ca9b4947198974a8fbf
This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.
With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.
Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"
Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
- 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