Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign the app (un)install receiver #100

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
89fcbea
chore: update repositories for JCenter end-of-life
SebiderSushi Aug 21, 2022
fb2d2d2
chore: update sdk, build tools & plugins
SebiderSushi Aug 21, 2022
295ba18
chore: remove Manifest override for debug builds
SebiderSushi Oct 25, 2022
53914c3
chore: use suffixes to generate applicationIds for variants
SebiderSushi Oct 18, 2022
d8a793d
chore: add applicationIdSuffix and unique app_name for debug builds
SebiderSushi Aug 21, 2022
6562cc0
chore: take care of no longer relevant TODO items about @TargetApi(5)
SebiderSushi Aug 21, 2022
7c6f1a7
chore: remove redundant suppressions
SebiderSushi Oct 25, 2022
3419b9b
chore: request permission for uninstalling apps on api 28+
SebiderSushi Aug 21, 2022
ece83ed
chore: request permission for querying apps on api 30+
SebiderSushi Aug 21, 2022
8f680a3
chore: specify whether to export activities and receivers
SebiderSushi Aug 21, 2022
ba04d17
chore: hide "Open as Notification" on android 8 and above
SebiderSushi Oct 18, 2022
1fe72f7
chore: targetSdkVersion 32
SebiderSushi Oct 18, 2022
0112528
chore: reminders for non-localized strings
SebiderSushi Oct 25, 2022
de961aa
chore(documentation): document AppInfo.labelMode
SebiderSushi Oct 26, 2022
8d27c1c
chore(documentation): categorize AppInfo member variables
SebiderSushi Oct 26, 2022
06a2a95
fix(Open as Notification): specify the pending intent to me immutable
SebiderSushi Oct 25, 2022
9ec0e73
fix(SortByLastInstalled): change direction to newest first
SebiderSushi Aug 21, 2022
7bc01f4
fix(SortByLastInstalled): sort pinned apps to the top
SebiderSushi Aug 21, 2022
bdfcfd6
fix(LoadingDialog): properly deal with screen rotation instead of loc…
SebiderSushi Aug 21, 2022
abd6a8b
fix(AppIconCache): close the FileInputStream in getIcon()
SebiderSushi Oct 25, 2022
c33b720
fix(AppIconCache): remove log spam
SebiderSushi Oct 24, 2022
6ab1303
fix(AppInfo): calculate the alternate label from the display label
SebiderSushi Oct 24, 2022
2f8734d
fix(AppInfo): invalidate if activityInfo is null
SebiderSushi Oct 24, 2022
539b2e6
fix(AppInfo): silently handle NameNotFoundException when looking up i…
SebiderSushi Oct 23, 2022
2b0cf87
fix(AppInfo): propagate install time when merging new items
SebiderSushi Sep 7, 2022
da1be9b
fix(AppInfo): track last update time separately
SebiderSushi Sep 6, 2022
5d52576
fix(AppInfo): infer update time from apk mtime on Froyo and older
SebiderSushi Jul 2, 2019
84c6981
fix(Layout): remove extra padding at the bottom of item_icon.xml
SebiderSushi Aug 21, 2022
97f53ff
fix(translation): add missing array values and improve values-de
SebiderSushi Sep 6, 2022
38b49af
fix(strings): be more clear on what "Clear cache" does
SebiderSushi Oct 25, 2022
8b3b833
fix(strings): be more clear on what "Convert umlauts" does
SebiderSushi Oct 28, 2022
94fb3e7
fix(tests): remove unresolved imports in TheAppInfoList and TheString…
SebiderSushi Oct 25, 2022
678ae00
feat: use https in sharing links
SebiderSushi Aug 21, 2022
17c4cc0
feat: when sharing, use "[app label] - [url]"
SebiderSushi Oct 18, 2022
f8f31fc
feat: strip accents with java.text.Normalizer if available
SebiderSushi Oct 24, 2022
fcdacb7
feat: make FAST appear on the recents screen
SebiderSushi Oct 25, 2022
41272bd
feat: make Application Details appear on the recents screen
SebiderSushi Jul 1, 2019
4183db6
feat: don't dismiss the Change Label dialog when touching outside
SebiderSushi Oct 28, 2022
2d96b0e
feat: refresh an app icon if its app was updated
SebiderSushi Oct 24, 2022
65110fb
feat: keep index when changing icon resolution
SebiderSushi Oct 28, 2022
45ad130
refactor: remove unused ViewHelper.findById
SebiderSushi Oct 24, 2022
d43e3cf
refactor: remove unused DynamicAppInfoList.get*WithHash
SebiderSushi Oct 25, 2022
5bdef49
refactor: remove unused ViewHelper.hideKeyBoard and .startIntentOnClick
SebiderSushi Oct 25, 2022
5555863
refactor: remove unused class PackageListSerializer
SebiderSushi Oct 28, 2022
45b3b53
refactor: remove unused classes ActivityHelper and ContextHelper
SebiderSushi Aug 21, 2022
8bef983
refactor: move TargetStore.java to the appropriate package directory
SebiderSushi Aug 21, 2022
0923497
refactor(Layout): remove redundant nesting & Reformat Code for Title …
SebiderSushi Aug 21, 2022
8f8d81c
refactor(AppInfo): remove getAlternatePackageName
SebiderSushi Oct 24, 2022
3f3db14
refactor(AppInfo): remove setCallCount and getOverrideLabel
SebiderSushi Oct 25, 2022
6413103
refactor(AppInfo): remove duplicated accent stripping code
SebiderSushi Oct 24, 2022
b931f60
refactor(AppInfo): invert boolean isValid
SebiderSushi Oct 25, 2022
5b5b8d4
refactor(AppInfo): parse CSV with a switch statement
SebiderSushi Oct 25, 2022
b62a718
refactor(AppInfo): minor cleanup
SebiderSushi Oct 24, 2022
c01f672
wip: redesign
SebiderSushi Oct 25, 2022
43e3af7
feat: detect adaptive icon change
SebiderSushi Oct 28, 2022
ac59ace
feat: trim the icon cache after refreshing
SebiderSushi Oct 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 34 additions & 34 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'kotlin-android'

repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven { url "https://plugins.gradle.org/m2/" }
}

android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
namespace 'org.ligi.fast'
compileSdkVersion 33

defaultConfig {
versionCode 68
versionName "6.8"
// this can be 5 but for assertj this fails - only a problem for tests
// http://stackoverflow.com/questions/25753751/increase-minsdk-for-androidtest
minSdkVersion 9
targetSdkVersion 26
applicationId "org.ligi.fast"
targetSdkVersion 32
applicationId "org.ligi"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
archivesBaseName = "Fast-$versionName"
}
Expand All @@ -32,6 +32,9 @@ android {
shrinkResources true
proguardFile 'proguard-project.txt'
}
debug {
applicationIdSuffix '.debug'
}
}

flavorDimensions "market", "size"
Expand All @@ -51,12 +54,12 @@ android {

withExtras {
dimension "size"
applicationId "org.ligi.fast"
applicationIdSuffix ".fast"
}

noExtras {
dimension "size"
applicationId "org.ligi.faster"
applicationIdSuffix ".faster"
}
}

Expand All @@ -66,43 +69,40 @@ android {
variant.setIgnore(project.hasProperty("singleFlavor") && ((market != 'forGooglePlay') || (size != 'noExtras')))
}

// ugly but the best workaround I found for getting the permission for spoon screenshot writing to SD-Card
// http://stackoverflow.com/questions/25276537/how-do-i-change-android-permission-settings-when-running-tests
sourceSets {
debug {
manifest.srcFile 'src/androidTest/AndroidManifest.xml'
}
}

lintOptions {
disable "MissingTranslation"
disable "TypographyEllipsis"
disable "IconLocation"
disable "IconDensities"
disable "ContentDescription"
lint {
disable 'MissingTranslation', 'TypographyEllipsis', 'IconLocation', 'IconDensities', 'ContentDescription'
}

// needed for assertJ
packagingOptions {
exclude 'asm-license.txt'
exclude 'LICENSE'
exclude 'NOTICE'
resources {
excludes += ['asm-license.txt', 'LICENSE', 'NOTICE']
}
}
}

dependencies {
compile 'com.github.ligi:tracedroid:1.4'

androidTestCompile 'com.github.ligi:trulesk:0.21'
androidTestCompile 'com.android.support:support-annotations:26.0.2'
androidTestCompile 'com.squareup.spoon:spoon-client:1.7.1'
androidTestCompile 'com.squareup.assertj:assertj-android:1.2.0'

testCompile 'com.squareup.assertj:assertj-android:1.2.0'
testCompile 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

//TODO update raises minSdkLevel
implementation 'com.github.ligi:tracedroid:1.4'

//TODO update raises minSdkLevel and requires AndroidX
androidTestImplementation 'com.github.ligi:trulesk:0.21'
//TODO deprecated?
androidTestImplementation 'com.android.support:support-annotations:28.0.0'
//TODO deprecated?
androidTestImplementation 'com.squareup.spoon:spoon-client:1.7.1'
//TODO deprecated
androidTestImplementation 'com.squareup.assertj:assertj-android:1.2.0'

//TODO deprecated
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
//TODO migrate to v5
testImplementation 'junit:junit:4.13.2'
}

spoon {
debug = true
grantAllPermissions = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class AndroidTestMutableFastSettings implements FASTSettings {
public boolean ignoreSpace = false;
public boolean gapSearch = false;
public String theme = "light";
public String lastIconShape = "";

@Override
public boolean isLaunchSingleActivated() {
Expand Down Expand Up @@ -87,4 +88,14 @@ public int getIconResolution() {
public boolean isShowHiddenActivated() {
return false;
}

@Override
public String getLastIconShape() {
return lastIconShape;
}

@Override
public void putLastIconShape(String v) {
lastIconShape = v;
}
}
4 changes: 4 additions & 0 deletions android/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">FAST (Debug)</string>
</resources>
2 changes: 1 addition & 1 deletion android/src/forAmazon/java/org/ligi/fast/TargetStore.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ligi.fast;

public class TargetStore {
public final static String STORE_URL = "http://www.amazon.com/gp/mas/dl/android?p=";
public final static String STORE_URL = "https://www.amazon.com/gp/mas/dl/android?p=";
public final static String STORE_NAME = "Amazon Store";
public final static String STORE_PNAME = "com.amazon.venezia";
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ligi.fast;

public class TargetStore {
public final static String STORE_URL = "http://play.google.com/store/apps/details?id=";
public final static String STORE_URL = "https://play.google.com/store/apps/details?id=";
public final static String STORE_NAME = "Google Play";
public final static String STORE_PNAME = "com.android.vending";
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.ligi.fast;

public class TargetStore {
public final static String STORE_URL = "http://play.google.com/store/apps/details?id=";
public final static String STORE_URL = "https://play.google.com/store/apps/details?id=";
public final static String STORE_NAME = "Google Play";
public final static String STORE_PNAME = "com.android.vending";
}
31 changes: 16 additions & 15 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.ligi.fast">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!--
from experiments with shortcut - but dropped this feature for the feature of no needed permission
Expand All @@ -8,6 +7,19 @@

<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
-->
<!-- Required when targeting api 28 or above -->
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<!-- Required when targeting api 30 or above -->
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent>
<intent>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
</intent>
</queries>

<supports-screens
android:anyDensity="true"
Expand All @@ -31,13 +43,14 @@
<activity android:name=".ui.FASTSettingsActivity" />
<activity
android:name=".ui.LoadingDialog"
android:configChanges="orientation"
android:theme="@style/DialogTheme" />
<activity
android:name=".ui.SearchActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:stateNotNeeded="true"
android:excludeFromRecents="true"
android:configChanges="orientation">

<meta-data
Expand Down Expand Up @@ -67,18 +80,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<receiver android:name=".background.AppInstallOrRemoveReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_INSTALL" />
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
</application>

</manifest>
69 changes: 0 additions & 69 deletions android/src/main/java/org/ligi/axt/helpers/ActivityHelper.java

This file was deleted.

42 changes: 0 additions & 42 deletions android/src/main/java/org/ligi/axt/helpers/ContextHelper.java

This file was deleted.

25 changes: 0 additions & 25 deletions android/src/main/java/org/ligi/axt/helpers/ViewHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
Expand All @@ -15,19 +14,6 @@ public ViewHelper(View view) {
this.view = view;
}

public <T extends View> T findById(int id) {
return (T) view.findViewById(id);
}

public void hideKeyBoard() {
InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} else {
Log.w("AndroidHelper", "could not hide Keyboard as INPUT_METHOD_SERVICE is not available");
}
}

public void showKeyboard() {
InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
Expand All @@ -36,15 +22,4 @@ public void showKeyboard() {
Log.w("AndroidHelper", "could not show Keyboard as INPUT_METHOD_SERVICE is not available");
}
}

public void startIntentOnClick(final Intent intent) {
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
v.getContext().startActivity(intent);
}
});
}


}
Loading