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 -->
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章