Skip to content

Commit

Permalink
Update to v6.60
Browse files Browse the repository at this point in the history
  • Loading branch information
exalab999 committed Oct 25, 2024
1 parent c07bec5 commit 68869cf
Show file tree
Hide file tree
Showing 10 changed files with 445 additions and 28 deletions.
3 changes: 3 additions & 0 deletions AnLinux/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions AnLinux/.idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

329 changes: 329 additions & 0 deletions AnLinux/.idea/other.xml

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions AnLinux/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 34
defaultConfig {
applicationId "exa.lnx.a"
minSdkVersion 21
targetSdkVersion 34
versionCode 655
versionName "6.55 Stable"
targetSdkVersion 35
compileSdk 35
versionCode 660
versionName "6.60 Stable"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -21,13 +21,14 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.work:work-runtime:2.9.0'
implementation 'androidx.annotation:annotation:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.work:work-runtime:2.9.1'
implementation 'androidx.annotation:annotation:1.9.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.material:material:1.10.0'
implementation 'com.google.android.gms:play-services-ads:22.5.0'
implementation("com.google.android.ump:user-messaging-platform:3.0.0")
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.gms:play-services-ads:23.4.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
Binary file modified AnLinux/app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions AnLinux/app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 655,
"versionName": "6.55 Stable",
"versionCode": 660,
"versionName": "6.60 Stable",
"outputFile": "app-release.apk"
}
],
Expand Down
98 changes: 86 additions & 12 deletions AnLinux/app/src/main/java/exa/lnx/a/MainUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.view.KeyEvent;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
Expand Down Expand Up @@ -51,13 +52,21 @@
import com.google.android.gms.ads.rewarded.RewardedAd;
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
import com.google.android.material.navigation.NavigationView;
import com.google.android.ump.ConsentForm;
import com.google.android.ump.ConsentInformation;
import com.google.android.ump.ConsentRequestParameters;
import com.google.android.ump.FormError;
import com.google.android.ump.UserMessagingPlatform;

import java.util.Calendar;
import java.util.Date;

public class MainUI extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {

Context context;
private ConsentInformation consentInformation;
private ConsentForm consentForm;
ConsentRequestParameters params;
NavigationView navigationView;
DrawerLayout drawer;
private long lastPressedTime;
Expand Down Expand Up @@ -97,17 +106,6 @@ public void onInitializationComplete(InitializationStatus initializationStatus)
AdSize adSize = getAdSize();
mAdView.setAdSize(adSize);

if(!donationInstalled() && !isVideoAdsWatched()){
mAdView.loadAd(new AdRequest.Builder().build());
shouldShowAds = true;
}else{
mAdView.pause();
mAdView.destroy();
mAdView.setVisibility(View.GONE);
frameLayout.removeView(mAdView);
shouldShowAds = false;
}

Toolbar toolbar = findViewById(R.id.toolbar);

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


if(donationInstalled()){
if(savedInstanceState == null) {
MenuItem selected = navigationView.getMenu().findItem(R.id.dashboard);
Expand All @@ -140,6 +137,48 @@ public void onInitializationComplete(InitializationStatus initializationStatus)
if(!isOreoNotified){
showFirstDialog();
}

params = new ConsentRequestParameters
.Builder()
.setTagForUnderAgeOfConsent(false)
.build();

consentInformation = UserMessagingPlatform.getConsentInformation(this);

consentInformation.requestConsentInfoUpdate(
this,
params,
new ConsentInformation.OnConsentInfoUpdateSuccessListener() {
@Override
public void onConsentInfoUpdateSuccess() {
if(consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.OBTAINED || consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.NOT_REQUIRED){
if(!donationInstalled() && !isVideoAdsWatched()){
MobileAds.initialize(MainUI.this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {}
});
mAdView.loadAd(new AdRequest.Builder().build());
shouldShowAds = true;
}else{
mAdView.pause();
mAdView.destroy();
mAdView.setVisibility(View.GONE);
frameLayout.removeView(mAdView);
shouldShowAds = false;
}
}else if(consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.REQUIRED){
loadForm();
}
// The consent information state was updated.
// You are now ready to check if a form is available.
}
},
new ConsentInformation.OnConsentInfoUpdateFailureListener() {
@Override
public void onConsentInfoUpdateFailure(FormError formError) {
// Handle the error.
}
});
}
@Override
public void onResume() {
Expand Down Expand Up @@ -911,6 +950,41 @@ private AdSize getAdSize() {
// Step 3 - Get adaptive ad size and return for setting on the ad view.
return AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(this, adWidth);
}
public void loadForm() {
// Loads a consent form. Must be called on the main thread.
UserMessagingPlatform.loadConsentForm(
this,
new UserMessagingPlatform.OnConsentFormLoadSuccessListener() {
@Override
public void onConsentFormLoadSuccess(ConsentForm consentForm) {
MainUI.this.consentForm = consentForm;
if (consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.REQUIRED) {
consentForm.show(
MainUI.this,
new ConsentForm.OnConsentFormDismissedListener() {
@Override
public void onConsentFormDismissed(@Nullable FormError formError) {
if (consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.OBTAINED) {
// App can start requesting ads.
Intent intent = getIntent();
finish();
startActivity(intent);
}
// Handle dismissal by reloading form.
loadForm();
}
});
}
}
},
new UserMessagingPlatform.OnConsentFormLoadFailureListener() {
@Override
public void onConsentFormLoadFailure(FormError formError) {
// Handle Error.
}
}
);
}
//Temporary Code, will be back later if any error in the future
/*public void notifyUserForTemporary(){
final ViewGroup nullParent = null;
Expand Down
2 changes: 1 addition & 1 deletion AnLinux/app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<string name="Launch">启动</string>
<string name="ubuntu_beginner">Ubuntu (Recommended for Beginner)</string>
<string name="xfce4_recommended">Xfce4 (Recommended)</string>
<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>
<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>
<string name="i_understand">我了解</string>
<string name="step2_cd">第二步:请先完成上一个选项</string>
<string name="step3_cd">第三步:请先完成上一个选项</string>
Expand Down
2 changes: 1 addition & 1 deletion AnLinux/app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<string name="Launch">啟動</string>
<string name="ubuntu_beginner">Ubuntu (推薦給初學者)</string>
<string name="xfce4_recommended">Xfce4 (推薦)</string>
<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>
<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>
<string name="i_understand">我了解</string>
<string name="step2_cd">第二步:請先完成上一個選項</string>
<string name="step3_cd">第三步:請先完成上一個選項</string>
Expand Down
2 changes: 1 addition & 1 deletion AnLinux/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<string name="Launch">Launch</string>
<string name="ubuntu_beginner">Ubuntu (Recommended for Beginner)</string>
<string name="xfce4_recommended">Xfce4 (Recommended)</string>
<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>
<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>
<string name="i_understand">I Understand</string>
<string name="step2_cd">Step 2 : Please choose a distro first</string>
<string name="step3_cd">Step 3 : Please choose a distro first</string>
Expand Down

0 comments on commit 68869cf

Please sign in to comment.