Fixes the problem of no sound during a VoIP call on speaker, earpiece. This fix is intended as an interim solution pending a proper resolution in the upstream audio stack. - When changing the sound output, for example from the speaker to the regular one, the sound in the call disappears completely, this should be fixed as of now.
34 lines
1.1 KiB
Java
34 lines
1.1 KiB
Java
/*
|
|
* Copyright (C) 2023 The PixelOS Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package org.pixelexperience.xiaomi.voipfix;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.util.Log;
|
|
|
|
public class BootCompletedReceiver extends BroadcastReceiver {
|
|
private static final String TAG = "XiaomiVoIPFix";
|
|
private static final boolean DEBUG = true;
|
|
|
|
@Override
|
|
public void onReceive(Context context, Intent intent) {
|
|
if (DEBUG) Log.d(TAG, "Starting VoIP Fix service on boot");
|
|
context.startService(new Intent(context, VoIPFixService.class));
|
|
}
|
|
}
|