mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-01-12 16:09:36 -05:00
Cleanup
This commit is contained in:
parent
279f795dc1
commit
4358c37749
@ -1,49 +0,0 @@
|
||||
From 4921beaf996a89c9a56b98f213401ceeb2a23082 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 14:52:59 -0500
|
||||
Subject: [PATCH] Shutdown after 5 failed unlock attempts
|
||||
|
||||
Change-Id: Icc23122e5a25b756872fe132cd0e93684e8bafca
|
||||
---
|
||||
.../Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java | 5 +++++
|
||||
packages/SystemUI/AndroidManifest.xml | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
index aaff265..865956f 100644
|
||||
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
@@ -22,6 +22,7 @@ import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
+import android.os.PowerManager;
|
||||
import android.os.UserHandle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -366,6 +367,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
||||
if (!enableTimesCounter && (timeoutMs > 0)) {
|
||||
showTimeoutDialog(timeoutMs);
|
||||
}
|
||||
+ if (failedAttempts >=5) {
|
||||
+ final PowerManager powerManager = mContext.getSystemService(PowerManager.class);
|
||||
+ powerManager.shutdown(false, false);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
|
||||
index 2248baf..b13b0fd 100644
|
||||
--- a/packages/SystemUI/AndroidManifest.xml
|
||||
+++ b/packages/SystemUI/AndroidManifest.xml
|
||||
@@ -112,6 +112,7 @@
|
||||
<uses-permission android:name="android.permission.TRUST_LISTENER" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
|
||||
+ <uses-permission android:name="android.permission.REBOOT" />
|
||||
|
||||
<!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,94 +0,0 @@
|
||||
From c8fa50c18694d35a4c2e334d886056556b35749c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 20 Nov 2016 05:35:13 -0500
|
||||
Subject: [PATCH] non-Copperhead system app updates are incompatible
|
||||
|
||||
---
|
||||
.../org/fdroid/fdroid/CompatibilityChecker.java | 42 +++++++++++++++++++++-
|
||||
1 file changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java b/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
index 74d3b0f..f71375f 100644
|
||||
--- a/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
+++ b/app/src/main/java/org/fdroid/fdroid/CompatibilityChecker.java
|
||||
@@ -2,18 +2,23 @@
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
+import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.FeatureInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
+import android.content.pm.PackageManager.NameNotFoundException;
|
||||
+import android.content.pm.Signature;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
+import android.util.Log;
|
||||
|
||||
import org.fdroid.fdroid.compat.SupportedArchitectures;
|
||||
import org.fdroid.fdroid.data.Apk;
|
||||
-
|
||||
+import org.fdroid.fdroid.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -29,6 +34,7 @@
|
||||
private final String[] cpuAbis;
|
||||
private final String cpuAbisDesc;
|
||||
private final boolean ignoreTouchscreen;
|
||||
+ private final HashMap<String, String> systemApps;
|
||||
|
||||
public CompatibilityChecker(Context ctx) {
|
||||
|
||||
@@ -56,6 +62,34 @@ public CompatibilityChecker(Context ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
+ systemApps = new HashMap<>();
|
||||
+ for (final ApplicationInfo ai: pm.getInstalledApplications(0)) {
|
||||
+ Signature sig;
|
||||
+ try {
|
||||
+ sig = ctx.getPackageManager().getPackageInfo(
|
||||
+ ai.packageName, PackageManager.GET_SIGNATURES).signatures[0];
|
||||
+ } catch (NameNotFoundException e) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ byte[] rawCertBytes = sig.toByteArray();
|
||||
+
|
||||
+ final byte[] fdroidSig = new byte[rawCertBytes.length * 2];
|
||||
+ for (int j = 0; j < rawCertBytes.length; j++) {
|
||||
+ byte v = rawCertBytes[j];
|
||||
+ int d = (v >> 4) & 0xF;
|
||||
+ fdroidSig[j * 2] = (byte) (d >= 10 ? ('a' + d - 10) : ('0' + d));
|
||||
+ d = v & 0xF;
|
||||
+ fdroidSig[j * 2 + 1] = (byte) (d >= 10 ? ('a' + d - 10) : ('0' + d));
|
||||
+ }
|
||||
+
|
||||
+ String hash = Utils.hashBytes(fdroidSig, "md5");
|
||||
+
|
||||
+ if ((ai.flags & ApplicationInfo.FLAG_SYSTEM) != 0 ||
|
||||
+ (ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
|
||||
+ systemApps.put(ai.packageName, hash);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
cpuAbis = SupportedArchitectures.getAbis();
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -119,6 +153,12 @@ private boolean compatibleApi(@Nullable String[] nativecode) {
|
||||
+ " while your architectures are " + cpuAbisDesc);
|
||||
}
|
||||
|
||||
+ String hash = systemApps.get(apk.packageName);
|
||||
+ if (hash != null && !hash.equalsIgnoreCase(apk.sig)) {
|
||||
+ Log.i(TAG, "incompatible system app: " + apk.packageName + " " + hash + " " + apk.sig);
|
||||
+ Collections.addAll(incompatibleReasons, "Not already installed as a system app");
|
||||
+ }
|
||||
+
|
||||
return incompatibleReasons;
|
||||
}
|
||||
}
|
@ -65,7 +65,7 @@ enter "external/sqlite"
|
||||
patch -p1 < $patches"android_external_sqlite/0001-Secure_Delete.patch" #Enable secure_delete by default TODO: Fix patch author
|
||||
|
||||
enter "packages/apps/CustomTiles"
|
||||
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CustomTiles refs/changes/69/167069/1 && git cherry-pick FETCH_HEAD # System profiles tile
|
||||
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CustomTiles refs/changes/69/167069/1 && git cherry-pick FETCH_HEAD #System profiles tile
|
||||
|
||||
enter "frameworks/opt/net/ims"
|
||||
patch -p1 < $patches"android_frameworks_opt_net_ims/0001-Fix_Calling.patch" #Fix calling after we remove IMS
|
||||
@ -78,11 +78,9 @@ patch -p1 < $patches"android_packages_apps_IchnaeaNlpBackend/0001-Fixes.patch" #
|
||||
|
||||
enter "packages/apps/FDroid"
|
||||
patch -p1 < $patches"android_packages_apps_FDroid/0001.patch" #Enable privigled module
|
||||
#patch -p1 < $patches"android_packages_apps_FDroid/0003.patch" #Hide app updates for apps that are installed to /system
|
||||
|
||||
enter "packages/apps/FDroidPrivilegedExtension"
|
||||
patch -p1 < $patches"android_packages_apps_FDroidPrivilegedExtension/0002-Release_Key.patch" #Change to release key
|
||||
#patch -p1 < $patches"android_packages_apps_FDroidPrivilegedExtension/0003-Test_Keys.patch" #Add test-keys XXX: ONLY USE FOR TEST BUILDS
|
||||
#release-keys: CB:1E:E2:EC:40:D0:5E:D6:78:F4:2A:E7:01:CD:FA:29:EE:A7:9D:0E:6D:63:32:76:DE:23:0B:F3:49:40:67:C3
|
||||
#test-keys: C8:A2:E9:BC:CF:59:7C:2F:B6:DC:66:BE:E2:93:FC:13:F2:FC:47:EC:77:BC:6B:2B:0D:52:C1:1F:51:19:2A:B8
|
||||
|
||||
@ -110,9 +108,6 @@ rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig core
|
||||
|
||||
enter "device/qcom/sepolicy"
|
||||
patch -p1 < $patches"android_device_qcom_sepolicy/0001-Camera_Fix.patch" #Fix camera on user builds
|
||||
|
||||
enter "packages/apps/Snap"
|
||||
sed -i 's/LOCAL_OVERRIDES_PACKAGES := Camera2/#LOCAL_OVERRIDES_PACKAGES := Camera2/' config/common.mk; #Ship both cameras, let the user disable which one they don't want
|
||||
#
|
||||
#END OF ROM CHANGES
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user