Skip to content

Commit 68869cf

Browse files
committed
Update to v6.60
1 parent c07bec5 commit 68869cf

File tree

10 files changed

+445
-28
lines changed

10 files changed

+445
-28
lines changed

AnLinux/.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AnLinux/.idea/deploymentTargetSelector.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AnLinux/.idea/other.xml

+329
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AnLinux/app/build.gradle

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 34
54
defaultConfig {
65
applicationId "exa.lnx.a"
76
minSdkVersion 21
8-
targetSdkVersion 34
9-
versionCode 655
10-
versionName "6.55 Stable"
7+
targetSdkVersion 35
8+
compileSdk 35
9+
versionCode 660
10+
versionName "6.60 Stable"
1111
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1212
}
1313
buildTypes {
@@ -21,13 +21,14 @@ android {
2121

2222
dependencies {
2323
implementation fileTree(dir: 'libs', include: ['*.jar'])
24-
implementation 'androidx.work:work-runtime:2.9.0'
25-
implementation 'androidx.annotation:annotation:1.7.0'
26-
implementation 'androidx.appcompat:appcompat:1.6.1'
24+
implementation 'androidx.work:work-runtime:2.9.1'
25+
implementation 'androidx.annotation:annotation:1.9.0'
26+
implementation 'androidx.appcompat:appcompat:1.7.0'
2727
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
28-
implementation 'com.google.android.material:material:1.10.0'
29-
implementation 'com.google.android.gms:play-services-ads:22.5.0'
28+
implementation("com.google.android.ump:user-messaging-platform:3.0.0")
29+
implementation 'com.google.android.material:material:1.12.0'
30+
implementation 'com.google.android.gms:play-services-ads:23.4.0'
3031
testImplementation 'junit:junit:4.13.2'
31-
androidTestImplementation 'androidx.test:runner:1.5.2'
32-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
32+
androidTestImplementation 'androidx.test:runner:1.6.2'
33+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
3334
}

AnLinux/app/release/app-release.apk

434 KB
Binary file not shown.

AnLinux/app/release/output-metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 655,
15-
"versionName": "6.55 Stable",
14+
"versionCode": 660,
15+
"versionName": "6.60 Stable",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

AnLinux/app/src/main/java/exa/lnx/a/MainUI.java

+86-12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import android.view.KeyEvent;
2020

2121
import androidx.annotation.NonNull;
22+
import androidx.annotation.Nullable;
2223
import androidx.appcompat.app.ActionBarDrawerToggle;
2324
import androidx.appcompat.app.AppCompatActivity;
2425
import androidx.appcompat.widget.Toolbar;
@@ -51,13 +52,21 @@
5152
import com.google.android.gms.ads.rewarded.RewardedAd;
5253
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
5354
import com.google.android.material.navigation.NavigationView;
55+
import com.google.android.ump.ConsentForm;
56+
import com.google.android.ump.ConsentInformation;
57+
import com.google.android.ump.ConsentRequestParameters;
58+
import com.google.android.ump.FormError;
59+
import com.google.android.ump.UserMessagingPlatform;
5460

5561
import java.util.Calendar;
5662
import java.util.Date;
5763

5864
public class MainUI extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
5965

6066
Context context;
67+
private ConsentInformation consentInformation;
68+
private ConsentForm consentForm;
69+
ConsentRequestParameters params;
6170
NavigationView navigationView;
6271
DrawerLayout drawer;
6372
private long lastPressedTime;
@@ -97,17 +106,6 @@ public void onInitializationComplete(InitializationStatus initializationStatus)
97106
AdSize adSize = getAdSize();
98107
mAdView.setAdSize(adSize);
99108

100-
if(!donationInstalled() && !isVideoAdsWatched()){
101-
mAdView.loadAd(new AdRequest.Builder().build());
102-
shouldShowAds = true;
103-
}else{
104-
mAdView.pause();
105-
mAdView.destroy();
106-
mAdView.setVisibility(View.GONE);
107-
frameLayout.removeView(mAdView);
108-
shouldShowAds = false;
109-
}
110-
111109
Toolbar toolbar = findViewById(R.id.toolbar);
112110

113111
setSupportActionBar(toolbar);
@@ -124,7 +122,6 @@ public void onInitializationComplete(InitializationStatus initializationStatus)
124122
navigationView = findViewById(R.id.nav_view);
125123
navigationView.setNavigationItemSelectedListener(this);
126124

127-
128125
if(donationInstalled()){
129126
if(savedInstanceState == null) {
130127
MenuItem selected = navigationView.getMenu().findItem(R.id.dashboard);
@@ -140,6 +137,48 @@ public void onInitializationComplete(InitializationStatus initializationStatus)
140137
if(!isOreoNotified){
141138
showFirstDialog();
142139
}
140+
141+
params = new ConsentRequestParameters
142+
.Builder()
143+
.setTagForUnderAgeOfConsent(false)
144+
.build();
145+
146+
consentInformation = UserMessagingPlatform.getConsentInformation(this);
147+
148+
consentInformation.requestConsentInfoUpdate(
149+
this,
150+
params,
151+
new ConsentInformation.OnConsentInfoUpdateSuccessListener() {
152+
@Override
153+
public void onConsentInfoUpdateSuccess() {
154+
if(consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.OBTAINED || consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.NOT_REQUIRED){
155+
if(!donationInstalled() && !isVideoAdsWatched()){
156+
MobileAds.initialize(MainUI.this, new OnInitializationCompleteListener() {
157+
@Override
158+
public void onInitializationComplete(InitializationStatus initializationStatus) {}
159+
});
160+
mAdView.loadAd(new AdRequest.Builder().build());
161+
shouldShowAds = true;
162+
}else{
163+
mAdView.pause();
164+
mAdView.destroy();
165+
mAdView.setVisibility(View.GONE);
166+
frameLayout.removeView(mAdView);
167+
shouldShowAds = false;
168+
}
169+
}else if(consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.REQUIRED){
170+
loadForm();
171+
}
172+
// The consent information state was updated.
173+
// You are now ready to check if a form is available.
174+
}
175+
},
176+
new ConsentInformation.OnConsentInfoUpdateFailureListener() {
177+
@Override
178+
public void onConsentInfoUpdateFailure(FormError formError) {
179+
// Handle the error.
180+
}
181+
});
143182
}
144183
@Override
145184
public void onResume() {
@@ -911,6 +950,41 @@ private AdSize getAdSize() {
911950
// Step 3 - Get adaptive ad size and return for setting on the ad view.
912951
return AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(this, adWidth);
913952
}
953+
public void loadForm() {
954+
// Loads a consent form. Must be called on the main thread.
955+
UserMessagingPlatform.loadConsentForm(
956+
this,
957+
new UserMessagingPlatform.OnConsentFormLoadSuccessListener() {
958+
@Override
959+
public void onConsentFormLoadSuccess(ConsentForm consentForm) {
960+
MainUI.this.consentForm = consentForm;
961+
if (consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.REQUIRED) {
962+
consentForm.show(
963+
MainUI.this,
964+
new ConsentForm.OnConsentFormDismissedListener() {
965+
@Override
966+
public void onConsentFormDismissed(@Nullable FormError formError) {
967+
if (consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.OBTAINED) {
968+
// App can start requesting ads.
969+
Intent intent = getIntent();
970+
finish();
971+
startActivity(intent);
972+
}
973+
// Handle dismissal by reloading form.
974+
loadForm();
975+
}
976+
});
977+
}
978+
}
979+
},
980+
new UserMessagingPlatform.OnConsentFormLoadFailureListener() {
981+
@Override
982+
public void onConsentFormLoadFailure(FormError formError) {
983+
// Handle Error.
984+
}
985+
}
986+
);
987+
}
914988
//Temporary Code, will be back later if any error in the future
915989
/*public void notifyUserForTemporary(){
916990
final ViewGroup nullParent = null;

AnLinux/app/src/main/res/values-zh-rCN/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<string name="Launch">启动</string>
4141
<string name="ubuntu_beginner">Ubuntu (Recommended for Beginner)</string>
4242
<string name="xfce4_recommended">Xfce4 (Recommended)</string>
43-
<string name="first_warning_content">首先,非常感谢您下载AnLinux,以下是重要的内容,请仔细阅读。\n\n1. 为了让安装更为方便和简易,除了Arch Linux 和 Kali Nethunter 都是非常简易的rootfs(基础系统),这表示系统中有许多功能还未被安装/測試,您可以根据需求安装他们,但其不稳定性需要由使用者承担。\n\n2. 所有安装的系统都在此目录: /data/data/com.termux/files/home ,请在安装功能之前确认您的设备有足够的空间,同时不要抱怨应用占用了你的空间,因为一切都是由您在控制。\n\n3. 有些系统会因为您的设备架构关系而无使用。\n\n4. 当前,所有除了mips以外的设备都能运行此应用,如果您遇到类似Proot signal 6, or function not implemented的问题,请至应用内的补丁功能使用SECCOMP补丁。\n\n5. 千万不要同时安装两个不同的桌面或同时间安装桌面和窗口管理器,如果您要安装其他的桌面,请先重新安装Linux系统。要完成此操作,请先使用 “删除系统” 功能, 并从仪表板进行安装。\n\n6. 请不要回报关于 vncserver-start: command not found 的问题, 这不是bug,这个问题的出现主要是因为您没有完全根据指示操作,或是网络问题导致安装包无法下载。\n\n\n感谢您的阅读,祝您有个快乐的一天 :)</string>
43+
<string name="first_warning_content">首先,非常感谢您下载AnLinux,以下是重要的内容,请仔细阅读。往下滑以阅读完整内容。\n\n1. 为了让安装更为方便和简易,除了Arch Linux 和 Kali Nethunter 都是非常简易的rootfs(基础系统),这表示系统中有许多功能还未被安装/測試,您可以根据需求安装他们,但其不稳定性需要由使用者承担。\n\n2. 所有安装的系统都在此目录: /data/data/com.termux/files/home ,请在安装功能之前确认您的设备有足够的空间,同时不要抱怨应用占用了你的空间,因为一切都是由您在控制。\n\n3. 有些系统会因为您的设备架构关系而无使用。\n\n4. 当前,所有除了mips以外的设备都能运行此应用,如果您遇到类似Proot signal 6, or function not implemented的问题,请至应用内的补丁功能使用SECCOMP补丁。\n\n5. 千万不要同时安装两个不同的桌面或同时间安装桌面和窗口管理器,如果您要安装其他的桌面,请先重新安装Linux系统。要完成此操作,请先使用 “删除系统” 功能, 并从仪表板进行安装。\n\n6. 请不要回报关于 vncserver-start: command not found 的问题, 这不是bug,这个问题的出现主要是因为您没有完全根据指示操作,或是网络问题导致安装包无法下载。\n\n\n感谢您的阅读,祝您有个快乐的一天 :)</string>
4444
<string name="i_understand">我了解</string>
4545
<string name="step2_cd">第二步:请先完成上一个选项</string>
4646
<string name="step3_cd">第三步:请先完成上一个选项</string>

AnLinux/app/src/main/res/values-zh-rTW/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<string name="Launch">啟動</string>
4141
<string name="ubuntu_beginner">Ubuntu (推薦給初學者)</string>
4242
<string name="xfce4_recommended">Xfce4 (推薦)</string>
43-
<string name="first_warning_content">首先,非常感謝您下載AnLinux,以下是重要的內容,請仔細閱讀。 \n\n1. 為了讓安裝更為方便和簡易,除了Arch Linux 和Kali Nethunter 都是非常簡易的rootfs(基礎系統),這表示系統中有許多功能還未被安裝/測試,您可以根據需求安裝他們,但其不穩定性需要由使用者承擔。 \n\n2. 所有安裝的系統都在此目錄: /data/data/com.termux/files/home ,請在安裝功能之前確認您的設備有足夠的空間,同時不要抱怨應用佔用了你的空間,因為一切都是由您在控制。 \n\n3. 有些系統會因為您的設備架構關係而無使用。 \n\n4. 當前,所有除了mips以外的設備都能運行此應用,如果您遇到類似Proot signal 6, or function not implemented的問題,請至應用內的補丁功能使用SECCOMP補丁。 \n\n5. 千萬不要同時安裝兩個不同的桌面或同時間安裝桌面和窗口管理器,如果您要安裝其他的桌面,請先重新安裝Linux系統。要完成此操作,請先使用 “刪除系統” 功能, 並從儀表板進行安裝。\n\n6. 請不要回報關於 vncserver-start: command not found 的問題, 這不是bug,這個問題的出現主要是因為您沒有完全根據指示操作,或是網絡問題導致安裝包無法下載。\n\n\n感謝您的閱讀,祝您有個快樂的一天 :)</string>
43+
<string name="first_warning_content">首先,非常感謝您下載AnLinux,以下是重要的內容,請仔細閱讀。往下滑以閱讀完整內容。\n\n1. 為了讓安裝更為方便和簡易,除了Arch Linux 和Kali Nethunter 都是非常簡易的rootfs(基礎系統),這表示系統中有許多功能還未被安裝/測試,您可以根據需求安裝他們,但其不穩定性需要由使用者承擔。 \n\n2. 所有安裝的系統都在此目錄: /data/data/com.termux/files/home ,請在安裝功能之前確認您的設備有足夠的空間,同時不要抱怨應用佔用了你的空間,因為一切都是由您在控制。 \n\n3. 有些系統會因為您的設備架構關係而無使用。 \n\n4. 當前,所有除了mips以外的設備都能運行此應用,如果您遇到類似Proot signal 6, or function not implemented的問題,請至應用內的補丁功能使用SECCOMP補丁。 \n\n5. 千萬不要同時安裝兩個不同的桌面或同時間安裝桌面和窗口管理器,如果您要安裝其他的桌面,請先重新安裝Linux系統。要完成此操作,請先使用 “刪除系統” 功能, 並從儀表板進行安裝。\n\n6. 請不要回報關於 vncserver-start: command not found 的問題, 這不是bug,這個問題的出現主要是因為您沒有完全根據指示操作,或是網絡問題導致安裝包無法下載。\n\n\n感謝您的閱讀,祝您有個快樂的一天 :)</string>
4444
<string name="i_understand">我了解</string>
4545
<string name="step2_cd">第二步:請先完成上一個選項</string>
4646
<string name="step3_cd">第三步:請先完成上一個選項</string>

AnLinux/app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<string name="Launch">Launch</string>
4242
<string name="ubuntu_beginner">Ubuntu (Recommended for Beginner)</string>
4343
<string name="xfce4_recommended">Xfce4 (Recommended)</string>
44-
<string name="first_warning_content">First of all, thanks for downloading AnLinux, below are some important parts, please read carefully.\n\n1. To keep the distro small and light weight for easy install, most distro except Arch Linux and Kali Nethunter are minimal rootfs, which means most package are not installed yet, you could install them according to your need, and stop asking if the distro is faked.\n\n2. All distro are installed in this directory: /data/data/com.termux/files/home , please make sure that you have enough space before installing package and don\'t blame the app for occupying your device space because you are the one controlling it.\n\n3. Some distro may not available due to your device architecture.\n\n4. Currently, all device except mips based will work, if you encountered any error such as Proot signal 6, or function not implemented, just go to the Patches feature in app and apply SECCOMP patch.\n\n5. NEVER install two Desktop Environment or Desktop Environment alongside Window Manager on a same distro, if you want to install another Desktop Environment or Window Manager, please reinstall the distro first. To do this, use "Uninstall" feature first, then reinstall it from Dashboard.\n\n6. Please DO NOT report bugs about vncserver-start: command not found, there are no bug in the script and the reason this occur is either user didn\'t follow the instruction correctly or user\'s network error cause the package failed to download.\n\n\nThanks for reading, have a nice day :)</string>
44+
<string name="first_warning_content">First of all, thanks for downloading AnLinux, below are some important parts, please read carefully. Scroll down to read the full content.\n\n1. To keep the distro small and light weight for easy install, most distro except Arch Linux and Kali Nethunter are minimal rootfs, which means most package are not installed yet, you could install them according to your need, and stop asking if the distro is faked.\n\n2. All distro are installed in this directory: /data/data/com.termux/files/home , please make sure that you have enough space before installing package and don\'t blame the app for occupying your device space because you are the one controlling it.\n\n3. Some distro may not available due to your device architecture.\n\n4. Currently, all device except mips based will work, if you encountered any error such as Proot signal 6, or function not implemented, just go to the Patches feature in app and apply SECCOMP patch.\n\n5. NEVER install two Desktop Environment or Desktop Environment alongside Window Manager on a same distro, if you want to install another Desktop Environment or Window Manager, please reinstall the distro first. To do this, use "Uninstall" feature first, then reinstall it from Dashboard.\n\n6. Please DO NOT report bugs about vncserver-start: command not found, there are no bug in the script and the reason this occur is either user didn\'t follow the instruction correctly or user\'s network error cause the package failed to download.\n\n\nThanks for reading, have a nice day :)</string>
4545
<string name="i_understand">I Understand</string>
4646
<string name="step2_cd">Step 2 : Please choose a distro first</string>
4747
<string name="step3_cd">Step 3 : Please choose a distro first</string>

0 commit comments

Comments
 (0)