Do not use "Send log" feature on the Exit button, but on another one...
This commit is contained in:
parent
f3adfb02ca
commit
ff906985b4
3 changed files with 27 additions and 7 deletions
|
@ -43,6 +43,14 @@
|
|||
android:textColor="@color/text_contrast"
|
||||
android:id="@+id/AboutLink"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/send_log"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30sp"
|
||||
android:text="@string/menu_send_log"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button android:id="@+id/exit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -200,6 +200,7 @@
|
|||
<string name="about_reading_logs">Reading logs, may takes time…</string>
|
||||
<string name="about_mailer_chooser_text">Send bug report with…</string>
|
||||
<string name="menu_about">About</string>
|
||||
<string name="menu_send_log">Send log</string>
|
||||
<string name="pref_audio">Audio</string>
|
||||
<string name="menu_exit">Exit</string>
|
||||
<string name="pref_prefix">Prefix</string>
|
||||
|
@ -258,6 +259,7 @@
|
|||
<string name="pref_video_codec_mpeg4_unavailable">Codec disabled, build the app from source code to enable it</string>
|
||||
|
||||
<string name="pref_sipaccounts">SIP Accounts</string>
|
||||
<string name="pref_dtmf">Gate code</string>
|
||||
<string name="pref_wifi_only">Use wifi only</string>
|
||||
<string name="pref_push_notification">Enable push notifications</string>
|
||||
|
||||
|
@ -359,7 +361,7 @@
|
|||
<string name="button_history">History</string>
|
||||
<string name="button_contacts">Contacts</string>
|
||||
<string name="button_settings">Settings</string>
|
||||
<string name="button_chat">Chat</string>
|
||||
<string name="button_chat">Gate</string>
|
||||
<string name="button_about">About</string>
|
||||
|
||||
<string name="button_setup_cancel">Cancel</string>
|
||||
|
@ -482,4 +484,7 @@
|
|||
<string name="remote_provisioning_failure">Failed to download or apply remote provisioning profile...</string>
|
||||
<string name="remote_provisioning_again_title">Remote provisioning</string>
|
||||
<string name="remote_provisioning_again_message">Do you want to change the provisioning URI ?</string>
|
||||
<string name="pref_dtmf_sequence_title">DTMF sequence</string>
|
||||
<string name="dtmf_sequence_not_set_failure">No DTMF set in advanced preferences</string>
|
||||
<string name="dtmf_sequence">DTMF sequence</string>
|
||||
</resources>
|
||||
|
|
|
@ -34,6 +34,9 @@ import android.widget.TextView;
|
|||
*/
|
||||
public class AboutFragment extends Fragment implements OnClickListener {
|
||||
private FragmentsAvailable about = FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT;
|
||||
View exitButton = null;
|
||||
View sendLogButton = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
@ -50,9 +53,14 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
|||
Log.e(e, "cannot get version name");
|
||||
}
|
||||
|
||||
View issue = view.findViewById(R.id.exit);
|
||||
issue.setOnClickListener(this);
|
||||
issue.setVisibility(View.VISIBLE);
|
||||
sendLogButton = view.findViewById(R.id.send_log);
|
||||
sendLogButton.setOnClickListener(this);
|
||||
sendLogButton.setVisibility(getResources().getBoolean(R.bool.enable_log_collect) ? View.VISIBLE : View.GONE);
|
||||
|
||||
exitButton = view.findViewById(R.id.exit);
|
||||
exitButton.setOnClickListener(this);
|
||||
exitButton.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
@ -73,8 +81,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
if (LinphoneActivity.isInstanciated()) {
|
||||
|
||||
if (getResources().getBoolean(R.bool.enable_log_collect)) {
|
||||
if (v == sendLogButton) {
|
||||
LinphoneUtils.collectLogs(LinphoneActivity.instance(), getString(R.string.about_bugreport_email));
|
||||
} else {
|
||||
LinphoneActivity.instance().exit();
|
||||
|
|
Loading…
Reference in a new issue