mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 12:03:09 -04:00
Check if mobile data is enabled for API<26
This commit is contained in:
parent
e41589af16
commit
9b04bea2b1
@ -960,7 +960,11 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
toggleHotspot();
|
toggleHotspot();
|
||||||
} else {
|
} else {
|
||||||
//TO DO: show Dialog() + within that add check mobile Data check later.
|
//TO DO: show Dialog() + within that add check mobile Data check later.
|
||||||
startHotspotDialog();
|
if (isMobileDataEnabled(this)) {
|
||||||
|
mobileDataDialog();
|
||||||
|
} else {
|
||||||
|
startHotspotDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -1138,6 +1142,7 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
|
|
||||||
builder.setPositiveButton(this.getString(R.string.yes), (dialog, id) -> disableMobileData());
|
builder.setPositiveButton(this.getString(R.string.yes), (dialog, id) -> disableMobileData());
|
||||||
builder.setNegativeButton((android.R.string.no), (dialog, id) -> {
|
builder.setNegativeButton((android.R.string.no), (dialog, id) -> {
|
||||||
|
startHotspotDialog();
|
||||||
});
|
});
|
||||||
builder.setTitle(this.getString(R.string.mobile_data_enabled));
|
builder.setTitle(this.getString(R.string.mobile_data_enabled));
|
||||||
builder.setMessage(
|
builder.setMessage(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user