Skip to content

Commit

Permalink
FC on broadcast register
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanth committed Oct 19, 2019
1 parent fe89f7e commit f1ffe63
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
34 changes: 16 additions & 18 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
AFWall+ Changelog
==================

Version 3.2.0-BETA2
* Log service process bug
* Fix: Install notification does not clear on open
* Fix: Applying dialog issue
* Fix: kernel in the logs even whitelisted
* Fix: Statusbar notification update on firewall status
* Fix: Possible memory leaks in async
* Fix: mDNS and CLAT on core apps (Android 10)
* Fix: Additional startup leak path for supersu
* Updated libraries


Version 3.2.0-BETA1
Version 3.2.0
* Integrate basic themes (Dark/Light or Black (donate version only!)
* Fix: AFWall's Logservice stops after sometime
* Fix: Crash on LOS 16 due to permission
* Fix: Notification not getting cleared upon opening
* Fix: Tasker settings not applied bug due to crash
* Fix: Root progress showing on main screen (dismiss button added incase)
* Preferences now showing selected values
* Updated libraries
* Bug Fixes:
- AFWall's Logservice stops after sometime
- Crash on LOS 16 due to permission
- Notification not getting cleared upon opening
- Tasker settings not applied bug due to crash
- Root progress showing on main screen (dismiss button added incase)
- Log service process bug
- Applying dialog issue
- kernel in the logs even whitelisted
- Statusbar notification update on firewall status
- Possible memory leaks in async
- mDNS and CLAT on core apps (Android 10)
- Additional startup leak path for supersu


Version 3.1.0
* Performance: IPv4 & IPv6 rules applying time reduced by half
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.ukanth.ufirewall.events;

import dev.ukanth.ufirewall.log.Log;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
Expand All @@ -17,7 +18,9 @@ public RxEvent() {
}

public Disposable subscribe(@NonNull Consumer<Object> action) {
return sSubject.subscribe(action);
return sSubject.subscribe(action, throwable -> {
Log.i("AFWall", throwable.getLocalizedMessage());
});
}

public void publish(@NonNull Object message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class FirewallService extends Service {

private static final int NOTIFICATION_ID = 1;
BroadcastReceiver connectivityReciver;
BroadcastReceiver packageInstallReceiver;
BroadcastReceiver packageUninstallReceiver;
BroadcastReceiver packageReceiver;
IntentFilter filter;

@Override
Expand Down Expand Up @@ -163,32 +162,28 @@ public int onStartCommand(Intent intent, int flags, int startId) {

IntentFilter intentFilter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
intentFilter.addDataScheme("package");
packageInstallReceiver = new PackageBroadcast();
registerReceiver(packageInstallReceiver, intentFilter);
packageReceiver = new PackageBroadcast();
registerReceiver(packageReceiver, intentFilter);


intentFilter = new IntentFilter(Intent.ACTION_PACKAGE_REMOVED);
packageUninstallReceiver = new PackageBroadcast();
intentFilter.addDataScheme("package");
registerReceiver(packageUninstallReceiver, intentFilter);
registerReceiver(packageReceiver, intentFilter);

return START_STICKY;
}

@Override
public void onDestroy() {
super.onDestroy();
if (connectivityReciver != null) {
unregisterReceiver(connectivityReciver);
connectivityReciver = null;
}
if (packageInstallReceiver != null) {
unregisterReceiver(packageInstallReceiver);
packageInstallReceiver = null;
}
if (packageUninstallReceiver != null) {
unregisterReceiver(packageUninstallReceiver);
packageUninstallReceiver = null;
if (packageReceiver != null) {
unregisterReceiver(packageReceiver);
packageReceiver = null;
}
super.onDestroy();

}
}

0 comments on commit f1ffe63

Please sign in to comment.