remove support for NC12

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-01-06 15:48:12 +01:00
parent 9b79b85ff5
commit 051423cf21
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
6 changed files with 8 additions and 23 deletions

View file

@ -101,9 +101,6 @@ public interface UserAccountManager extends CurrentAccountProvider {
@NonNull
OwnCloudVersion getServerVersion(Account account);
@Deprecated
boolean isSearchSupported(@Nullable Account account);
/**
* Check if user's account supports media streaming. This is a property of server where user has his account.
*

View file

@ -306,11 +306,6 @@ public class UserAccountManagerImpl implements UserAccountManager {
return serverVersion;
}
@Override
public boolean isSearchSupported(Account account) {
return account != null && getServerVersion(account).isSearchSupported();
}
@Override
public boolean isMediaStreamingSupported(Account account) {
return account != null && getServerVersion(account).isMediaStreamingSupported();

View file

@ -122,8 +122,8 @@ import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFER
*/
public class MainApp extends MultiDexApplication implements HasAndroidInjector {
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_13;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_12;
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_15;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_13;
private static final String TAG = MainApp.class.getSimpleName();
public static final String DOT = ".";

View file

@ -1307,7 +1307,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
DisplayUtils.showServerOutdatedSnackbar(this, Snackbar.LENGTH_INDEFINITE);
}
webViewLoginMethod = mServerInfo.mVersion.isWebLoginSupported() && !forceOldLoginMethod;
webViewLoginMethod = !forceOldLoginMethod;
if (webViewUser != null && !webViewUser.isEmpty() &&
webViewPassword != null && !webViewPassword.isEmpty()) {

View file

@ -371,9 +371,7 @@ public abstract class DrawerActivity extends ToolbarActivity
getContentResolver());
OCCapability capability = storageManager.getCapability(user.getAccountName());
boolean hasSearchSupport = user.getServer().getVersion().isSearchSupported();
DrawerMenuUtil.filterSearchMenuItems(menu, user.toPlatformAccount(), getResources(), hasSearchSupport);
DrawerMenuUtil.filterSearchMenuItems(menu, user.toPlatformAccount(), getResources(), true);
DrawerMenuUtil.filterTrashbinMenuItem(menu, user.toPlatformAccount(), capability, accountManager);
DrawerMenuUtil.filterActivityMenuItem(menu, capability);

View file

@ -53,7 +53,6 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.nextcloud.client.account.User;
import com.nextcloud.client.account.UserAccountManager;
import com.nextcloud.client.di.Injectable;
import com.nextcloud.client.preferences.AppPreferences;
@ -305,14 +304,10 @@ public class ExtendedListFragment extends Fragment implements
handler.postDelayed(new Runnable() {
@Override
public void run() {
User user = accountManager.getUser();
if (user.getServer().getVersion().isSearchSupported()) {
EventBus.getDefault().post(new SearchEvent(query,
SearchRemoteOperation.SearchType.FILE_SEARCH, SearchEvent.UnsetType.NO_UNSET));
} else {
OCFileListAdapter fileListListAdapter = (OCFileListAdapter) adapter;
fileListListAdapter.getFilter().filter(query);
}
EventBus.getDefault().post(new SearchEvent(query,
SearchRemoteOperation.SearchType.FILE_SEARCH,
SearchEvent.UnsetType.NO_UNSET));
}
}, delay);
} else if (adapter instanceof LocalFileListAdapter) {