diff options
Diffstat (limited to 'src/com/android/settings/profiles/SetupDefaultProfileReceiver.java')
-rw-r--r-- | src/com/android/settings/profiles/SetupDefaultProfileReceiver.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/settings/profiles/SetupDefaultProfileReceiver.java b/src/com/android/settings/profiles/SetupDefaultProfileReceiver.java index 10addf1..ea43d18 100644 --- a/src/com/android/settings/profiles/SetupDefaultProfileReceiver.java +++ b/src/com/android/settings/profiles/SetupDefaultProfileReceiver.java @@ -1,21 +1,24 @@ package com.android.settings.profiles; -import android.app.Profile; -import android.app.ProfileManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.provider.Settings; +import cyanogenmod.app.Profile; +import cyanogenmod.app.ProfileManager; + +import java.util.UUID; + public class SetupDefaultProfileReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Settings.System.getInt(context.getContentResolver(), Settings.System.SYSTEM_PROFILES_ENABLED, 1) == 1) { - ProfileManager profileManager = (ProfileManager) context - .getSystemService(Context.PROFILE_SERVICE); - Profile defaultProfile = profileManager.getProfile("Default"); + 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); |