diff options
| author | 2021-11-18 13:25:59 +1100 | |
|---|---|---|
| committer | 2021-11-23 10:49:49 +1100 | |
| commit | 08de4439ac20552c97d14171c20e82f43a5329ef (patch) | |
| tree | f0631dc542a7d1707389331bf6df88d2fdd3320d /cmds/bootanimation/BootAnimation.cpp | |
| parent | fe2dfc50378ad69ac1a15d12242068675949e6dc (diff) | |
Enable clock only when supported by product
In 9748086, a detection for clock drifting was implemented. It relies on
2 files that must be provided by the product
(/data/system/time/last_time_change and
/data/system/time/time_is_accurate). Generally, these files are not
available which triggers an SELinux denial error message.
Introduce a new property ("persist.sys.bootanim.clock.enabled") which
can be set by a product to enable this feature (default is false). For
future reference, it is not sufficient to only enable this property, the
product must also provide the files described above (see
BootAnimation::updateIsTimeAccurate).
Bug: 62954877
Test: lunch r11-userdebug && m
Change-Id: Ia27e69547e3d898925029dc0c2be4ad717891c57
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
| -rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 59f602c11247..a1569ce569d6 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -105,6 +105,7 @@ static const int TEXT_MISSING_VALUE = INT_MIN; static const char EXIT_PROP_NAME[] = "service.bootanim.exit"; static const char PROGRESS_PROP_NAME[] = "service.bootanim.progress"; static const char DISPLAYS_PROP_NAME[] = "persist.service.bootanim.displays"; +static const char CLOCK_ENABLED_PROP_NAME[] = "persist.sys.bootanim.clock.enabled"; static const int ANIM_ENTRY_NAME_MAX = ANIM_PATH_MAX + 1; static constexpr size_t TEXT_POS_LEN_MAX = 16; static const int DYNAMIC_COLOR_COUNT = 4; @@ -1320,6 +1321,8 @@ bool BootAnimation::movie() { } if (!anyPartHasClock) { mClockEnabled = false; + } else if (!android::base::GetBoolProperty(CLOCK_ENABLED_PROP_NAME, false)) { + mClockEnabled = false; } // Check if npot textures are supported |