Make startForegroundNotificationHelper() private

This commit is contained in:
Adeel 2019-08-27 20:57:09 +05:00
parent e283f6b7c1
commit 6f13e64fee
2 changed files with 2 additions and 4 deletions

View File

@ -343,9 +343,6 @@ public class ZimHostActivity extends BaseActivity implements
} }
@Override public void onHotspotTurnedOn(@NonNull WifiConfiguration wifiConfiguration) { @Override public void onHotspotTurnedOn(@NonNull WifiConfiguration wifiConfiguration) {
hotspotService.startForegroundNotificationHelper();
alertDialogShower.show(new KiwixDialog.ShowHotspotDetails(wifiConfiguration), alertDialogShower.show(new KiwixDialog.ShowHotspotDetails(wifiConfiguration),
new Function0<Unit>() { new Function0<Unit>() {
@Override public Unit invoke() { @Override public Unit invoke() {

View File

@ -186,12 +186,13 @@ public class HotspotService extends Service implements HotspotStateListener {
zimHostCallbacks = myCallback; zimHostCallbacks = myCallback;
} }
public void startForegroundNotificationHelper() { private void startForegroundNotificationHelper() {
startForeground(HOTSPOT_NOTIFICATION_ID, startForeground(HOTSPOT_NOTIFICATION_ID,
buildForegroundNotification(getString(R.string.hotspot_running))); buildForegroundNotification(getString(R.string.hotspot_running)));
} }
@Override public void onHotspotTurnedOn(@NonNull WifiConfiguration wifiConfiguration) { @Override public void onHotspotTurnedOn(@NonNull WifiConfiguration wifiConfiguration) {
startForegroundNotificationHelper();
zimHostCallbacks.onHotspotTurnedOn(wifiConfiguration); zimHostCallbacks.onHotspotTurnedOn(wifiConfiguration);
} }