diff --git a/OpenKeychain/src/main/AndroidManifest.xml b/OpenKeychain/src/main/AndroidManifest.xml
index cb886ed50..d2e953f8a 100644
--- a/OpenKeychain/src/main/AndroidManifest.xml
+++ b/OpenKeychain/src/main/AndroidManifest.xml
@@ -113,16 +113,7 @@
-
-
-
-
-
- () {
@Override
protected JSONObject doInBackground(Void... dummy) {
try {
- long timer = System.currentTimeMillis();
-
JSONObject params = new JSONObject();
params.put("client_id", "7a011b66275f244d3f21");
params.put("client_secret", "eaced8a6655719d8c6848396de97b3f5d7a89fec");
params.put("code", oAuthCode);
params.put("state", oAuthState);
- JSONObject result = jsonHttpRequest("https://github.com/login/oauth/access_token", params, null);
-
- // ux flow: this operation should take at last a second
- timer = System.currentTimeMillis() -timer;
- if (timer < 1000) try {
- Thread.sleep(1000 -timer);
- } catch (InterruptedException e) {
- // never mind
- }
-
- return result;
+ return jsonHttpRequest("https://github.com/login/oauth/access_token", params, null);
} catch (IOException e) {
Log.e(Constants.TAG, "error in request", e);
@@ -165,29 +202,6 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment() {
+ @Override
+ protected Void doInBackground(Void... dummy) {
+ try {
+ HttpsURLConnection nection = (HttpsURLConnection) new URL(
+ "https://api.github.com/applications/7a011b66275f244d3f21/tokens/" + token)
+ .openConnection();
+ nection.setRequestMethod("DELETE");
+ nection.connect();
+ } catch (IOException e) {
+ // nvm
+ }
+ return null;
+ }
+ }.execute();
+
+ }
+
private void step3EditKey(final GithubResource resource) {
+ // set item data while we're there
+ {
+ Context context = getActivity();
+ mLinkedIdTitle.setText(resource.getDisplayTitle(context));
+ mLinkedIdComment.setText(resource.getDisplayComment(context));
+ }
+
mStatus3.setDisplayedChild(1);
new Handler().postDelayed(new Runnable() {
@@ -291,6 +334,23 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment= Build.VERSION_CODES.LOLLIPOP) {
+ mButtonContainer.getCurrentView().setTransitionName("linked_item");
+ activity.finishAfterTransition();
+ } else {
+ activity.finish();
+ }
+ }
+ }, 1000);
}
@Override
@@ -305,6 +365,72 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment
+ android:layout_height="match_parent"
+ xmlns:custom="http://schemas.android.com/apk/res-auto">
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="16dp"
+ android:inAnimation="@anim/fade_in"
+ android:outAnimation="@anim/fade_out"
+ custom:initialView="2">
+
+
diff --git a/OpenKeychain/src/main/res/layout/loader_layout.xml b/OpenKeychain/src/main/res/layout/loader_layout.xml
index 61dd48635..6f94384dc 100644
--- a/OpenKeychain/src/main/res/layout/loader_layout.xml
+++ b/OpenKeychain/src/main/res/layout/loader_layout.xml
@@ -4,7 +4,6 @@
android:layout_height="match_parent"
android:orientation="vertical">
-
-
-
+ android:gravity="center" />
diff --git a/OpenKeychain/src/main/res/layout/oauth_webview.xml b/OpenKeychain/src/main/res/layout/oauth_webview.xml
new file mode 100644
index 000000000..f00fdfd17
--- /dev/null
+++ b/OpenKeychain/src/main/res/layout/oauth_webview.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index ff126a7a5..fcf84da53 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -82,7 +82,6 @@
"Upload To Keyserver""Next""Back"
- "Cancel""No""Fingerprints match""Encrypt/sign and share text"
@@ -1591,10 +1590,10 @@
"The link between this GitHub account and key was securely verified. If you believe the account is genuine, confirm this verification with your key.""The link between this Domain Name and key was securely verified. If you believe the Domain is genuine, confirm this verification with your key.""The link between this Twitter account and key was securely verified. If you believe the account is genuine, confirm this verification with your key."
- "The link between your Website and key was securely verified. Everything looks in order."
- "The link between your GitHub account and key was securely verified. Everything looks in order."
- "The link between your Domain Name and key was securely verified. Everything looks in order."
- "The link between this Twitter account and key was securely verified. Everything looks in order."
+ "Everything looks in order."
+ "Everything looks in order."
+ "Everything looks in order."
+ "Everything looks in order.""There is one more unknown identity type"