Final icons for bluetooth + some fixes
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_off_default.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_off_disabled.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_off_over.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_on_default.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_on_disabled.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
res/drawable-xhdpi/routes_bluetooth_on_over.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
res/drawable-xhdpi/routes_phone_off_default.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
res/drawable-xhdpi/routes_phone_off_disabled.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/drawable-xhdpi/routes_phone_off_over.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
res/drawable-xhdpi/routes_phone_on_default.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
res/drawable-xhdpi/routes_phone_on_disabled.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
res/drawable-xhdpi/routes_phone_on_over.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
res/drawable-xhdpi/routes_speaker_off_default.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/drawable-xhdpi/routes_speaker_off_disabled.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
res/drawable-xhdpi/routes_speaker_off_over.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/drawable-xhdpi/routes_speaker_on_default.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
res/drawable-xhdpi/routes_speaker_on_disabled.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
res/drawable-xhdpi/routes_speaker_on_over.png
Normal file
After Width: | Height: | Size: 2 KiB |
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_bluetooth_off_over" />
|
||||
android:drawable="@drawable/routes_bluetooth_off_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_bluetooth_off_disabled" />
|
||||
android:drawable="@drawable/routes_bluetooth_off_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_bluetooth_off_default" />
|
||||
android:drawable="@drawable/routes_bluetooth_off_default" />
|
||||
</selector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_bluetooth_off_over" />
|
||||
android:drawable="@drawable/routes_bluetooth_on_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_bluetooth_off_disabled" />
|
||||
android:drawable="@drawable/routes_bluetooth_on_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_bluetooth_on_default" />
|
||||
android:drawable="@drawable/routes_bluetooth_on_default" />
|
||||
</selector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_phone_off_over" />
|
||||
android:drawable="@drawable/routes_phone_off_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_phone_off_disabled" />
|
||||
android:drawable="@drawable/routes_phone_off_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_phone_off_default" />
|
||||
android:drawable="@drawable/routes_phone_off_default" />
|
||||
</selector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_phone_off_over" />
|
||||
android:drawable="@drawable/routes_phone_on_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_phone_off_disabled" />
|
||||
android:drawable="@drawable/routes_phone_on_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_phone_on_default" />
|
||||
android:drawable="@drawable/routes_phone_on_default" />
|
||||
</selector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_speaker_off_over" />
|
||||
android:drawable="@drawable/routes_speaker_off_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_speaker_off_disabled" />
|
||||
android:drawable="@drawable/routes_speaker_off_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_speaker_off_default" />
|
||||
android:drawable="@drawable/routes_speaker_off_default" />
|
||||
</selector>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/route_speaker_off_over" />
|
||||
android:drawable="@drawable/routes_speaker_on_over" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/route_speaker_off_disabled" />
|
||||
android:drawable="@drawable/routes_speaker_on_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/route_speaker_on_default" />
|
||||
android:drawable="@drawable/routes_speaker_on_default" />
|
||||
</selector>
|
||||
|
|
45
res/raw/lpconfig.xsd
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.linphone.org/xsds/lpconfig.xsd"
|
||||
xmlns:tns="http://www.linphone.org/xsds/lpconfig.xsd"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:element name="config" type="tns:LPConfig"></xs:element>
|
||||
|
||||
<xs:complexType name="LPConfig">
|
||||
<xs:sequence>
|
||||
<xs:element name="section" type="tns:LPSection" minOccurs="0" maxOccurs="unbounded"></xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="LPSection">
|
||||
<xs:sequence>
|
||||
<xs:element name="entry" type="tns:LPEntry" maxOccurs="unbounded" minOccurs="0">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"></xs:minLength>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="LPEntry">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="overwrite" type="xs:boolean"
|
||||
use="optional" default="false">
|
||||
</xs:attribute>
|
||||
<xs:attribute name="name" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"></xs:minLength>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
|
@ -407,6 +407,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
}
|
||||
else if (id == R.id.routeBluetooth) {
|
||||
LinphoneManager.getInstance().routeAudioToBluetooth();
|
||||
isSpeakerEnabled = false;
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_on);
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_off);
|
||||
routeSpeaker.setBackgroundResource(R.drawable.route_speaker_off);
|
||||
|
@ -414,6 +415,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
}
|
||||
else if (id == R.id.routeReceiver) {
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
isSpeakerEnabled = false;
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_off);
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_on);
|
||||
routeSpeaker.setBackgroundResource(R.drawable.route_speaker_off);
|
||||
|
@ -421,6 +423,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
}
|
||||
else if (id == R.id.routeSpeaker) {
|
||||
LinphoneManager.getInstance().routeAudioToSpeaker();
|
||||
isSpeakerEnabled = true;
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_off);
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_off);
|
||||
routeSpeaker.setBackgroundResource(R.drawable.route_speaker_on);
|
||||
|
@ -940,24 +943,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
}
|
||||
|
||||
private void hideOrDisplayAudioRoutes()
|
||||
{
|
||||
if (isSpeakerEnabled) {
|
||||
speaker.setBackgroundResource(R.drawable.speaker_on);
|
||||
routeSpeaker.setBackgroundResource(R.drawable.route_speaker_on);
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_off);
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_off);
|
||||
} else {
|
||||
speaker.setBackgroundResource(R.drawable.speaker_off);
|
||||
routeSpeaker.setBackgroundResource(R.drawable.route_speaker_off);
|
||||
if (LinphoneManager.getInstance().isUsingBluetoothAudioRoute) {
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_off);
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_on);
|
||||
} else {
|
||||
routeReceiver.setBackgroundResource(R.drawable.route_receiver_on);
|
||||
routeBluetooth.setBackgroundResource(R.drawable.route_bluetooth_off);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
if (routeSpeaker.getVisibility() == View.VISIBLE) {
|
||||
routeSpeaker.setVisibility(View.INVISIBLE);
|
||||
routeBluetooth.setVisibility(View.INVISIBLE);
|
||||
|
|
|
@ -954,7 +954,13 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
mLc.enablePayloadType(videoCodec, enable);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||
private void doDestroy() {
|
||||
try {
|
||||
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30))
|
||||
mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
|
||||
} catch (Exception e) {}
|
||||
|
||||
try {
|
||||
mTimer.cancel();
|
||||
mLc.destroy();
|
||||
|
|