summaryrefslogtreecommitdiff
path: root/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java')
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java b/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
index 64eb720d..611e10e9 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
@@ -87,8 +87,10 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
private TextView mUpStatus;
private TextView mDownStatus;
private TextView mConnectStatus;
+ private TextView mStartPendingIntent;
private boolean mShowOptionsLayout;
private CheckBox mClearLogCheckBox;
+ private Intent mPendingIntent;
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
@@ -622,6 +624,10 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
mUpStatus = (TextView) v.findViewById(R.id.speedUp);
mDownStatus = (TextView) v.findViewById(R.id.speedDown);
mConnectStatus = (TextView) v.findViewById(R.id.speedStatus);
+ mStartPendingIntent = (TextView) v.findViewById(R.id.trigger_pending_action);
+ mStartPendingIntent.setOnClickListener((view) -> {if (mPendingIntent != null)
+ startActivity(mPendingIntent);
+ });
if (mShowOptionsLayout)
mOptionsLayout.setVisibility(View.VISIBLE);
return v;
@@ -663,6 +669,8 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar.
if (mConnectStatus != null)
mConnectStatus.setText(cleanLogMessage);
}
+ mStartPendingIntent.setVisibility(intent == null ? View.GONE : View.VISIBLE);
+ mPendingIntent = intent;
});
}
}