Commit 2e5e2237 authored by Lijin Shen's avatar Lijin Shen Committed by Commit Bot

Remove warning on application context

Remove application context since it throws too many false positive
warnings on some cases, especially when application context is widely
used and is not used for ui change.

TBR=twellington@chromium.org

Bug: 775198, 908651
Change-Id: I88d635b2f273570d7344c4f558fbeb769c42c897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031554
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Lijin Shen <lazzzis@google.com>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736957}
parent 353ce8f9
...@@ -166,13 +166,6 @@ ...@@ -166,13 +166,6 @@
<property name="ignoreComments" value="true"/> <property name="ignoreComments" value="true"/>
<property name="message" value="Use org.chromium.ui.widget.ButtonCompat instead of Button and AppCompatButton if possible; ButtonCompat is a Material-styled button with a customizable background color. On L devices, this is a true Material button. On earlier devices, the button is similar but lacks ripples and a shadow. (crbug.com/775198)"/> <property name="message" value="Use org.chromium.ui.widget.ButtonCompat instead of Button and AppCompatButton if possible; ButtonCompat is a Material-styled button with a customizable background color. On L devices, this is a true Material button. On earlier devices, the button is similar but lacks ripples and a shadow. (crbug.com/775198)"/>
</module> </module>
<module name="RegexpSinglelineJava">
<property name="id" value="ApplicationContextCheck"/>
<property name="severity" value="warning"/>
<property name="format" value="\.getApplicationContext\("/>
<property name="ignoreComments" value="true"/>
<property name="message" value="Activity context is generally preferred over using the application context except in certain circumstances. When in doubt, it's likely that the activity context is more appropriate. In particular, ApplicationContext does not retain activity-specific configuration (e.g. dark mode) and should not be used to get resources/styles or inflate views. (crbug.com/775198, crbug.com/908651)"/>
</module>
<module name="RegexpSinglelineJava"> <module name="RegexpSinglelineJava">
<property name="id" value="SetTextColorAndSetTextSizeCheck"/> <property name="id" value="SetTextColorAndSetTextSizeCheck"/>
<property name="severity" value="warning"/> <property name="severity" value="warning"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment