Skip to content

Commit 9ac1792

Browse files
Merge pull request #65 from nextcloud/allowDevAppFixes
Allow dev app fixes
2 parents 9aec063 + c67f4a2 commit 9ac1792

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/main/java/com/nextcloud/android/sso/AccountImporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private static boolean appInstalledOrNot(Context context) {
144144
// Find all currently installed nextcloud accounts on the phone
145145
public static List<Account> findAccounts(final Context context) {
146146
final AccountManager accMgr = AccountManager.get(context);
147-
final Account[] accounts = accMgr.getAccountsByType("nextcloud");
147+
final Account[] accounts = accMgr.getAccounts();
148148

149149
List<Account> accountsAvailable = new ArrayList<>();
150150
for (final Account account : accounts) {

src/main/java/com/nextcloud/android/sso/api/AidlNetworkRequest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,11 @@ public void connect(String type) {
7676
stop();
7777
}
7878

79-
String componentName;
80-
if (type != null && type.equalsIgnoreCase(Constants.ACCOUNT_TYPE_DEV)) {
79+
String componentName = Constants.PACKAGE_NAME_PROD;
80+
if (type.equals(Constants.ACCOUNT_TYPE_DEV)) {
8181
componentName = Constants.PACKAGE_NAME_DEV;
82-
} else {
83-
componentName = Constants.PACKAGE_NAME_PROD;
8482
}
83+
8584
try {
8685
Intent intentService = new Intent();
8786
intentService.setComponent(new ComponentName(componentName,

src/main/java/com/nextcloud/android/sso/api/NetworkRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected NetworkRequest(Context context, SingleSignOnAccount account, Nextcloud
2828

2929

3030
protected void connect(String type) {
31-
Log.v(TAG, "Nextcloud Single sign-on connect() called [" + Thread.currentThread().getName() + "]");
31+
Log.v(TAG, "Nextcloud Single sign-on connect() called [" + Thread.currentThread().getName() + "] Account-Type: [" + type + "]");
3232
if (mDestroyed) {
3333
throw new IllegalStateException("API already destroyed! You cannot reuse a stopped API instance");
3434
}

0 commit comments

Comments
 (0)