Skip to content

Commit 5999943

Browse files
Misc: Convert play to pro flavour
Signed-off-by: sunilpaulmathew <[email protected]>
1 parent 431ce7a commit 5999943

File tree

26 files changed

+49
-712
lines changed

26 files changed

+49
-712
lines changed

app/build.gradle

+6-7
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ android {
3737

3838
flavorDimensions "release"
3939
productFlavors {
40-
play {
40+
pro {
4141
dimension "release"
42-
applicationIdSuffix '.release'
42+
applicationIdSuffix '.pro'
4343
}
4444
fdroid {
4545
dimension "release"
@@ -54,14 +54,13 @@ android {
5454
dependencies {
5555
implementation 'androidx.biometric:biometric:1.1.0'
5656
implementation 'androidx.preference:preference:1.2.0'
57-
playImplementation 'com.android.billingclient:billing:4.1.0'
5857
implementation 'com.github.ozodrukh:CircularReveal:1.3.1'
59-
implementation 'com.github.sunilpaulmathew:sCommon:8d845e6de5'
60-
implementation 'com.github.sunilpaulmathew:RootFilePicker:792443f0d8'
61-
implementation 'com.github.topjohnwu.libsu:core:3.2.1'
58+
implementation 'com.github.sunilpaulmathew:sCommon:f741dad243'
59+
implementation 'com.github.sunilpaulmathew:RootFilePicker:15245677c6'
60+
implementation 'com.github.topjohnwu.libsu:core:4.0.3'
6261
implementation "com.github.topjohnwu.libsu:io:3.1.2"
6362
implementation 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
64-
implementation 'com.google.android.material:material:1.5.0'
63+
implementation 'com.google.android.material:material:1.6.1'
6564
implementation 'com.squareup.picasso:picasso:2.71828'
6665
implementation 'org.cyanogenmod:platform.sdk:6.0'
6766
implementation project (':seekbar')

app/src/main/java/com/smartpack/kernelmanager/fragments/other/AboutFragment.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private void aboutInit(List<RecyclerViewItem> items) {
8282
DescriptionView versioninfo = new DescriptionView();
8383
versioninfo.setDrawable(getResources().getDrawable(R.drawable.ic_on_boot_notification));
8484
versioninfo.setTitle(getString(R.string.version,"").replace(": ", ""));
85-
versioninfo.setSummary((Utils.isDonated(requireActivity()) ? " Pro " : " ") + BuildConfig.VERSION_NAME);
85+
versioninfo.setSummary(((Utils.isDonated(requireActivity()) || !Utils.isFDroidFlavor(requireActivity())) ? " Pro " : " ") + BuildConfig.VERSION_NAME);
8686
versioninfo.setOnItemClickListener(item -> {
8787
Intent settings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
8888
settings.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -127,7 +127,7 @@ private void aboutInit(List<RecyclerViewItem> items) {
127127
appStore.setTitle(getString(Utils.isFDroidFlavor(requireActivity()) ? R.string.fdroid : R.string.playstore));
128128
appStore.setSummary(getString(Utils.isFDroidFlavor(requireActivity()) ? R.string.fdroid_summary : R.string.playstore_summary));
129129
appStore.setOnItemClickListener(item -> Utils.launchUrl(Utils.isFDroidFlavor(requireActivity()) ? "https://f-droid.org/packages/com.smartpack.kernelmanager" :
130-
"https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.release", requireActivity()));
130+
"https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.pro", requireActivity()));
131131

132132
DescriptionView donatetome = new DescriptionView();
133133
donatetome.setDrawable(getResources().getDrawable(R.drawable.ic_donate));
@@ -145,7 +145,7 @@ private void aboutInit(List<RecyclerViewItem> items) {
145145
shareapp.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
146146
shareapp.putExtra(Intent.EXTRA_TEXT, getString(R.string.share_app_message,BuildConfig.VERSION_NAME)
147147
+ (Utils.isFDroidFlavor(requireActivity()) ? " F-Droid: https://f-droid.org/packages/com.smartpack.kernelmanager"
148-
: " Google Play: https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.release"));
148+
: " Google Play: https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.pro"));
149149
shareapp.setType("text/plain");
150150
Intent shareIntent = Intent.createChooser(shareapp, null);
151151
startActivity(shareIntent);
@@ -157,7 +157,9 @@ private void aboutInit(List<RecyclerViewItem> items) {
157157
items.add(support);
158158
items.add(changelogs);
159159
items.add(sourcecode);
160-
items.add(donatetome);
160+
if (Utils.isFDroidFlavor(requireActivity())) {
161+
items.add(donatetome);
162+
}
161163
items.add(share);
162164
items.add(appStore);
163165
}
@@ -202,7 +204,7 @@ private void librariesInit(List<RecyclerViewItem> items) {
202204
sUtils.getDrawable(R.mipmap.ic_launcher, requireActivity()),
203205
sUtils.getDrawable(R.drawable.ic_back, requireActivity()),
204206
ViewUtils.getThemeAccentColor(requireActivity()),
205-
18, getString(R.string.app_name), "2021-2022, sunilpaulmathew",
207+
18, getString(R.string.app_name), "2022-2023, sunilpaulmathew",
206208
BuildConfig.VERSION_NAME).launchCredits(requireActivity()));
207209
credits.addItem(creditsSummary);
208210
items.add(credits);

app/src/main/java/com/smartpack/kernelmanager/fragments/tools/ScriptMangerFragment.java

-12
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import in.sunilpaulmathew.rootfilepicker.activities.FilePickerActivity;
5555
import in.sunilpaulmathew.rootfilepicker.utils.FilePicker;
5656
import in.sunilpaulmathew.sCommon.Utils.sExecutor;
57-
import in.sunilpaulmathew.sCommon.Utils.sPackageUtils;
5857

5958
/**
6059
* Created by sunilpaulmathew <[email protected]> on December 18, 2019
@@ -240,17 +239,6 @@ private void load(List<RecyclerViewItem> items) {
240239
items.add(descriptionView);
241240
}
242241
}
243-
if (items.size() == 0) {
244-
if (!sPackageUtils.isPackageInstalled("com.smartpack.scriptmanager", requireActivity())) {
245-
// Advertise Own App
246-
DescriptionView sm = new DescriptionView();
247-
sm.setDrawable(getResources().getDrawable(R.drawable.ic_playstore));
248-
sm.setSummary(getString(R.string.scripts_manager_message));
249-
sm.setFullSpan(true);
250-
sm.setOnItemClickListener(item -> Utils.launchUrl("https://play.google.com/store/apps/details?id=com.smartpack.scriptmanager", getActivity()));
251-
items.add(sm);
252-
}
253-
}
254242
}
255243

256244
@SuppressLint("StaticFieldLeak")

app/src/main/java/com/smartpack/kernelmanager/utils/Utils.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,8 @@ public class Utils {
9292

9393
private static final String TAG = Utils.class.getSimpleName();
9494

95-
public static boolean isSPDonated(Context context) {
96-
return sPackageUtils.isPackageInstalled("com.smartpack.donate", context);
97-
}
98-
9995
public static boolean isDonated(Context context) {
100-
return isSPDonated(context) || Prefs.getBoolean("support_received", false, context);
96+
return sPackageUtils.isPackageInstalled("com.smartpack.donate", context);
10197
}
10298

10399
public static boolean isFDroidFlavor(Context context) {

app/src/main/res/drawable/ic_coffee.xml

-11
This file was deleted.

app/src/main/res/drawable/ic_dinner.xml

-18
This file was deleted.

app/src/main/res/drawable/ic_heart.xml

-5
This file was deleted.

0 commit comments

Comments
 (0)