use of cyanogenmod.app.ProfileManager in project android_packages_apps_CMParts by LineageOS.
the class SetupDefaultProfileReceiver method onReceive.
@Override
public void onReceive(Context context, Intent intent) {
if (CMSettings.System.getInt(context.getContentResolver(), CMSettings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) {
ProfileManager profileManager = ProfileManager.getInstance(context);
Profile defaultProfile = profileManager.getProfile(UUID.fromString("0230226d-0d05-494a-a9bd-d222a1117655"));
if (defaultProfile != null) {
SetupActionsFragment.fillProfileWithCurrentSettings(context, defaultProfile);
profileManager.updateProfile(defaultProfile);
}
}
}
Aggregations