Search in sources :

Example 1 with ProfileManager

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);
        }
    }
}
Also used : ProfileManager(cyanogenmod.app.ProfileManager) Profile(cyanogenmod.app.Profile)

Aggregations

Profile (cyanogenmod.app.Profile)1 ProfileManager (cyanogenmod.app.ProfileManager)1