diff --git a/app/src/basic/java/org/fdroid/fdroid/localrepo/SwapService.java b/app/src/basic/java/org/fdroid/fdroid/localrepo/SwapService.java new file mode 100644 index 000000000..534c7ac23 --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/localrepo/SwapService.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Hans-Christoph Steiner + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.localrepo; + +import android.content.Context; + +/** + * Dummy version for basic app flavor. + */ +public class SwapService { + public static void start(Context context) { + } +} diff --git a/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java b/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java index ff7d1012a..e4ea38c39 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java +++ b/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java @@ -57,6 +57,7 @@ import org.fdroid.fdroid.UpdateService; import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.data.NewRepoConfig; import org.fdroid.fdroid.localrepo.SDCardScannerService; +import org.fdroid.fdroid.localrepo.SwapService; import org.fdroid.fdroid.net.WifiStateChangeService; import org.fdroid.fdroid.views.AppDetailsActivity; import org.fdroid.fdroid.views.ManageReposActivity; @@ -250,7 +251,7 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (requestCode == REQUEST_LOCATION_PERMISSIONS) { WifiStateChangeService.start(this, null); - startActivity(new Intent(this, SwapWorkflowActivity.class)); + SwapService.start(this); } else if (requestCode == REQUEST_STORAGE_PERMISSIONS) { Toast.makeText(this, this.getString(R.string.scan_removable_storage_toast, ""),