OSDN Git Service

Keep EnterprisePrivacySettingsActivity always enabled
authorBartosz Fabianowski <bartfab@google.com>
Fri, 24 Mar 2017 17:04:31 +0000 (18:04 +0100)
committerBartosz Fabianowski <bartfab@google.com>
Thu, 30 Mar 2017 08:28:02 +0000 (08:28 +0000)
commit578b02f33c163440daa0e2538745e729849810c1
tree28d15b193099c758fb4eb630ef7812c1d88ea2aa
parenta53f8a912822bf9e0d34674f16329ff8c8f97f63
Keep EnterprisePrivacySettingsActivity always enabled

The existing code checks during Settings startup whether the device is
managed. If it is not, EnterprisePrivacySettingsActivity is disabled.
If the device then becomes managed, Settings will not notice until
the next restart, causing any attempt to launch this Activity via an
Intent to crash.

This CL changes things so that the Activity is always enabled but
simply does nothing when launched on a non-managed device.

Bug: 34122104
Test: Integration test coming in a separate CL
Change-Id: I0a1dfcb41b405d981309696d97678df6787b4f72
(cherry picked from commit 92d25fb5f324f1e996e2cdf2e95d829860abb952)
src/com/android/settings/Settings.java
src/com/android/settings/SettingsActivity.java