diff --git a/Changelog.md b/Changelog.md index 63bb6d32..89d61092 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/app/build.gradle b/app/build.gradle index 7b49254d..02ba8b9e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' } diff --git a/app/src/main/java/dev/ukanth/ufirewall/activity/LogActivity.java b/app/src/main/java/dev/ukanth/ufirewall/activity/LogActivity.java index f009c3fa..4822df4d 100644 --- a/app/src/main/java/dev/ukanth/ufirewall/activity/LogActivity.java +++ b/app/src/main/java/dev/ukanth/ufirewall/activity/LogActivity.java @@ -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() { diff --git a/app/src/main/java/dev/ukanth/ufirewall/service/LogService.java b/app/src/main/java/dev/ukanth/ufirewall/service/LogService.java index fa978d36..24fc2a42 100644 --- a/app/src/main/java/dev/ukanth/ufirewall/service/LogService.java +++ b/app/src/main/java/dev/ukanth/ufirewall/service/LogService.java @@ -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; @@ -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; @@ -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); @@ -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);