Skip to content

Commit

Permalink
Prepare for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanth committed Apr 19, 2021
1 parent de670cf commit cd8648d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 35 deletions.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
AFWall+ Changelog
==================

Version 3.5.1-BETA
Version 3.5.1
* Feature: Cloning of profiles
* Bug: PrivateDNS changes on boot
* Bug: Log target missing on few scenarios
* Bug: Import/Export rules missing on A11


Version 3.5.0
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
//applicationId "dev.ukanth.ufirewall.donate"
minSdkVersion 21
targetSdkVersion 30
versionCode 20210415
versionName "3.5.1-BETA"
versionCode 20210419
versionName "3.5.1"
//buildConfigField 'boolean', 'DONATE', 'true'
}

Expand Down
60 changes: 30 additions & 30 deletions app/src/main/java/dev/ukanth/ufirewall/activity/LogActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,43 +81,43 @@ protected void onCreate(Bundle savedInstanceState) {
initTheme();
setContentView(R.layout.log_view);

Toolbar toolbar = findViewById(R.id.rule_toolbar);
setTitle(getString(R.string.showlog_title));
toolbar.setNavigationOnClickListener(v -> finish());

setSupportActionBar(toolbar);

// Load partially transparent black background
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

Bundle bundle = getIntent().getExtras();
if(bundle != null) {
Object data = bundle.get("validate");
if(data != null){
String check = (String) data;
if(check.equals("yes")) {
new SecurityUtil(LogActivity.this).passCheck();
}
Toolbar toolbar = findViewById(R.id.rule_toolbar);
setTitle(getString(R.string.showlog_title));
toolbar.setNavigationOnClickListener(v -> finish());

setSupportActionBar(toolbar);

// Load partially transparent black background
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

Bundle bundle = getIntent().getExtras();
if(bundle != null) {
Object data = bundle.get("validate");
if(data != null){
String check = (String) data;
if(check.equals("yes")) {
new SecurityUtil(LogActivity.this).passCheck();
}
}
}

mSwipeLayout = findViewById(R.id.swipeContainer);
mSwipeLayout.setOnRefreshListener(this);
mSwipeLayout = findViewById(R.id.swipeContainer);
mSwipeLayout.setOnRefreshListener(this);

recyclerView = findViewById(R.id.recyclerview);
emptyView = findViewById(R.id.empty_view);
recyclerView = findViewById(R.id.recyclerview);
emptyView = findViewById(R.id.empty_view);

initializeRecyclerView(getApplicationContext());
initializeRecyclerView(getApplicationContext());

if(G.enableLogService()) {
(new CollectLog()).setContext(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
if(G.enableLogService()) {
(new CollectLog()).setContext(this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

} else {
recyclerView.setVisibility(View.GONE);
mSwipeLayout.setVisibility(View.GONE);
emptyView.setVisibility(View.VISIBLE);
}
} else {
recyclerView.setVisibility(View.GONE);
mSwipeLayout.setVisibility(View.GONE);
emptyView.setVisibility(View.VISIBLE);
}
}

private void initTheme() {
Expand Down
15 changes: 13 additions & 2 deletions app/src/main/java/dev/ukanth/ufirewall/service/LogService.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

import com.raizlabs.android.dbflow.config.FlowConfig;
import com.raizlabs.android.dbflow.config.FlowManager;
import com.raizlabs.android.dbflow.sql.language.SQLite;
import com.topjohnwu.superuser.CallbackList;
import com.topjohnwu.superuser.Shell;

Expand All @@ -86,6 +87,8 @@
import dev.ukanth.ufirewall.log.LogData;
import dev.ukanth.ufirewall.log.LogDatabase;
import dev.ukanth.ufirewall.log.LogInfo;
import dev.ukanth.ufirewall.log.LogPreference;
import dev.ukanth.ufirewall.log.LogPreference_Table;
import dev.ukanth.ufirewall.util.G;

import static dev.ukanth.ufirewall.util.G.ctx;
Expand Down Expand Up @@ -281,8 +284,6 @@ private void createNotification() {
manager.createNotificationChannel(notificationChannel);
}



Intent appIntent = new Intent(ctx, LogActivity.class);
appIntent.setAction(Intent.ACTION_MAIN);
appIntent.addCategory(Intent.CATEGORY_LAUNCHER);
Expand Down Expand Up @@ -328,6 +329,16 @@ private void storeLogInfo(String line, Context context) {
if(event.logInfo != null) {
store(event.logInfo, event.ctx);
showNotification(event.logInfo);
/*try {
LogPreference logPreference = SQLite.select()
.from(LogPreference.class)
.where(LogPreference_Table.uid.eq(event.logInfo.uid)).querySingle();
if(logPreference!=null && !logPreference.isDisable()) {
showNotification(event.logInfo);
} }
catch (Exception e) {
showNotification(event.logInfo);
}*/
}
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
Expand Down

0 comments on commit cd8648d

Please sign in to comment.