From 59a3484cac4463559e41a7e9d851c4119d87f56f Mon Sep 17 00:00:00 2001 From: Eugene Fryntov Date: Thu, 1 Feb 2018 13:25:28 -0500 Subject: [PATCH] Added 'ActiveAuthorizationIDs' notice handling to Android library --- MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java | 8 ++++++++ .../java/ca/psiphon/tunneledwebview/MainActivity.java | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java b/MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java index 1a9814769..789863711 100644 --- a/MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java +++ b/MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java @@ -90,6 +90,7 @@ public interface HostService { public void onBytesTransferred(long sent, long received); public void onStartedWaitingForNetworkConnectivity(); public void onClientVerificationRequired(String serverNonce, int ttlSeconds, boolean resetCache); + public void onActiveAuthorizationIDs(List authorizations); public void onExiting(); } @@ -560,6 +561,13 @@ private void handlePsiphonNotice(String noticeJSON) { diagnostic = false; JSONObject data = notice.getJSONObject("data"); mHostService.onBytesTransferred(data.getLong("sent"), data.getLong("received")); + } else if (noticeType.equals("ActiveAuthorizationIDs")) { + JSONArray activeAuthorizationIDs = notice.getJSONObject("data").getJSONArray("IDs"); + ArrayList authorizations = new ArrayList(); + for (int i=0; i authorizations) { + + } + @Override public void onExiting() {