sanders: dirac: Only call setEnabled on boot completed
Signed-off-by: Ashwin R C <ashwin2001achu@gmail.com> Signed-off-by: utsavbalar1231 <utsavbalar1231@gmail.com> Signed-off-by: ronaxdevil <pratabidya.007@gmail.com>
This commit is contained in:
committed by
ronaxdevil
parent
d7a57d56ac
commit
9967e4db15
@@ -57,7 +57,7 @@ public class BootCompletedReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
context.startService(new Intent(context, ServiceWrapper.class));
|
||||
new DiracUtils(context);
|
||||
new DiracUtils(context).onBootCompleted();
|
||||
}
|
||||
|
||||
protected static void enableNavBar(boolean enable, Context context) {
|
||||
|
||||
@@ -39,6 +39,9 @@ public final class DiracUtils {
|
||||
mContext = context;
|
||||
mMediaSessionManager = (MediaSessionManager) context.getSystemService(Context.MEDIA_SESSION_SERVICE);
|
||||
mDiracSound = new DiracSound(0, 0);
|
||||
}
|
||||
|
||||
public void onBootCompleted(){
|
||||
setEnabled(mDiracSound.getMusic() == 1);
|
||||
mDiracSound.setHeadsetType(mDiracSound.getHeadsetType());
|
||||
setLevel(getLevel());
|
||||
|
||||
Reference in New Issue
Block a user