Loading src/com/android/packageinstaller/role/model/Roles.java +11 −17 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ public class Roles { private static final String LOG_TAG = Roles.class.getSimpleName(); // STOPSHIP: Turn this off before we ship. private static final boolean DEBUG = true; private static final boolean DEBUG = false; private static final String TAG_ROLES = "roles"; private static final String TAG_PERMISSION_SET = "permission-set"; Loading Loading @@ -460,9 +459,9 @@ public class Roles { String permission = getAttributeValue(parser, ATTRIBUTE_PERMISSION); IntentFilterData intentFilterData = null; List<RequiredMetaData> metaData = new ArrayList<>(); List<String> metaDataNames; List<String> debugMetaDataNames; if (DEBUG) { metaDataNames = new ArrayList<>(); debugMetaDataNames = new ArrayList<>(); } int type; Loading Loading @@ -491,7 +490,7 @@ public class Roles { continue; } if (DEBUG) { checkDuplicateElement(metaDataName, metaDataNames, "meta data"); checkDuplicateElement(metaDataName, debugMetaDataNames, "meta data"); } // HACK: Only support boolean for now. // TODO: Support android:resource and other types of android:value, maybe by Loading @@ -507,7 +506,7 @@ public class Roles { metaDataValue, metaDataOptional); metaData.add(requiredMetaData); if (DEBUG) { metaDataNames.add(metaDataName); debugMetaDataNames.add(metaDataName); } break; default: Loading Loading @@ -698,13 +697,10 @@ public class Roles { if (maxTargetSdkVersion == Integer.MIN_VALUE) { maxTargetSdkVersion = null; } if (DEBUG) { if (maxTargetSdkVersion != null && maxTargetSdkVersion < Build.VERSION_CODES.BASE) { if (maxTargetSdkVersion != null && maxTargetSdkVersion < Build.VERSION_CODES.BASE) { throwOrLogMessage("Invalid value for \"maxTargetSdkVersion\": " + maxTargetSdkVersion); } } String modeName = requireAttributeValue(parser, ATTRIBUTE_MODE, TAG_APP_OP); if (modeName == null) { continue; Loading Loading @@ -797,12 +793,10 @@ public class Roles { } checkDuplicateElement(intentFilterData, intentFilterDatas, "intent filter"); if (DEBUG) { if (intentFilterData.getDataType() != null) { throwOrLogMessage("mimeType in <data> is not supported when setting a" + " preferred activity"); } } intentFilterDatas.add(intentFilterData); break; default: Loading src/com/android/packageinstaller/role/service/RoleControllerServiceImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ public class RoleControllerServiceImpl extends RoleControllerService { private static final String LOG_TAG = RoleControllerServiceImpl.class.getSimpleName(); // STOPSHIP: Turn off debugging before we ship. private static final boolean DEBUG = true; private static final boolean DEBUG = false; private RoleManager mRoleManager; Loading Loading
src/com/android/packageinstaller/role/model/Roles.java +11 −17 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ public class Roles { private static final String LOG_TAG = Roles.class.getSimpleName(); // STOPSHIP: Turn this off before we ship. private static final boolean DEBUG = true; private static final boolean DEBUG = false; private static final String TAG_ROLES = "roles"; private static final String TAG_PERMISSION_SET = "permission-set"; Loading Loading @@ -460,9 +459,9 @@ public class Roles { String permission = getAttributeValue(parser, ATTRIBUTE_PERMISSION); IntentFilterData intentFilterData = null; List<RequiredMetaData> metaData = new ArrayList<>(); List<String> metaDataNames; List<String> debugMetaDataNames; if (DEBUG) { metaDataNames = new ArrayList<>(); debugMetaDataNames = new ArrayList<>(); } int type; Loading Loading @@ -491,7 +490,7 @@ public class Roles { continue; } if (DEBUG) { checkDuplicateElement(metaDataName, metaDataNames, "meta data"); checkDuplicateElement(metaDataName, debugMetaDataNames, "meta data"); } // HACK: Only support boolean for now. // TODO: Support android:resource and other types of android:value, maybe by Loading @@ -507,7 +506,7 @@ public class Roles { metaDataValue, metaDataOptional); metaData.add(requiredMetaData); if (DEBUG) { metaDataNames.add(metaDataName); debugMetaDataNames.add(metaDataName); } break; default: Loading Loading @@ -698,13 +697,10 @@ public class Roles { if (maxTargetSdkVersion == Integer.MIN_VALUE) { maxTargetSdkVersion = null; } if (DEBUG) { if (maxTargetSdkVersion != null && maxTargetSdkVersion < Build.VERSION_CODES.BASE) { if (maxTargetSdkVersion != null && maxTargetSdkVersion < Build.VERSION_CODES.BASE) { throwOrLogMessage("Invalid value for \"maxTargetSdkVersion\": " + maxTargetSdkVersion); } } String modeName = requireAttributeValue(parser, ATTRIBUTE_MODE, TAG_APP_OP); if (modeName == null) { continue; Loading Loading @@ -797,12 +793,10 @@ public class Roles { } checkDuplicateElement(intentFilterData, intentFilterDatas, "intent filter"); if (DEBUG) { if (intentFilterData.getDataType() != null) { throwOrLogMessage("mimeType in <data> is not supported when setting a" + " preferred activity"); } } intentFilterDatas.add(intentFilterData); break; default: Loading
src/com/android/packageinstaller/role/service/RoleControllerServiceImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ public class RoleControllerServiceImpl extends RoleControllerService { private static final String LOG_TAG = RoleControllerServiceImpl.class.getSimpleName(); // STOPSHIP: Turn off debugging before we ship. private static final boolean DEBUG = true; private static final boolean DEBUG = false; private RoleManager mRoleManager; Loading