Add AppWidgetManagerTest
AAOS doesn't support FEATURE_APP_WIDGETS. Apps often use
AppWidgetManager without feature check or nullability check, causing
a crash on AAOS. AAOS fixed this with resource overlay. As a result,
AppWidgetService is enabled but FEATURE_APP_WIDGETS is not advertised
on AAOS. To make sure OEMs customize AAOS builds correctly, this CL
adds a CTS test to verify that AppWidgetManager.getInstance() always
return a non-null instance on AAOS.
The new test can't be added into existing AppWidgetManager tests (such
as AppWidgetTest.java), because the existing test classes are
inherited from AppWidgetTestCase, which will skip the test when the
test doesn't advertise FEATURE_APP_WIDGETS. The new test needs to run
AAOS despite that it doesn't advertise FEATURE_APP_WIDGETS.
Bug: 295901503
Bug: 329892765
Test: atest CtsAppWidgetTestCases
Change-Id: I0fdf1035b814e44f353e657a98d3bffc843717d3
2 files changed