Skip to content
Commit 8c432654 authored by Steve Elliott's avatar Steve Elliott
Browse files

Don't mutate shared AppInfo instance in RtlContext

In RtlEnabledContext, we force-enable RtL support, since our
notification templates are known to support Rtl, even if the app doesn't
necessarily. We do this by updating a flag on the ApplicationInfo
returned by Context#getApplicationInfo().

Because updating this flag is a mutation, other callers to
Context#getApplicationInfo() after
RtlEnabledContext#getApplicationInfo() has been called will see that RTL
support is enabled, even if it's not true, and even if they are not
using RtlEnabledContext.

The solution is to copy the ApplicationInfo object returned from the
wrapped Context inside of RtlEnabledContext, so that we can mutate the
copy without affecting the shared ApplicationInfo.

Test: atest SystemUITests
Bug: 193213399
Change-Id: Ic2dd0479d60dc9c27cc448685ec83588037a69c7
parent cf97449a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment