Display messages if lists are empty
This commit is contained in:
parent
5a7dedc836
commit
30753774c3
11 changed files with 210 additions and 37 deletions
|
@ -91,4 +91,14 @@
|
|||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noChatHistory"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_chat_history"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -68,6 +68,28 @@
|
|||
android:fastScrollEnabled="true"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noSipContact"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/no_sip_contact"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noContact"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/no_contact"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -92,4 +92,24 @@
|
|||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noCallHistory"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_call_history"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noMissedCallHistory"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_missed_call_history"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -92,4 +92,24 @@
|
|||
android:cacheColorHint="@color/transparent"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noCallHistory"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_call_history"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noMissedCallHistory"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_missed_call_history"
|
||||
android:textColor="@drawable/text_color"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -203,7 +203,12 @@
|
|||
<string name="addressHint">Numéro ou adresse</string>
|
||||
<string name="conference">Conférence</string>
|
||||
<string name="draft">Brouillon</string>
|
||||
<string name="new_fast_chat">Entrez une adresse SIP avec qui discuter…</string>
|
||||
<string name="new_fast_chat">Entrez une adresse SIP…</string>
|
||||
<string name="no_call_history">Aucun appel dans votre historique.</string>
|
||||
<string name="no_missed_call_history">Aucun appel manqué dans votre historique.</string>
|
||||
<string name="no_contact">Aucun contact dans votre carnet d\'adresse.</string>
|
||||
<string name="no_sip_contact">Aucun contact SIP dans votre carnet d\'adresse.</string>
|
||||
<string name="no_chat_history">Aucun historique de chat.</string>
|
||||
|
||||
<!-- Used by Android to help blind people by describing them images -->
|
||||
<string name="content_description_add_contact"></string>
|
||||
|
@ -295,7 +300,7 @@
|
|||
<string name="button_send_picture">Img</string>
|
||||
<string name="uploading_image">Envoi en cours…</string>
|
||||
|
||||
<string name="call_update_title">Mise à jour de l'appel</string>
|
||||
<string name="call_update_title">Mise à jour de l\'appel</string>
|
||||
<string name="call_update_desc">Votre correspondant souhaite ajouter la vidéo à l\'appel en cours.</string>
|
||||
<string name="call_update_yes">Accepter</string>
|
||||
<string name="call_update_no">Refuser</string>
|
||||
|
|
|
@ -254,6 +254,11 @@
|
|||
<string name="conference">Conference</string>
|
||||
<string name="draft">Draft</string>
|
||||
<string name="new_fast_chat">Enter a SIP address to chat with…</string>
|
||||
<string name="no_call_history">No call in your history.</string>
|
||||
<string name="no_missed_call_history">No missed call in your history.</string>
|
||||
<string name="no_contact">No contact in your address book.</string>
|
||||
<string name="no_sip_contact">No SIP contact in your address book.</string>
|
||||
<string name="no_chat_history">No chat history.</string>
|
||||
|
||||
<!-- Used by Android to help blind people by describing them images -->
|
||||
<string name="content_description_add_contact">Add to contacts button</string>
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
private LayoutInflater mInflater;
|
||||
private List<String> mConversations, mDrafts;
|
||||
private ListView chatList;
|
||||
private TextView edit, ok, newDiscussion;
|
||||
private TextView edit, ok, newDiscussion, noChatHistory;
|
||||
private ImageView clearFastChat;
|
||||
private EditText fastNewChat;
|
||||
private boolean isEditMode = false;
|
||||
|
@ -62,6 +62,8 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
chatList.setOnItemClickListener(this);
|
||||
registerForContextMenu(chatList);
|
||||
|
||||
noChatHistory = (TextView) view.findViewById(R.id.noChatHistory);
|
||||
|
||||
edit = (TextView) view.findViewById(R.id.edit);
|
||||
edit.setOnClickListener(this);
|
||||
|
||||
|
@ -79,6 +81,17 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
return view;
|
||||
}
|
||||
|
||||
private void hideAndDisplayMessageIfNoChat() {
|
||||
if (mConversations.size() == 0 && mDrafts.size() == 0) {
|
||||
noChatHistory.setVisibility(View.VISIBLE);
|
||||
chatList.setVisibility(View.GONE);
|
||||
} else {
|
||||
noChatHistory.setVisibility(View.GONE);
|
||||
chatList.setVisibility(View.VISIBLE);
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
@ -90,7 +103,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
mConversations = LinphoneActivity.instance().getChatList();
|
||||
mDrafts = LinphoneActivity.instance().getDraftChatList();
|
||||
mConversations.removeAll(mDrafts);
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
hideAndDisplayMessageIfNoChat();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -111,7 +124,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
mConversations = LinphoneActivity.instance().getChatList();
|
||||
mDrafts = LinphoneActivity.instance().getDraftChatList();
|
||||
mConversations.removeAll(mDrafts);
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
hideAndDisplayMessageIfNoChat();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -126,13 +139,13 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
edit.setVisibility(View.VISIBLE);
|
||||
ok.setVisibility(View.GONE);
|
||||
isEditMode = false;
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
hideAndDisplayMessageIfNoChat();
|
||||
}
|
||||
else if (id == R.id.edit) {
|
||||
edit.setVisibility(View.GONE);
|
||||
ok.setVisibility(View.VISIBLE);
|
||||
isEditMode = true;
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
hideAndDisplayMessageIfNoChat();
|
||||
}
|
||||
else if (id == R.id.newDiscussion) {
|
||||
String sipUri = fastNewChat.getText().toString();
|
||||
|
@ -163,7 +176,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
mConversations = LinphoneActivity.instance().getChatList();
|
||||
mDrafts = LinphoneActivity.instance().getDraftChatList();
|
||||
mConversations.removeAll(mDrafts);
|
||||
chatList.setAdapter(new ChatListAdapter());
|
||||
hideAndDisplayMessageIfNoChat();
|
||||
|
||||
LinphoneActivity.instance().updateMissedChatCount();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ import android.widget.TextView;
|
|||
public class ContactsFragment extends Fragment implements OnClickListener, OnItemClickListener {
|
||||
private LayoutInflater mInflater;
|
||||
private ListView contactsList;
|
||||
private TextView allContacts, linphoneContacts, newContact;
|
||||
private TextView allContacts, linphoneContacts, newContact, noSipContact, noContact;
|
||||
private boolean onlyDisplayLinphoneContacts;
|
||||
private int lastKnownPosition;
|
||||
private AlphabetIndexer indexer;
|
||||
|
@ -67,6 +67,9 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
|||
onlyDisplayChatAddress = getArguments().getBoolean("ChatAddressOnly");
|
||||
}
|
||||
|
||||
noSipContact = (TextView) view.findViewById(R.id.noSipContact);
|
||||
noContact = (TextView) view.findViewById(R.id.noContact);
|
||||
|
||||
contactsList = (ListView) view.findViewById(R.id.contactsList);
|
||||
contactsList.setOnItemClickListener(this);
|
||||
|
||||
|
@ -112,13 +115,27 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
|||
Cursor allContactsCursor = LinphoneActivity.instance().getAllContactsCursor();
|
||||
Cursor sipContactsCursor = LinphoneActivity.instance().getSIPContactsCursor();
|
||||
|
||||
noSipContact.setVisibility(View.GONE);
|
||||
noContact.setVisibility(View.GONE);
|
||||
contactsList.setVisibility(View.VISIBLE);
|
||||
|
||||
if (onlyDisplayLinphoneContacts) {
|
||||
if (sipContactsCursor.getCount() == 0) {
|
||||
noSipContact.setVisibility(View.VISIBLE);
|
||||
contactsList.setVisibility(View.GONE);
|
||||
} else {
|
||||
indexer = new AlphabetIndexer(sipContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(sipContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
contactsList.setAdapter(new ContactsListAdapter(LinphoneActivity.instance().getSIPContacts(), sipContactsCursor));
|
||||
}
|
||||
} else {
|
||||
if (allContactsCursor.getCount() == 0) {
|
||||
noContact.setVisibility(View.VISIBLE);
|
||||
contactsList.setVisibility(View.GONE);
|
||||
} else {
|
||||
indexer = new AlphabetIndexer(allContactsCursor, Compatibility.getCursorDisplayNameColumnIndex(allContactsCursor), " ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
contactsList.setAdapter(new ContactsListAdapter(LinphoneActivity.instance().getAllContacts(), allContactsCursor));
|
||||
}
|
||||
}
|
||||
LinphoneActivity.instance().setLinphoneContactsPrefered(onlyDisplayLinphoneContacts);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ import android.view.ContextMenu.ContextMenuInfo;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.Animation.AnimationListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.Animation.AnimationListener;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ExpandableListView.OnChildClickListener;
|
||||
|
@ -56,7 +56,7 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
private Handler mHandler = new Handler();
|
||||
private ExpandableListView historyList;
|
||||
private LayoutInflater mInflater;
|
||||
private TextView allCalls, missedCalls, edit, ok, deleteAll;
|
||||
private TextView allCalls, missedCalls, edit, ok, deleteAll, noCallHistory, noMissedCallHistory;
|
||||
private boolean onlyDisplayMissedCalls, isEditMode;
|
||||
private SparseArray<List<LinphoneCallLog>> mLogs;
|
||||
|
||||
|
@ -66,6 +66,9 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
mInflater = inflater;
|
||||
View view = inflater.inflate(R.layout.history, container, false);
|
||||
|
||||
noCallHistory = (TextView) view.findViewById(R.id.noCallHistory);
|
||||
noMissedCallHistory = (TextView) view.findViewById(R.id.noMissedCallHistory);
|
||||
|
||||
historyList = (ExpandableListView) view.findViewById(R.id.historyList);
|
||||
historyList.setOnChildClickListener(this);
|
||||
historyList.setOnGroupClickListener(this);
|
||||
|
@ -92,6 +95,23 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
return view;
|
||||
}
|
||||
|
||||
private boolean hideHistoryListAndDisplayMessageIfEmpty() {
|
||||
if (mLogs.size() == 0) {
|
||||
if (onlyDisplayMissedCalls) {
|
||||
noMissedCallHistory.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
noCallHistory.setVisibility(View.VISIBLE);
|
||||
}
|
||||
historyList.setVisibility(View.GONE);
|
||||
return true;
|
||||
} else {
|
||||
noCallHistory.setVisibility(View.GONE);
|
||||
noMissedCallHistory.setVisibility(View.GONE);
|
||||
historyList.setVisibility(View.VISIBLE);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
@ -99,7 +119,9 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
||||
|
||||
initLogsLists(Arrays.asList(LinphoneManager.getLc().getCallLogs()));
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
expandAllGroups();
|
||||
}
|
||||
|
||||
|
@ -212,7 +234,9 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
initLogsLists(new ArrayList<LinphoneCallLog>());
|
||||
}
|
||||
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
expandAllGroups();
|
||||
}
|
||||
|
||||
|
@ -224,7 +248,9 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
}
|
||||
|
||||
initLogsLists(Arrays.asList(LinphoneManager.getLc().getCallLogs()));
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
expandAllGroups();
|
||||
}
|
||||
return false;
|
||||
|
@ -236,7 +262,9 @@ public class HistoryFragment extends Fragment implements OnClickListener, OnChil
|
|||
if (isEditMode) {
|
||||
LinphoneManager.getLc().removeCallLog(log);
|
||||
initLogsLists(Arrays.asList(LinphoneManager.getLc().getCallLogs()));
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity()));
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
expandAllGroups();
|
||||
} else {
|
||||
LinphoneAddress address;
|
||||
|
|
|
@ -55,7 +55,7 @@ import android.widget.TextView;
|
|||
public class HistorySimpleFragment extends Fragment implements OnClickListener, OnItemClickListener {
|
||||
private ListView historyList;
|
||||
private LayoutInflater mInflater;
|
||||
private TextView allCalls, missedCalls, edit, ok, deleteAll;
|
||||
private TextView allCalls, missedCalls, edit, ok, deleteAll, noCallHistory, noMissedCallHistory;
|
||||
private boolean onlyDisplayMissedCalls, isEditMode;
|
||||
private List<LinphoneCallLog> mLogs;
|
||||
|
||||
|
@ -65,6 +65,9 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
mInflater = inflater;
|
||||
View view = inflater.inflate(R.layout.history_simple, container, false);
|
||||
|
||||
noCallHistory = (TextView) view.findViewById(R.id.noCallHistory);
|
||||
noMissedCallHistory = (TextView) view.findViewById(R.id.noMissedCallHistory);
|
||||
|
||||
historyList = (ListView) view.findViewById(R.id.historyList);
|
||||
historyList.setOnItemClickListener(this);
|
||||
registerForContextMenu(historyList);
|
||||
|
@ -91,6 +94,36 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
return view;
|
||||
}
|
||||
|
||||
private void removeNotMissedCallsFromLogs() {
|
||||
if (onlyDisplayMissedCalls) {
|
||||
List<LinphoneCallLog> missedCalls = new ArrayList<LinphoneCallLog>();
|
||||
for (LinphoneCallLog log : mLogs) {
|
||||
if (log.getStatus() == CallStatus.Missed) {
|
||||
missedCalls.add(log);
|
||||
}
|
||||
}
|
||||
mLogs = missedCalls;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hideHistoryListAndDisplayMessageIfEmpty() {
|
||||
removeNotMissedCallsFromLogs();
|
||||
if (mLogs.isEmpty()) {
|
||||
if (onlyDisplayMissedCalls) {
|
||||
noMissedCallHistory.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
noCallHistory.setVisibility(View.VISIBLE);
|
||||
}
|
||||
historyList.setVisibility(View.GONE);
|
||||
return true;
|
||||
} else {
|
||||
noCallHistory.setVisibility(View.GONE);
|
||||
noMissedCallHistory.setVisibility(View.GONE);
|
||||
historyList.setVisibility(View.VISIBLE);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
@ -98,8 +131,10 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
LinphoneActivity.instance().selectMenu(FragmentsAvailable.HISTORY);
|
||||
|
||||
mLogs = Arrays.asList(LinphoneManager.getLc().getCallLogs());
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
|
||||
|
@ -113,7 +148,9 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
LinphoneCallLog log = mLogs.get(info.position);
|
||||
LinphoneManager.getLc().removeCallLog(log);
|
||||
mLogs = Arrays.asList(LinphoneManager.getLc().getCallLogs());
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -150,8 +187,10 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
mLogs = new ArrayList<LinphoneCallLog>();
|
||||
}
|
||||
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
|
||||
|
@ -159,7 +198,9 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
LinphoneCallLog log = mLogs.get(position);
|
||||
LinphoneManager.getLc().removeCallLog(log);
|
||||
mLogs = Arrays.asList(LinphoneManager.getLc().getCallLogs());
|
||||
if (!hideHistoryListAndDisplayMessageIfEmpty()) {
|
||||
historyList.setAdapter(new CallHistoryAdapter(getActivity().getApplicationContext()));
|
||||
}
|
||||
} else {
|
||||
if (LinphoneActivity.isInstanciated()) {
|
||||
LinphoneCallLog log = mLogs.get(position);
|
||||
|
@ -240,15 +281,7 @@ public class HistorySimpleFragment extends Fragment implements OnClickListener,
|
|||
CallHistoryAdapter(Context aContext) {
|
||||
missedCall = BitmapFactory.decodeResource(getResources(), R.drawable.call_status_missed);
|
||||
|
||||
if (onlyDisplayMissedCalls) {
|
||||
List<LinphoneCallLog> missedCalls = new ArrayList<LinphoneCallLog>();
|
||||
for (LinphoneCallLog log : mLogs) {
|
||||
if (log.getStatus() == CallStatus.Missed) {
|
||||
missedCalls.add(log);
|
||||
}
|
||||
}
|
||||
mLogs = missedCalls;
|
||||
} else {
|
||||
if (!onlyDisplayMissedCalls) {
|
||||
outgoingCall = BitmapFactory.decodeResource(getResources(), R.drawable.call_status_outgoing);
|
||||
incomingCall = BitmapFactory.decodeResource(getResources(), R.drawable.call_status_incoming);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
LinphoneOnCallEncryptionChangedListener,
|
||||
OnClickListener {
|
||||
private final static int SECONDS_BEFORE_HIDING_CONTROLS = 3000;
|
||||
private final static int SECONDS_BEFORE_DENYING_CALL_UPDATE = 30000;
|
||||
|
||||
private static InCallActivity instance;
|
||||
|
||||
|
@ -902,8 +903,7 @@ public class InCallActivity extends FragmentActivity implements
|
|||
public void run() {
|
||||
showAcceptCallUpdateDialog();
|
||||
|
||||
// We let 30 secs for the user to decide
|
||||
timer = new CountDownTimer(30000, 1000) {
|
||||
timer = new CountDownTimer(SECONDS_BEFORE_DENYING_CALL_UPDATE, 1000) {
|
||||
public void onTick(long millisUntilFinished) { }
|
||||
public void onFinish() {
|
||||
acceptCallUpdate(false);
|
||||
|
|
Loading…
Reference in a new issue