mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-01-11 23:49:34 -05:00
Small changes
- Another fix - Deblobber tweaks - Patch from GrapheneOS - Cherrypick Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
5f6a176e8c
commit
eff7a69bed
@ -57,6 +57,9 @@ nojit
|
||||
9 https://github.com/GrapheneOS/platform_build/commit/5b9927197e63593b9220d1a9280021252ef205e9
|
||||
9 https://github.com/GrapheneOS/platform_build/commit/e36c7aefaa78a1ed5b94c7f51d29277008eea232
|
||||
|
||||
[implemented] disable apps
|
||||
13 https://github.com/GrapheneOS/platform_packages_apps_Settings/commit/2c9112d7e9137d91694bf1478f2558fdb898cad8
|
||||
|
||||
[implemented] doze jobscheduler fix
|
||||
13 https://github.com/GrapheneOS/platform_frameworks_base/commit/e6aebb654559376b4af70006b0098af53d90187
|
||||
12 https://github.com/GrapheneOS/platform_frameworks_base/commit/4f12bdfdda5cd0d538790c05ee784e5fb5e1e2fb
|
||||
|
@ -0,0 +1,98 @@
|
||||
From 2c9112d7e9137d91694bf1478f2558fdb898cad8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Sun, 17 Apr 2022 18:00:53 +0300
|
||||
Subject: [PATCH] add an ability to disable non-system apps from the "App info"
|
||||
screen
|
||||
|
||||
---
|
||||
.../AppButtonsPreferenceController.java | 41 ++++++++++++++++++-
|
||||
1 file changed, 39 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
|
||||
index 1b270d63b4d..77d264772c5 100644
|
||||
--- a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
|
||||
+++ b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
|
||||
@@ -208,6 +208,15 @@ public void onDestroy() {
|
||||
}
|
||||
|
||||
private class UninstallAndDisableButtonListener implements View.OnClickListener {
|
||||
+ private boolean mChangeEnabledStateOfUserApp;
|
||||
+
|
||||
+ UninstallAndDisableButtonListener() {
|
||||
+ this(false);
|
||||
+ }
|
||||
+
|
||||
+ UninstallAndDisableButtonListener(boolean changeEnabledStateOfUserApp) {
|
||||
+ mChangeEnabledStateOfUserApp = changeEnabledStateOfUserApp;
|
||||
+ }
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -239,8 +248,13 @@ public void onClick(View v) {
|
||||
mUserId);
|
||||
if (admin != null && !uninstallBlockedBySystem) {
|
||||
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mActivity, admin);
|
||||
- } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
|
||||
+ } else if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0 || mChangeEnabledStateOfUserApp) {
|
||||
if (mAppEntry.info.enabled && !isDisabledUntilUsed()) {
|
||||
+ if (mChangeEnabledStateOfUserApp) {
|
||||
+ handleDialogClick(ButtonActionDialogFragment.DialogType.DISABLE);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
// If the system app has an update and this is the only user on the device,
|
||||
// then offer to downgrade the app, otherwise only offer to disable the
|
||||
// app for this user.
|
||||
@@ -488,6 +502,25 @@ void updateUninstallButton() {
|
||||
}
|
||||
|
||||
mButtonsPref.setButton2Enabled(enabled);
|
||||
+
|
||||
+ if (enabled && !isBundled) {
|
||||
+ // "enabled" means "show uninstall button" in this context
|
||||
+ int text;
|
||||
+ int icon;
|
||||
+ if (mAppEntry.info.enabled) {
|
||||
+ text = R.string.disable_text;
|
||||
+ icon = R.drawable.ic_settings_disable;
|
||||
+ } else {
|
||||
+ text = R.string.enable_text;
|
||||
+ icon = R.drawable.ic_settings_enable;
|
||||
+ }
|
||||
+ mButtonsPref
|
||||
+ .setButton4Text(text)
|
||||
+ .setButton4Icon(icon)
|
||||
+ .setButton4Visible(true)
|
||||
+ .setButton4OnClickListener(new UninstallAndDisableButtonListener(true))
|
||||
+ ;
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -514,7 +547,9 @@ private void refreshAndFinishIfPossible(boolean removeTaskWhenFinishing) {
|
||||
|
||||
@VisibleForTesting
|
||||
void updateForceStopButton() {
|
||||
- if (mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
|
||||
+ if (!mPackageInfo.applicationInfo.enabled) {
|
||||
+ mButtonsPref.setButton3Visible(false);
|
||||
+ } else if (mDpm.packageHasActiveAdmins(mPackageInfo.packageName)) {
|
||||
// User can't force stop device admin.
|
||||
Log.w(TAG, "User can't force stop device admin");
|
||||
updateForceStopButtonInner(false /* enabled */);
|
||||
@@ -538,6 +573,7 @@ void updateForceStopButton() {
|
||||
|
||||
@VisibleForTesting
|
||||
void updateForceStopButtonInner(boolean enabled) {
|
||||
+ mButtonsPref.setButton3Visible(true);
|
||||
if (mAppsControlDisallowedBySystem) {
|
||||
mButtonsPref.setButton3Enabled(false);
|
||||
} else {
|
||||
@@ -552,6 +588,7 @@ void uninstallPkg(String packageName, boolean allUsers, boolean andDisable) {
|
||||
Uri packageUri = Uri.parse("package:" + packageName);
|
||||
Intent uninstallIntent = new Intent(Intent.ACTION_UNINSTALL_PACKAGE, packageUri);
|
||||
uninstallIntent.putExtra(Intent.EXTRA_UNINSTALL_ALL_USERS, allUsers);
|
||||
+ uninstallIntent.putExtra(Intent.EXTRA_UNINSTALL_SHOW_MORE_OPTIONS_BUTTON, false);
|
||||
|
||||
mMetricsFeatureProvider.action(
|
||||
mActivity, SettingsEnums.ACTION_SETTINGS_UNINSTALL_APP);
|
@ -273,7 +273,7 @@ echo "Deblobbing...";
|
||||
blobs=$blobs"|CarrierSettings.apk|CarrierSetup.apk";
|
||||
blobs=$blobs"|CarrierServices.apk";
|
||||
blobs=$blobs"|HardwareInfo.apk";
|
||||
blobs=$blobs"|SCONE.apk"; #???
|
||||
blobs=$blobs"|SCONE.apk"; #Adaptive Connectivity Services
|
||||
blobs=$blobs"|DevicePersonalizationPrebuilt.*.apk|DeviceIntelligence.*.apk";
|
||||
blobs=$blobs"|libhwinfo.jar|com.google.android.hardwareinfo.xml";
|
||||
overlay=$overlay"|config_defaultAttentionService|config_defaultSystemCaptionsManagerService|config_defaultSystemCaptionsService|config_systemAmbientAudioIntelligence|config_systemAudioIntelligence|config_systemNotificationIntelligence|config_systemTextIntelligence|config_systemUiIntelligence|config_systemVisualIntelligence|config_defaultContentSuggestionsService|config_defaultAppPredictionService";
|
||||
@ -290,8 +290,9 @@ echo "Deblobbing...";
|
||||
fi;
|
||||
|
||||
#Google Camera
|
||||
blobs=$blobs"|PixelCameraServices.*.apk";
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_CAMEXT" = true ]; then
|
||||
blobs=$blobs"|com.google.android.camera.*|PixelCameraServices.*.apk";
|
||||
blobs=$blobs"|com.google.android.camera.*";
|
||||
fi;
|
||||
|
||||
#Google NFC
|
||||
|
@ -407,7 +407,7 @@ processRelease() {
|
||||
cp -v $OUT_DIR/$PREFIX-ota.zip* $ARCHIVE/ || true;
|
||||
cp -v $OUT_DIR/$PREFIX-recovery.img* $ARCHIVE/ || true;
|
||||
rename -- "-ota." "." $ARCHIVE/$PREFIX-ota.zip*;
|
||||
if [ "$DOS_GENERATE_DELTAS" = true ];
|
||||
if [ "$DOS_GENERATE_DELTAS" = true ]; then
|
||||
if [[ " ${DOS_GENERATE_DELTAS_DEVICES[@]} " =~ " ${DEVICE} " ]]; then
|
||||
cp -v $OUT_DIR/$PREFIX-target_files.zip* $ARCHIVE/target_files/ || true;
|
||||
cp -v $OUT_DIR/$PREFIX-incremental_*.zip* $ARCHIVE/incrementals/ || true;
|
||||
|
@ -341,6 +341,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0011-LTE_Only_Mode.patch
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0012-hosts_toggle.patch"; #Add a toggle to disable /etc/hosts lookup (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
if [ "$DOS_MICROG_SUPPORT" = true ]; then applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-signature_spoofing_toggle.patch"; fi; #Add a toggle to opt-in to restricted signature spoofing (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_apps_Settings/0001-disable_apps.patch"; #Add an ability to disable non-system apps from the "App info" screen (GrapheneOS)
|
||||
sed -i 's/private int mPasswordMaxLength = 16;/private int mPasswordMaxLength = 64;/' src/com/android/settings/password/ChooseLockPassword.java; #Increase default max password length to 64 (GrapheneOS)
|
||||
sed -i 's/if (isFullDiskEncrypted()) {/if (false) {/' src/com/android/settings/accessibility/*AccessibilityService*.java; #Never disable secure start-up when enabling an accessibility service
|
||||
fi;
|
||||
|
@ -334,6 +334,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-LTE_Only_Mode-2.pat
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-LTE_Only_Mode-3.patch"; #Add LTE only entry when carrier enables world mode (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
if [ "$DOS_MICROG_SUPPORT" = true ]; then applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0015-signature_spoofing_toggle.patch"; fi; #Add a toggle to opt-in to restricted signature spoofing (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_apps_Settings/0001-disable_apps.patch"; #Add an ability to disable non-system apps from the "App info" screen (GrapheneOS)
|
||||
sed -i 's/if (isFullDiskEncrypted()) {/if (false) {/' src/com/android/settings/accessibility/*AccessibilityService*.java; #Never disable secure start-up when enabling an accessibility service
|
||||
fi;
|
||||
|
||||
|
@ -310,6 +310,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-Captive_Portal_Togg
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-LTE_Only_Mode.patch"; #Add LTE only setting (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0015-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
if [ "$DOS_MICROG_SUPPORT" = true ]; then applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0016-signature_spoofing_toggle.patch"; fi; #Add a toggle to opt-in to restricted signature spoofing (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_apps_Settings/0001-disable_apps.patch"; #Add an ability to disable non-system apps from the "App info" screen (GrapheneOS)
|
||||
sed -i 's/if (isFullDiskEncrypted()) {/if (false) {/' src/com/android/settings/accessibility/*AccessibilityService*.java; #Never disable secure start-up when enabling an accessibility service
|
||||
fi;
|
||||
|
||||
|
@ -134,7 +134,8 @@ patchWorkspaceReal() {
|
||||
verifyAllPlatformTags;
|
||||
gpgVerifyGitHead "$DOS_BUILD_BASE/external/chromium-webview";
|
||||
|
||||
#source build/envsetup.sh;
|
||||
source build/envsetup.sh;
|
||||
repopick -i 361248; #Launcher3: Allow toggling monochrome icons for all apps
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
|
@ -301,6 +301,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-LTE_Only_Mode-1.pat
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-LTE_Only_Mode-2.patch"; #Fix LTE Only mode on World Mode (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0015-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
if [ "$DOS_MICROG_SUPPORT" = true ]; then applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0016-signature_spoofing_toggle.patch"; fi; #Add a toggle to opt-in to restricted signature spoofing (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_apps_Settings/0001-disable_apps.patch"; #Add an ability to disable non-system apps from the "App info" screen (GrapheneOS)
|
||||
fi;
|
||||
|
||||
if enterAndClear "packages/apps/SetupWizard"; then
|
||||
|
Loading…
Reference in New Issue
Block a user