File tree Expand file tree Collapse file tree
owncloudApp/src/main/java/com/owncloud/android/presentation/providers/sharing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Summary
1111* Bugfix - Security flags for recording screen: [ #3468 ] ( https://github.com/owncloud/android/issues/3468 )
1212* Bugfix - Crash when changing orientation in Details view: [ #3571 ] ( https://github.com/owncloud/android/issues/3571 )
1313* Bugfix - Lock displays shown again: [ #3591 ] ( https://github.com/owncloud/android/issues/3591 )
14+ * Bugfix - Prevented signed in user in the list of users to be shared: [ #1419 ] ( https://github.com/owncloud/android/issues/1419 )
1415* Enhancement - First steps in Android Enterprise integration: [ #3415 ] ( https://github.com/owncloud/android/issues/3415 )
1516* Enhancement - Lock delay enforced: [ #3440 ] ( https://github.com/owncloud/android/issues/3440 )
1617* Enhancement - Provide app feedback to MDM admins: [ #3420 ] ( https://github.com/owncloud/android/issues/3420 )
@@ -55,6 +56,14 @@ Details
5556 https://github.com/owncloud/android/issues/3591
5657 https://github.com/owncloud/android/pull/3592
5758
59+ * Bugfix - Prevented signed in user in the list of users to be shared: [ #1419 ] ( https://github.com/owncloud/android/issues/1419 )
60+
61+ Previously, user list for sharing contains signed in user, now this user is omitted to avoid
62+ errors.
63+
64+ https://github.com/owncloud/android/issues/1419
65+ https://github.com/owncloud/android/pull/3643
66+
5867* Enhancement - First steps in Android Enterprise integration: [ #3415 ] ( https://github.com/owncloud/android/issues/3415 )
5968
6069 Two parameters (server url and server url input visibility) can be now managed via MDM. These
Original file line number Diff line number Diff line change 1+ Bugfix: Prevented signed in user in the list of users to be shared
2+
3+ Previously, user list for sharing contains signed in user,
4+ now this user is omitted to avoid errors.
5+
6+ https://github.com/owncloud/android/issues/1419
7+ https://github.com/owncloud/android/pull/3643
Original file line number Diff line number Diff line change 2424
2525package com.owncloud.android.presentation.providers.sharing
2626
27+ import android.accounts.AccountManager
2728import android.app.SearchManager
2829import android.content.ContentProvider
2930import android.content.ContentValues
@@ -43,10 +44,10 @@ import com.owncloud.android.domain.sharing.sharees.GetShareesAsyncUseCase
4344import com.owncloud.android.domain.sharing.sharees.model.OCSharee
4445import com.owncloud.android.domain.sharing.shares.model.ShareType
4546import com.owncloud.android.extensions.parseError
47+ import com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_DISPLAY_NAME
4648import org.json.JSONException
4749import org.koin.android.ext.android.inject
4850import timber.log.Timber
49- import java.util.HashMap
5051import java.util.Locale
5152
5253/* *
@@ -178,8 +179,13 @@ class UsersAndGroupsSearchProvider : ContentProvider() {
178179 val federatedShareAllowed = capabilities?.filesSharingFederationOutgoing?.isTrue ? : false
179180
180181 try {
182+ val userName = AccountUtils .getUsernameOfAccount(account.name)
183+ val fullName = AccountManager .get(context).getUserData(account, KEY_DISPLAY_NAME )
181184 while (namesIt.hasNext()) {
182185 item = namesIt.next()
186+ if (item.label == userName || item.label == fullName && item.shareType == ShareType .USER ) {
187+ continue
188+ }
183189 var userName = item.label
184190 val type = item.shareType
185191 val shareWith = item.shareWith
You can’t perform that action at this time.
0 commit comments