mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 12:42:56 -04:00
Fix foreground notification
App crashes on clicking STOP
This commit is contained in:
parent
30f44d8520
commit
37b7b5050e
@ -146,7 +146,6 @@ public class ZimHostActivity extends BaseActivity implements
|
||||
|
||||
startServerButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
|
||||
//Get the path of ZIMs user has selected
|
||||
if (!isServerStarted) {
|
||||
getSelectedBooksPath();
|
||||
@ -228,10 +227,11 @@ public class ZimHostActivity extends BaseActivity implements
|
||||
private void bindService() {
|
||||
|
||||
bindService(serviceIntent, serviceConnection, Context.BIND_AUTO_CREATE);
|
||||
bound = true;
|
||||
}
|
||||
|
||||
private void unbindService() {
|
||||
if (bound) {
|
||||
if (bound && !isServerStarted) {
|
||||
hotspotService.registerCallBack(null); // unregister
|
||||
unbindService(serviceConnection);
|
||||
bound = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user