From 0a5a344c14e1bf21e694ddfc3a1bd6564cbb5d63 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Thu, 29 Oct 2015 10:55:31 -0400 Subject: [PATCH] Remove GET_ACCOUNTS permission usage. Fixes #578 --- .../main/java/com/linkbubble/MainApplication.java | 2 -- .../main/java/com/linkbubble/ui/HomeActivity.java | 2 -- .../src/main/java/com/linkbubble/util/Util.java | 13 ------------- .../LinkBubble/src/main/res/xml/changelog.xml | 1 + 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Application/LinkBubble/src/main/java/com/linkbubble/MainApplication.java b/Application/LinkBubble/src/main/java/com/linkbubble/MainApplication.java index b6a410883..1e7dfc395 100644 --- a/Application/LinkBubble/src/main/java/com/linkbubble/MainApplication.java +++ b/Application/LinkBubble/src/main/java/com/linkbubble/MainApplication.java @@ -1,7 +1,5 @@ package com.linkbubble; -import android.accounts.Account; -import android.accounts.AccountManager; import android.app.AlertDialog; import android.app.Application; import android.content.ActivityNotFoundException; diff --git a/Application/LinkBubble/src/main/java/com/linkbubble/ui/HomeActivity.java b/Application/LinkBubble/src/main/java/com/linkbubble/ui/HomeActivity.java index 8698609ae..d9c71f04e 100755 --- a/Application/LinkBubble/src/main/java/com/linkbubble/ui/HomeActivity.java +++ b/Application/LinkBubble/src/main/java/com/linkbubble/ui/HomeActivity.java @@ -1,7 +1,5 @@ package com.linkbubble.ui; -import android.accounts.Account; -import android.accounts.AccountManager; import android.app.ActivityOptions; import android.content.Intent; import android.os.Bundle; diff --git a/Application/LinkBubble/src/main/java/com/linkbubble/util/Util.java b/Application/LinkBubble/src/main/java/com/linkbubble/util/Util.java index bdd9e9830..b2152ca30 100644 --- a/Application/LinkBubble/src/main/java/com/linkbubble/util/Util.java +++ b/Application/LinkBubble/src/main/java/com/linkbubble/util/Util.java @@ -1,6 +1,5 @@ package com.linkbubble.util; -import android.accounts.Account; import android.app.Activity; import android.app.Dialog; import android.content.ComponentName; @@ -373,18 +372,6 @@ static public void replaceViewAtPosition(View viewToReplace, View replaceWith) { parent.addView(replaceWith, index); } - static public String getDefaultEmail(Account[] accounts) { - Pattern emailPattern = Patterns.EMAIL_ADDRESS; - for (Account account : accounts) { - if (emailPattern.matcher(account.name).matches()) { - if (account.name != null) { - return account.name; - } - } - } - return null; - } - private static int sIconWidth = -1; private static int sIconHeight = -1; private static int sIconTextureWidth = -1; diff --git a/Application/LinkBubble/src/main/res/xml/changelog.xml b/Application/LinkBubble/src/main/res/xml/changelog.xml index 7be8723a7..3d558b8ac 100755 --- a/Application/LinkBubble/src/main/res/xml/changelog.xml +++ b/Application/LinkBubble/src/main/res/xml/changelog.xml @@ -3,6 +3,7 @@ BUG FIX: Fix an occasional crash when opening Link Bubble. + REMOVED: Unused GET_ACCOUNTS permission.