Back to dialer in settings and about

This commit is contained in:
Margaux Clerc 2015-11-17 14:44:38 +01:00
parent f2f12e1bdb
commit 417b7d0a6a
13 changed files with 32 additions and 41 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorH"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorH">
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/address_bar"
@ -39,6 +39,14 @@
</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
android:id="@+id/controls"
@ -74,15 +82,5 @@
android:layout_weight="0.5"/>
</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>

View file

@ -5,7 +5,7 @@
<item name="android:layout_height">50dp</item>
<item name="android:textColor">@android:color/transparent</item>
<item name="android:textSize">20sp</item>
<item name="android:layout_margin">30dp</item>
<item name="android:layout_margin">25dp</item>
</style>
<declare-styleable name="Numpad">

View file

@ -87,7 +87,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
lc.resetLogCollection();
}
} else if (v == cancel) {
getFragmentManager().popBackStackImmediate();
LinphoneActivity.instance().displayDialer();
}
}
}

View file

@ -35,7 +35,7 @@ public class BootReceiver extends BroadcastReceiver {
if (lpConfig.getBool("app", "auto_start", false)) {
Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN);
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
context.startService(lLinphoneServiceIntent);;
context.startService(lLinphoneServiceIntent);
}
}
}

View file

@ -1524,13 +1524,9 @@ public class CallActivity extends Activity implements OnClickListener {
isCallPaused = false;
isInConference = false;
} else {
if (isConferenceRunning && call.isInConference()) {
//callState.setImageResource(R.drawable.remove);
isInConference = true;
} else {
//callState.setImageResource(R.drawable.play);
isInConference = false;
}
//callState.setImageResource(R.drawable.remove);
//callState.setImageResource(R.drawable.play);
isInConference = isConferenceRunning && call.isInConference();
isCallPaused = false;
}

View file

@ -1040,7 +1040,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
sendImage.showContextMenu();
} catch (Exception e) {
e.printStackTrace();
};
}
}
@Override
@ -1116,7 +1116,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
contacts.clear();
contacts = (List<ContactAddress>) results.values;
notifyDataSetChanged();
} else {;
} else {
contacts.clear();
contacts = getContactsList();
notifyDataSetInvalidated();

View file

@ -736,7 +736,7 @@ public class ContactEditorFragment extends Fragment {
newNumberOrAddress = newN;
}
public void save() {;
public void save() {
if (newNumberOrAddress == null || newNumberOrAddress.equals(oldNumberOrAddress))
return;

View file

@ -93,7 +93,7 @@ public class ContactsManager {
public void initializeSyncAccount(Context context, ContentResolver 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());
@ -452,11 +452,7 @@ public class ContactsManager {
public boolean isContactHasAddress(Contact contact, String address){
if(contact != null) {
contact.refresh(contentResolver);
if (contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:"+ address)) {
return true;
} else {
return false;
}
return contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:" + address);
}
return false;
}

View file

@ -695,7 +695,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null);
chat_selected.setVisibility(View.VISIBLE);
} else if (id == R.id.cancel){
getFragmentManager().popBackStackImmediate();
displayDialer();
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) {
Bundle bundle = new Bundle();
bundle.putInt("Account", accountNumber);

View file

@ -91,10 +91,7 @@ public final class LinphoneUtils {
public static boolean isNumberAddress(String numberOrAddress) {
LinphoneProxyConfig proxy = LinphoneManager.getLc().createProxyConfig();
if(proxy.normalizePhoneNumber(numberOrAddress) != null){
return true;
}
return false;
return proxy.normalizePhoneNumber(numberOrAddress) != null;
}
public static boolean isStrictSipAddress(String numberOrAddress) {

View file

@ -108,8 +108,8 @@ public class AssistantActivity extends Activity implements OnClickListener {
}
};
instance = this;
};
}
@Override
protected void onResume() {
super.onResume();

View file

@ -81,7 +81,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa
} catch (LinphoneCoreException e) {
LinphoneManager.getInstance().terminateCall();
onWrongDestinationAddress();
};
}
}
protected void onWrongDestinationAddress() {

View file

@ -215,7 +215,7 @@ public class Digit extends Button implements AddressAware {
}
return true;
}
};
}
}