ensure SwapService is running first, after Location perm prompt
This commit is contained in:
parent
ec6f9cef2b
commit
df3a09dd2b
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018 Hans-Christoph Steiner <hans@eds.org>
|
||||||
|
*
|
||||||
|
* 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) {
|
||||||
|
}
|
||||||
|
}
|
@ -57,6 +57,7 @@ import org.fdroid.fdroid.UpdateService;
|
|||||||
import org.fdroid.fdroid.Utils;
|
import org.fdroid.fdroid.Utils;
|
||||||
import org.fdroid.fdroid.data.NewRepoConfig;
|
import org.fdroid.fdroid.data.NewRepoConfig;
|
||||||
import org.fdroid.fdroid.localrepo.SDCardScannerService;
|
import org.fdroid.fdroid.localrepo.SDCardScannerService;
|
||||||
|
import org.fdroid.fdroid.localrepo.SwapService;
|
||||||
import org.fdroid.fdroid.net.WifiStateChangeService;
|
import org.fdroid.fdroid.net.WifiStateChangeService;
|
||||||
import org.fdroid.fdroid.views.AppDetailsActivity;
|
import org.fdroid.fdroid.views.AppDetailsActivity;
|
||||||
import org.fdroid.fdroid.views.ManageReposActivity;
|
import org.fdroid.fdroid.views.ManageReposActivity;
|
||||||
@ -250,7 +251,7 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB
|
|||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
if (requestCode == REQUEST_LOCATION_PERMISSIONS) {
|
if (requestCode == REQUEST_LOCATION_PERMISSIONS) {
|
||||||
WifiStateChangeService.start(this, null);
|
WifiStateChangeService.start(this, null);
|
||||||
startActivity(new Intent(this, SwapWorkflowActivity.class));
|
SwapService.start(this);
|
||||||
} else if (requestCode == REQUEST_STORAGE_PERMISSIONS) {
|
} else if (requestCode == REQUEST_STORAGE_PERMISSIONS) {
|
||||||
Toast.makeText(this,
|
Toast.makeText(this,
|
||||||
this.getString(R.string.scan_removable_storage_toast, ""),
|
this.getString(R.string.scan_removable_storage_toast, ""),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user