Skip to content

Commit

Permalink
[App] Added changelog, prepare for v2.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
MuntashirAkon committed Jul 22, 2020
1 parent 77de47e commit e210a15
Show file tree
Hide file tree
Showing 14 changed files with 307 additions and 7 deletions.
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">
<activity
android:name=".activities.OneClickOpsActivity"
android:exported="false"
android:label="@string/one_click_ops" />
<activity
android:name=".activities.RunningAppsActivity"
android:exported="false"
Expand Down
83 changes: 83 additions & 0 deletions app/src/main/assets/changelog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<h5>v2.5.9 (315):</h5>
<ul>
<li>&nbsp;<font color="#09868B">[Feature]</font> Merged App Info as a single tab in App Details</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added option to reset all app ops</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added option to revoke all dangerous app ops/permissions</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Highlight trackers in the component tabs</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added option to save manifest and class dump</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added the ability to grant/revoke development permissions</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added sorting options for components, app ops and uses permissions tabs</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added sort by wifi usage in the App Usage window</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added launch button in the App Info tab</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added never ask option to usage status prompt</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added long click to select apps in the main window</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added changelog within the app</li>
<li>&nbsp;<font color="red">[Fix]</font> Click to select apps during selection mode</li>
<li>&nbsp;<font color="red">[Fix]</font> Improved component blocker</li>
<li>&nbsp;<font color="red">[Fix]</font> Improved manifest loading for large apps</li>
<li>&nbsp;<font color="red">[Fix]</font> Improved tab loading performance</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed app ops checking and custom app ops for some devices</li>
<li>&nbsp;<font color="red">[Fix]</font> Disabled activity opening for disabled activities</li>
<li>&nbsp;<font color="red">[Fix]</font> Get real activity name for activities that use activity-alias</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed background colors</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed crashing when loading the services tab for non-root users</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed back button for class viewer which was not working</li>
<li>&nbsp;<font color="red">[Fix]</font> Changed block icon's colour to accent colour</li>
<li>&nbsp;<font color="red">[Fix]</font> Removed translation until the app is complete</li>
<li>&nbsp;<font color="red">[Fix]</font> Made links in the credit section clickable</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed various memory leaks</li>
</ul><br/>

<h5>v2.5.8 (289):</h5>
<ul>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added import/export capabilities for blocking rules</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added ability to select themes (night/day)</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added mode, duration, accept time, reject time for app ops</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Highlight running services</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Highlight disabled components not disabled within App Manager</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added swipe to refresh in the App Usage window</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added screen time percentage with indicator</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Separate instructions and about pages with fullscreen dialog for both</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Rounded overflow menu (still incomplete)</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed various device/SDK specific app ops issues</li>
<li>&nbsp;<font color="red">[Fix]</font> Stability improvements of the entire apps</li>
<li>&nbsp;<font color="red">[Fix]</font> Added <tt>ACCESS_NETWORK_STATE</tt> permission to support older operating systems</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed deleting all IFW rules when selecting apply global rules</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed various search issues</li>
</ul><br/>

<h5>v2.5.7 (265):</h5>
<ul>
<li>&nbsp;<font color="#09868B">[Feature]</font> Initial support for ADB over TCP (port 5555) for non-root users</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed importing rules from Watt and Blocker</li>
<li>&nbsp;<font color="red">[Fix]</font> Display Aurora Droid in App Info window as a first priority over F-Droid</li>
<li>&nbsp;<font color="red">[Fix]</font> Improved performance for component blocking</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed app op mode detection issue</li>
</ul>
<p>
<b>For root users:</b> If you've skipped v2.5.6, you may need to apply all rules globally in Settings in order for them to work.
</p><br/>

<h5>v2.5.6 (233):</h5>
<ul>
<li>&nbsp;<font color="#09868B">[Feature]</font> Batch operations in the main window: clear app data, disable run in background, disable/kill/uninstall apps (click on the app icon to select)</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Full support of Blocker's exported files which was broken due to a bug on Blocker app</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Reimplementation of blocking activities, receivers, services and providers</li>
<li>&nbsp;<font color="red">[Fix]</font> Removed ConstraintLayout dependency therefore a potential decrease in app size</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed duplicate app usage warning in the App Info window</li>
<li>&nbsp;<font color="red">[Fix]</font> Fixed crash when an app icon is not found in App Details window</li>
</ul>
<p>
<b>Note for root users:</b> In order to ensure that the previous blocking rules are preserved with the new blocking implementation, this update reads from the previous rules consequently increasing the loading time in the main window. This feature will be removed in the next release but can still be simulated by applying global rules in settings.
</p><br/>

<h5>v2.5.5 (215):</h5>
<ul>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added running apps/process viewer (requires root)</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added usage details viewer</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Added apk updater and aurora store support</li>
<li>&nbsp;<font color="#09868B">[Feature]</font> Save modified values of app ops and permissions to the disk (on progress)</li>
<li>&nbsp;<font color="red">[Fix]</font> Uninstall support for non-root users</li>
<li>&nbsp;<font color="red">[Fix]</font> Restructure app usage</li>
<li>&nbsp;<font color="red">[Fix]</font> Added more clarity as well as improve performance in the app details window</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.format.Formatter;
import android.text.style.RelativeSizeSpan;
Expand Down Expand Up @@ -68,10 +69,12 @@
import androidx.appcompat.widget.SearchView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.text.HtmlCompat;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import io.github.muntashirakon.AppManager.BuildConfig;
import io.github.muntashirakon.AppManager.MainLoader;
import io.github.muntashirakon.AppManager.R;
import io.github.muntashirakon.AppManager.adb.AdbShell;
Expand Down Expand Up @@ -214,6 +217,9 @@ protected void onCreate(Bundle savedInstanceState) {
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(mAdapter);

checkFirstRun();
checkAppUpdate();

mBatchOpsManager = new BatchOpsManager(this);

Menu menu = mBottomAppBar.getMenu();
Expand Down Expand Up @@ -396,6 +402,10 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
Intent usageIntent = new Intent(this, AppUsageActivity.class);
startActivity(usageIntent);
return true;
case R.id.action_one_click_ops:
Intent onClickOpsIntent = new Intent(this, OneClickOpsActivity.class);
startActivity(onClickOpsIntent);
return true;
case R.id.action_apk_updater:
try {
if(!getPackageManager().getApplicationInfo(PACKAGE_NAME_APK_UPDATER, 0).enabled)
Expand Down Expand Up @@ -503,6 +513,38 @@ protected void onStart() {
}
}

private void checkFirstRun() {
if (Utils.isAppInstalled()) {
new MaterialAlertDialogBuilder(this, R.style.AppTheme_AlertDialog)
.setTitle(R.string.instructions)
.setView(R.layout.dialog_instructions)
.setNegativeButton(android.R.string.ok, null)
.show();
AppPref.getInstance().setPref(AppPref.PrefKey.PREF_LAST_VERSION_CODE_LONG, (long) BuildConfig.VERSION_CODE);
}
}

private void checkAppUpdate() {
if (Utils.isAppUpdated()) {
new Thread(() -> {
final Spanned spannedChangelog = HtmlCompat.fromHtml(Utils.getContentFromAssets(this, "changelog.html"), HtmlCompat.FROM_HTML_MODE_COMPACT);
runOnUiThread(() ->
new MaterialAlertDialogBuilder(this, R.style.AppTheme_AlertDialog)
.setTitle(R.string.changelog)
.setMessage(spannedChangelog)
.setNegativeButton(android.R.string.ok, null)
.setNeutralButton(R.string.instructions, (dialog, which) -> {
new FullscreenDialog(this)
.setTitle(R.string.instructions)
.setView(R.layout.dialog_instructions)
.show();
})
.show());
}).start();
AppPref.getInstance().setPref(AppPref.PrefKey.PREF_LAST_VERSION_CODE_LONG, (long) BuildConfig.VERSION_CODE);
}
}

private void handleSelection() {
if (mPackageNames.size() == 0) {
mBottomAppBar.setVisibility(View.GONE);
Expand Down Expand Up @@ -657,6 +699,8 @@ static class MainRecyclerAdapter extends RecyclerView.Adapter<MainRecyclerAdapte
private static int mColorTransparent;
private static int mColorSemiTransparent;
private static int mColorHighlight;
private static int mColorDisabled;
private static int mColorStopped;
private static int mColorOrange;
private static int mColorPrimary;
private static int mColorSecondary;
Expand All @@ -669,6 +713,8 @@ static class MainRecyclerAdapter extends RecyclerView.Adapter<MainRecyclerAdapte
mColorTransparent = Color.TRANSPARENT;
mColorSemiTransparent = ContextCompat.getColor(mActivity, R.color.semi_transparent);
mColorHighlight = ContextCompat.getColor(mActivity, R.color.highlight);
mColorDisabled = ContextCompat.getColor(mActivity, R.color.disabled_user);
mColorStopped = ContextCompat.getColor(mActivity, R.color.stopped);
mColorOrange = ContextCompat.getColor(mActivity, R.color.orange);
mColorPrimary = Utils.getThemeColor(mActivity, android.R.attr.textColorPrimary);
mColorSecondary = Utils.getThemeColor(mActivity, android.R.attr.textColorSecondary);
Expand Down Expand Up @@ -763,8 +809,7 @@ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
// Alternate background colors: selected > disabled > regular
if (mPackageNames.contains(info.packageName))
holder.mainView.setBackgroundColor(mColorHighlight);
else if (!info.enabled)
holder.mainView.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.disabled_user));
else if (!info.enabled) holder.mainView.setBackgroundColor(mColorDisabled);
else holder.mainView.setBackgroundColor(position % 2 == 0 ? mColorSemiTransparent : mColorTransparent);
// Add yellow star if the app is in debug mode
holder.favorite_icon.setVisibility(item.star ? View.VISIBLE : View.INVISIBLE);
Expand Down Expand Up @@ -824,22 +869,22 @@ else if (!info.enabled)
// Highlight searched query
holder.packageName.setText(Utils.getHighlightedText(info.packageName, mConstraint, mColorRed));
} else holder.packageName.setText(info.packageName);
// Set package name color to blue if the app is in stopped/force closed state
// Set package name color to dark cyan if the app is in stopped/force closed state
if ((info.flags & ApplicationInfo.FLAG_STOPPED) != 0)
holder.packageName.setTextColor(ContextCompat.getColor(mActivity, R.color.stopped));
holder.packageName.setTextColor(mColorStopped);
else holder.packageName.setTextColor(mColorSecondary);
// Set version (along with HW accelerated, debug and test only flags)
CharSequence version = holder.version.getText();
if ((info.flags & ApplicationInfo.FLAG_HARDWARE_ACCELERATED) == 0) version = "_" + version;
if ((info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) version = "debug" + version;
if ((info.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0) version = "~" + version;
holder.version.setText(version);
// Set version color to green if the app is inactive
// Set version color to dark cyan if the app is inactive
if (Build.VERSION.SDK_INT >= 23) {
UsageStatsManager mUsageStats;
mUsageStats = mActivity.getSystemService(UsageStatsManager.class);
if (mUsageStats != null && mUsageStats.isAppInactive(info.packageName))
holder.version.setTextColor(ContextCompat.getColor(mActivity, R.color.stopped));
holder.version.setTextColor(mColorStopped);
else holder.version.setTextColor(mColorSecondary);
}
// Set app type: system or user app (along with large heap, suspended, multi-arch,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package io.github.muntashirakon.AppManager.activities;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import io.github.muntashirakon.AppManager.R;
import io.github.muntashirakon.AppManager.utils.ListItemCreator;

import android.os.Bundle;
import android.view.MenuItem;

import com.google.android.material.progressindicator.ProgressIndicator;

public class OneClickOpsActivity extends AppCompatActivity {
private ListItemCreator mItemCreator;
private ProgressIndicator mProgressIndicator;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_one_click_ops);
setSupportActionBar(findViewById(R.id.toolbar));
mItemCreator = new ListItemCreator(this, R.id.container);
mProgressIndicator = findViewById(R.id.progress_linear);
setItems();
}

private void setItems() {
mItemCreator.addItemWithTitle("Not yet implemented");
mProgressIndicator.hide();
}

@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.Spanned;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
Expand All @@ -18,12 +19,14 @@
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.text.HtmlCompat;
import io.github.muntashirakon.AppManager.BuildConfig;
import io.github.muntashirakon.AppManager.R;
import io.github.muntashirakon.AppManager.storage.compontents.ComponentsBlocker;
import io.github.muntashirakon.AppManager.fragments.ImportExportDialogFragment;
import io.github.muntashirakon.AppManager.types.FullscreenDialog;
import io.github.muntashirakon.AppManager.utils.AppPref;
import io.github.muntashirakon.AppManager.utils.Utils;

public class SettingsActivity extends AppCompatActivity {
private static List<Integer> themeConst = Arrays.asList(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM, AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY, AppCompatDelegate.MODE_NIGHT_NO, AppCompatDelegate.MODE_NIGHT_YES);
Expand Down Expand Up @@ -104,6 +107,16 @@ protected void onCreate(Bundle savedInstanceState) {
"%s (%d)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
new FullscreenDialog(this).setTitle(R.string.about).setView(view).show();
});

findViewById(R.id.changelog_view).setOnClickListener(v -> new Thread(() -> {
final Spanned spannedChangelog = HtmlCompat.fromHtml(Utils.getContentFromAssets(this, "changelog.html"), HtmlCompat.FROM_HTML_MODE_COMPACT);
runOnUiThread(() ->
new MaterialAlertDialogBuilder(this, R.style.AppTheme_AlertDialog)
.setTitle(R.string.changelog)
.setMessage(spannedChangelog)
.setNegativeButton(android.R.string.ok, null)
.show());
}).start());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class AppPref {
private static final int PREF_SKIP = 5;

public enum PrefKey {
// Keep this in sync with getDefaultValue(PrefKey)
PREF_ADB_MODE_ENABLED_BOOL,
PREF_APP_THEME_INT,
PREF_ENABLE_KILL_FOR_SYSTEM_BOOL,
Expand Down
Loading

0 comments on commit e210a15

Please sign in to comment.