use of android.content.pm.PackageUserState in project android_frameworks_base by crdroidandroid.
the class PackageSettingBase method protectComponentLPw.
boolean protectComponentLPw(String componentClassName, boolean protect, int userId) {
PackageUserState state = modifyUserStateComponents(userId);
boolean changed = false;
if (protect == COMPONENT_VISIBLE_STATUS) {
changed = state.protectedComponents != null ? state.protectedComponents.remove(componentClassName) : false;
changed |= state.visibleComponents.add(componentClassName);
} else {
changed = state.visibleComponents != null ? state.visibleComponents.remove(componentClassName) : false;
changed |= state.protectedComponents.add(componentClassName);
}
return changed;
}
use of android.content.pm.PackageUserState in project android_frameworks_base by crdroidandroid.
the class PackageSettingBase method setDomainVerificationStatusForUser.
void setDomainVerificationStatusForUser(final int status, int generation, int userId) {
PackageUserState state = modifyUserState(userId);
state.domainVerificationStatus = status;
if (status == PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS) {
state.appLinkGeneration = generation;
}
}
use of android.content.pm.PackageUserState in project android_frameworks_base by crdroidandroid.
the class PackageSettingBase method setEnabled.
void setEnabled(int state, int userId, String callingPackage) {
PackageUserState st = modifyUserState(userId);
st.enabled = state;
st.lastDisableAppCaller = callingPackage;
}
use of android.content.pm.PackageUserState in project android_frameworks_base by crdroidandroid.
the class PackageSettingBase method disableComponentLPw.
boolean disableComponentLPw(String componentClassName, int userId) {
PackageUserState state = modifyUserStateComponents(userId, true, false);
boolean changed = state.enabledComponents != null ? state.enabledComponents.remove(componentClassName) : false;
changed |= state.disabledComponents.add(componentClassName);
return changed;
}
use of android.content.pm.PackageUserState in project android_frameworks_base by crdroidandroid.
the class PackageSettingBase method enableComponentLPw.
boolean enableComponentLPw(String componentClassName, int userId) {
PackageUserState state = modifyUserStateComponents(userId, false, true);
boolean changed = state.disabledComponents != null ? state.disabledComponents.remove(componentClassName) : false;
changed |= state.enabledComponents.add(componentClassName);
return changed;
}
Aggregations