CTS Cross profile intent filters are set测试fail

36 阅读1分钟

报错信息:

Intent { act=android.settings.USER_SETTINGS } from managed profile should be forwarded to the primary profile but is not

规避方案:

frameworks/base/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java 
public boolean isComponentDisabled(String componentName) {
    +if (componentName.contains("UserSettingsActivity")) {
        +return false;
    +} else {
      return mDisabledComponentsWatched != null && mDisabledComponentsWatched.contains(componentName);
   +}
}