CTS:9.0R7:android.graphics.drawable.cts.AdaptiveIconMaskTest#testDeviceConfig_iconMask_useRoundIcon

工具: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 -->
发布了67 篇原创文章 · 获赞 42 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/w1764662543/article/details/89459764