工具:CTS 9.0_R7
patch:2019-04-01
CtsGraphicsTestCases
android.graphics.drawable.cts.AdaptiveIconMaskTest#testDeviceConfig_iconMask_useRoundIcon
fail:java.lang.AssertionError: expected: rue but was: false
通過源碼發現:
@Test
public void testDeviceConfig_iconMask_useRoundIcon() {
assertNotNull(mMask);
boolean circleMask = isCircle(mMask);
// If mask shape is circle, then mUseRoundIcon should be defined and should be true.
// If mask shape is not a circle
// mUseRoundIcon doesn't have to be defined.
// if mUseRoundIcon is defined, then should be false
assertEquals(mUseRoundIcon, circleMask);
}
If mask shape is circle, then mUseRoundIcon should be defined and should be true.
If mask shape is not a circle
mUseRoundIcon doesn’t have to be defined.
if mUseRoundIcon is defined, then should be false
通過註解可以發現:如果mUseRoundIcon爲true,那麼桌面應該是原型適配圖標,如果不是則不能定義這個爲true.mUseRoundIcon的值位於:
frameworks/base/core/res/res//values/config.xml
<!-- Flag indicating whether round icons should be parsed from the application manifest. -->
<bool name="config_useRoundIcon">false</bool> <!--mUseRoundIcon -->