Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab1c1410 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Fixed Bootloop related to profile volume control setting on boot." into gingerbread

parents ed92e993 cdbee3a7
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -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.");
        }
@@ -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 {