Back to dialer in settings and about
This commit is contained in:
parent
f2f12e1bdb
commit
417b7d0a6a
13 changed files with 32 additions and 41 deletions
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:background="@color/colorH"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@color/colorH">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/address_bar"
|
android:id="@+id/address_bar"
|
||||||
|
@ -39,6 +39,14 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<org.linphone.ui.Numpad
|
||||||
|
android:id="@+id/numpad"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_above="@id/controls"
|
||||||
|
android:layout_below="@id/address_bar"
|
||||||
|
android:layout_centerInParent="true"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/controls"
|
android:id="@+id/controls"
|
||||||
|
@ -75,14 +83,4 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<org.linphone.ui.Numpad
|
|
||||||
android:id="@+id/numpad"
|
|
||||||
android:contentDescription="@string/content_description_numpad"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:layout_above="@id/controls"
|
|
||||||
android:layout_below="@id/address_bar"
|
|
||||||
android:layout_centerInParent="true"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<item name="android:layout_height">50dp</item>
|
<item name="android:layout_height">50dp</item>
|
||||||
<item name="android:textColor">@android:color/transparent</item>
|
<item name="android:textColor">@android:color/transparent</item>
|
||||||
<item name="android:textSize">20sp</item>
|
<item name="android:textSize">20sp</item>
|
||||||
<item name="android:layout_margin">30dp</item>
|
<item name="android:layout_margin">25dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<declare-styleable name="Numpad">
|
<declare-styleable name="Numpad">
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
||||||
lc.resetLogCollection();
|
lc.resetLogCollection();
|
||||||
}
|
}
|
||||||
} else if (v == cancel) {
|
} else if (v == cancel) {
|
||||||
getFragmentManager().popBackStackImmediate();
|
LinphoneActivity.instance().displayDialer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class BootReceiver extends BroadcastReceiver {
|
||||||
if (lpConfig.getBool("app", "auto_start", false)) {
|
if (lpConfig.getBool("app", "auto_start", false)) {
|
||||||
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
|
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
|
||||||
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
|
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
|
||||||
context.startService(lLinphoneServiceIntent);;
|
context.startService(lLinphoneServiceIntent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1524,13 +1524,9 @@ public class CallActivity extends Activity implements OnClickListener {
|
||||||
isCallPaused = false;
|
isCallPaused = false;
|
||||||
isInConference = false;
|
isInConference = false;
|
||||||
} else {
|
} else {
|
||||||
if (isConferenceRunning && call.isInConference()) {
|
|
||||||
//callState.setImageResource(R.drawable.remove);
|
//callState.setImageResource(R.drawable.remove);
|
||||||
isInConference = true;
|
//callState.setImageResource(R.drawable.play);
|
||||||
} else {
|
isInConference = isConferenceRunning && call.isInConference();
|
||||||
//callState.setImageResource(R.drawable.play);
|
|
||||||
isInConference = false;
|
|
||||||
}
|
|
||||||
isCallPaused = false;
|
isCallPaused = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
sendImage.showContextMenu();
|
sendImage.showContextMenu();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1116,7 +1116,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
contacts.clear();
|
contacts.clear();
|
||||||
contacts = (List<ContactAddress>) results.values;
|
contacts = (List<ContactAddress>) results.values;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
} else {;
|
} else {
|
||||||
contacts.clear();
|
contacts.clear();
|
||||||
contacts = getContactsList();
|
contacts = getContactsList();
|
||||||
notifyDataSetInvalidated();
|
notifyDataSetInvalidated();
|
||||||
|
|
|
@ -736,7 +736,7 @@ public class ContactEditorFragment extends Fragment {
|
||||||
newNumberOrAddress = newN;
|
newNumberOrAddress = newN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save() {;
|
public void save() {
|
||||||
if (newNumberOrAddress == null || newNumberOrAddress.equals(oldNumberOrAddress))
|
if (newNumberOrAddress == null || newNumberOrAddress.equals(oldNumberOrAddress))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ContactsManager {
|
||||||
|
|
||||||
public void initializeSyncAccount(Context context, ContentResolver contentResolver) {
|
public void initializeSyncAccount(Context context, ContentResolver contentResolver) {
|
||||||
initializeContactManager(context,contentResolver);
|
initializeContactManager(context,contentResolver);
|
||||||
AccountManager accountManager = (AccountManager) context.getSystemService(context.ACCOUNT_SERVICE);
|
AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
|
||||||
|
|
||||||
Account[] accounts = accountManager.getAccountsByType(context.getPackageName());
|
Account[] accounts = accountManager.getAccountsByType(context.getPackageName());
|
||||||
|
|
||||||
|
@ -452,11 +452,7 @@ public class ContactsManager {
|
||||||
public boolean isContactHasAddress(Contact contact, String address){
|
public boolean isContactHasAddress(Contact contact, String address){
|
||||||
if(contact != null) {
|
if(contact != null) {
|
||||||
contact.refresh(contentResolver);
|
contact.refresh(contentResolver);
|
||||||
if (contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:"+ address)) {
|
return contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:" + address);
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -695,7 +695,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null);
|
changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null);
|
||||||
chat_selected.setVisibility(View.VISIBLE);
|
chat_selected.setVisibility(View.VISIBLE);
|
||||||
} else if (id == R.id.cancel){
|
} else if (id == R.id.cancel){
|
||||||
getFragmentManager().popBackStackImmediate();
|
displayDialer();
|
||||||
mTopBar.setVisibility(View.GONE);
|
mTopBar.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -773,6 +773,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void displayDialer() {
|
||||||
|
changeCurrentFragment(FragmentsAvailable.DIALER, null);
|
||||||
|
}
|
||||||
|
|
||||||
public void displayAccountSettings(int accountNumber) {
|
public void displayAccountSettings(int accountNumber) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putInt("Account", accountNumber);
|
bundle.putInt("Account", accountNumber);
|
||||||
|
|
|
@ -91,10 +91,7 @@ public final class LinphoneUtils {
|
||||||
|
|
||||||
public static boolean isNumberAddress(String numberOrAddress) {
|
public static boolean isNumberAddress(String numberOrAddress) {
|
||||||
LinphoneProxyConfig proxy = LinphoneManager.getLc().createProxyConfig();
|
LinphoneProxyConfig proxy = LinphoneManager.getLc().createProxyConfig();
|
||||||
if(proxy.normalizePhoneNumber(numberOrAddress) != null){
|
return proxy.normalizePhoneNumber(numberOrAddress) != null;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isStrictSipAddress(String numberOrAddress) {
|
public static boolean isStrictSipAddress(String numberOrAddress) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
instance = this;
|
instance = this;
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa
|
||||||
} catch (LinphoneCoreException e) {
|
} catch (LinphoneCoreException e) {
|
||||||
LinphoneManager.getInstance().terminateCall();
|
LinphoneManager.getInstance().terminateCall();
|
||||||
onWrongDestinationAddress();
|
onWrongDestinationAddress();
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onWrongDestinationAddress() {
|
protected void onWrongDestinationAddress() {
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class Digit extends Button implements AddressAware {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue