Loading services/java/com/android/server/ProfileManagerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -75,10 +75,16 @@ public class ProfileManagerService extends IProfileManager.Stub { // TODO: Exceptions not supported in aidl. @Override public void setActiveProfile(String profileName) throws RemoteException { setActiveProfile(profileName, true); } private void setActiveProfile(String profileName, boolean doinit) throws RemoteException { if(mProfiles.containsKey(profileName)){ Log.d(TAG, "Set active profile to: " + profileName); mActiveProfile = getProfile(profileName); if(doinit){ mActiveProfile.doSelect(mContext); } }else{ Log.e(TAG, "Cannot set active profile to: " + profileName + " - does not exist."); } Loading Loading @@ -188,7 +194,9 @@ public class ProfileManagerService extends IProfileManager.Stub { } event = xpp.next(); } setActiveProfile(active); // Don't do initialisation on startup. The AudioManager doesn't exist yet // and besides, the volume settings will have survived the reboot. setActiveProfile(active, false); } private void initialiseStructure() throws RemoteException, XmlPullParserException, IOException { Loading Loading
services/java/com/android/server/ProfileManagerService.java +10 −2 Original line number Diff line number Diff line Loading @@ -75,10 +75,16 @@ public class ProfileManagerService extends IProfileManager.Stub { // TODO: Exceptions not supported in aidl. @Override public void setActiveProfile(String profileName) throws RemoteException { setActiveProfile(profileName, true); } private void setActiveProfile(String profileName, boolean doinit) throws RemoteException { if(mProfiles.containsKey(profileName)){ Log.d(TAG, "Set active profile to: " + profileName); mActiveProfile = getProfile(profileName); if(doinit){ mActiveProfile.doSelect(mContext); } }else{ Log.e(TAG, "Cannot set active profile to: " + profileName + " - does not exist."); } Loading Loading @@ -188,7 +194,9 @@ public class ProfileManagerService extends IProfileManager.Stub { } event = xpp.next(); } setActiveProfile(active); // Don't do initialisation on startup. The AudioManager doesn't exist yet // and besides, the volume settings will have survived the reboot. setActiveProfile(active, false); } private void initialiseStructure() throws RemoteException, XmlPullParserException, IOException { Loading