Few changes (again) in the way of showing/hiding the status bar to fix ugly render when going to incall activity
This commit is contained in:
parent
8fb6fa9f5d
commit
10c4cdb902
11 changed files with 57 additions and 32 deletions
|
@ -63,6 +63,10 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(about);
|
LinphoneActivity.instance().selectMenu(about);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -587,6 +587,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHAT);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHAT);
|
||||||
LinphoneActivity.instance().updateChatFragment(this);
|
LinphoneActivity.instance().updateChatFragment(this);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
|
|
|
@ -177,6 +177,10 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHATLIST);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHATLIST);
|
||||||
LinphoneActivity.instance().updateChatListFragment(this);
|
LinphoneActivity.instance().updateChatListFragment(this);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
|
@ -171,9 +171,15 @@ public class ContactFragment extends Fragment implements OnClickListener {
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACT);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACT);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contact.refresh(getActivity().getContentResolver());
|
contact.refresh(getActivity().getContentResolver());
|
||||||
if (contact.getName() == null || contact.getName().equals("")) {
|
if (contact.getName() == null || contact.getName().equals("")) {
|
||||||
//Contact has been deleted, return
|
//Contact has been deleted, return
|
||||||
|
|
|
@ -187,6 +187,10 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACTS);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACTS);
|
||||||
onlyDisplayLinphoneContacts = LinphoneActivity.instance().isLinphoneContactsPrefered();
|
onlyDisplayLinphoneContacts = LinphoneActivity.instance().isLinphoneContactsPrefered();
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.linphone.ui.AddressText;
|
||||||
import org.linphone.ui.CallButton;
|
import org.linphone.ui.CallButton;
|
||||||
import org.linphone.ui.EraseButton;
|
import org.linphone.ui.EraseButton;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -132,28 +131,10 @@ public class DialerFragment extends Fragment {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAttach(Activity activity) {
|
|
||||||
super.onAttach(activity);
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
|
||||||
LinphoneActivity.instance().updateDialerFragment(this);
|
|
||||||
LinphoneActivity.instance().showStatusBar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDetach() {
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
|
||||||
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
|
||||||
LinphoneActivity.instance().hideStatusBar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.onDetach();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.DIALER);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.DIALER);
|
||||||
LinphoneActivity.instance().updateDialerFragment(this);
|
LinphoneActivity.instance().updateDialerFragment(this);
|
||||||
|
@ -173,16 +154,6 @@ public class DialerFragment extends Fragment {
|
||||||
resetLayout(isCallTransferOngoing);
|
resetLayout(isCallTransferOngoing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause() {
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
|
||||||
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
|
||||||
LinphoneActivity.instance().hideStatusBar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
super.onPause();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void resetLayout(boolean callTransfer) {
|
public void resetLayout(boolean callTransfer) {
|
||||||
isCallTransferOngoing = callTransfer;
|
isCallTransferOngoing = callTransfer;
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
|
|
|
@ -186,6 +186,17 @@ public class EditContactFragment extends Fragment {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void initNumbersFields(final TableLayout controls, final Contact contact) {
|
private void initNumbersFields(final TableLayout controls, final Contact contact) {
|
||||||
controls.removeAllViews();
|
controls.removeAllViews();
|
||||||
numbersAndAddresses = new ArrayList<NewOrUpdatedNumberOrAddress>();
|
numbersAndAddresses = new ArrayList<NewOrUpdatedNumberOrAddress>();
|
||||||
|
|
|
@ -132,8 +132,13 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY_DETAIL);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY_DETAIL);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,9 +115,15 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (LinphoneActivity.isInstanciated())
|
|
||||||
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initLogsLists(Arrays.asList(LinphoneManager.getLc().getCallLogs()));
|
initLogsLists(Arrays.asList(LinphoneManager.getLc().getCallLogs()));
|
||||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||||
|
|
|
@ -130,9 +130,15 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (LinphoneActivity.isInstanciated())
|
|
||||||
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mLogs = Arrays.asList(LinphoneManager.getLc().getCallLogs());
|
mLogs = Arrays.asList(LinphoneManager.getLc().getCallLogs());
|
||||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||||
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
||||||
|
|
|
@ -891,6 +891,10 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
|
||||||
|
|
||||||
if (LinphoneActivity.isInstanciated()) {
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.SETTINGS);
|
LinphoneActivity.instance().selectMenu(FragmentsAvailable.SETTINGS);
|
||||||
|
|
||||||
|
if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) {
|
||||||
|
LinphoneActivity.instance().hideStatusBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue