aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Han <416810799@qq.com>2019-12-03 15:24:06 +0800
committerdwardo <benjamin.reveille@gmail.com>2019-12-08 23:04:18 +0100
commitd0702b12883d437feabe8f8696d8109c0107ac3b (patch)
tree6100f174fa090960cefee923578c106765af41e9
parent7f4f356c6788c4788a85ed5f432ff40fd8dae574 (diff)
downloadlineage-sdk-d0702b12883d437feabe8f8696d8109c0107ac3b.tar.gz
lineage-sdk-d0702b12883d437feabe8f8696d8109c0107ac3b.tar.bz2
lineage-sdk-d0702b12883d437feabe8f8696d8109c0107ac3b.zip
lineage-sdk: Drop root status of Trust
Change-Id: Iaec0b2a8a781a0e9d301a21a3af5e4362a5d6630
-rw-r--r--api/lineage_current.txt2
-rw-r--r--lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java21
-rw-r--r--lineage/res/res/values/strings.xml2
-rw-r--r--lineage/res/res/values/symbols.xml2
-rw-r--r--sdk/src/java/lineageos/trust/TrustInterface.java23
5 files changed, 0 insertions, 50 deletions
diff --git a/api/lineage_current.txt b/api/lineage_current.txt
index 4bb4d578..9523ab73 100644
--- a/api/lineage_current.txt
+++ b/api/lineage_current.txt
@@ -1002,12 +1002,10 @@ package lineageos.trust {
field public static final int TRUST_FEATURE_LEVEL_GOOD = 0; // 0x0
field public static final int TRUST_FEATURE_LEVEL_POOR = 1; // 0x1
field public static final int TRUST_FEATURE_PLATFORM_SECURITY_PATCH = 2; // 0x2
- field public static final int TRUST_FEATURE_ROOT = 1; // 0x1
field public static final int TRUST_FEATURE_SELINUX = 0; // 0x0
field public static final int TRUST_FEATURE_VENDOR_SECURITY_PATCH = 3; // 0x3
field public static final java.lang.String TRUST_INTERFACE_PERMISSION = "lineageos.permission.TRUST_INTERFACE";
field public static final int TRUST_WARN_PUBLIC_KEY = 4; // 0x4
- field public static final int TRUST_WARN_ROOT = 2; // 0x2
field public static final int TRUST_WARN_SELINUX = 1; // 0x1
}
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
index 7faffa45..b1ea5572 100644
--- a/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
+++ b/lineage/lib/main/java/org/lineageos/platform/internal/TrustInterfaceService.java
@@ -179,8 +179,6 @@ public class TrustInterfaceService extends LineageSystemService {
switch (feature) {
case TrustInterface.TRUST_FEATURE_SELINUX:
return getSELinuxStatus();
- case TrustInterface.TRUST_FEATURE_ROOT:
- return getRootStatus();
case TrustInterface.TRUST_FEATURE_PLATFORM_SECURITY_PATCH:
return getSecurityPatchStatus(PLATFORM_SECURITY_PATCHES);
case TrustInterface.TRUST_FEATURE_VENDOR_SECURITY_PATCH:
@@ -228,10 +226,6 @@ public class TrustInterfaceService extends LineageSystemService {
title = R.string.trust_notification_title_security;
message = R.string.trust_notification_content_selinux;
break;
- case TrustInterface.TRUST_WARN_ROOT:
- title = R.string.trust_notification_title_root;
- message = R.string.trust_notification_content_root;
- break;
case TrustInterface.TRUST_WARN_PUBLIC_KEY:
title = R.string.trust_notification_title_security;
message = R.string.trust_notification_content_keys;
@@ -261,21 +255,6 @@ public class TrustInterfaceService extends LineageSystemService {
TrustInterface.TRUST_FEATURE_LEVEL_BAD;
}
- private int getRootStatus() {
- String status = SystemProperties.get("persist.sys.root_access", "0");
- switch (status) {
- case "0":
- return TrustInterface.TRUST_FEATURE_LEVEL_GOOD;
- case "1":
- case "3":
- return TrustInterface.TRUST_FEATURE_LEVEL_BAD;
- case "2":
- return TrustInterface.TRUST_FEATURE_LEVEL_POOR;
- default:
- return TrustInterface.ERROR_UNDEFINED;
- }
- }
-
private int getSecurityPatchStatus(String target) {
String patchLevel = SystemProperties.get(target);
if (TextUtils.isEmpty(patchLevel)) {
diff --git a/lineage/res/res/values/strings.xml b/lineage/res/res/values/strings.xml
index d61d0017..c632f426 100644
--- a/lineage/res/res/values/strings.xml
+++ b/lineage/res/res/values/strings.xml
@@ -167,8 +167,6 @@
<string name="trust_notification_channel">Trust alerts</string>
<string name="trust_notification_title_security">Trust \u2022 System security</string>
<string name="trust_notification_content_selinux">SELinux is not enforcing, your security has been weakened</string>
- <string name="trust_notification_title_root">Trust \u2022 Root access</string>
- <string name="trust_notification_content_root">An app is using the root privileges right now</string>
<string name="trust_notification_content_keys">This build was signed with public keys</string>
<string name="trust_notification_title_onboarding">Discover Trust</string>
<string name="trust_notification_content_onboarding">Get to know how to assure your device is safe</string>
diff --git a/lineage/res/res/values/symbols.xml b/lineage/res/res/values/symbols.xml
index fef60254..a693a84d 100644
--- a/lineage/res/res/values/symbols.xml
+++ b/lineage/res/res/values/symbols.xml
@@ -159,8 +159,6 @@
<java-symbol type="string" name="trust_notification_channel" />
<java-symbol type="string" name="trust_notification_title_security" />
<java-symbol type="string" name="trust_notification_content_selinux" />
- <java-symbol type="string" name="trust_notification_title_root" />
- <java-symbol type="string" name="trust_notification_content_root" />
<java-symbol type="string" name="trust_notification_content_keys" />
<java-symbol type="string" name="trust_notification_title_onboarding" />
<java-symbol type="string" name="trust_notification_content_onboarding" />
diff --git a/sdk/src/java/lineageos/trust/TrustInterface.java b/sdk/src/java/lineageos/trust/TrustInterface.java
index 7f2d233e..3bb147f0 100644
--- a/sdk/src/java/lineageos/trust/TrustInterface.java
+++ b/sdk/src/java/lineageos/trust/TrustInterface.java
@@ -75,18 +75,6 @@ public class TrustInterface {
public static final int TRUST_FEATURE_SELINUX = 0;
/**
- * Trust feature indicator: Root access
- *
- * Possible status:
- * * {@link #TRUST_FEATURE_LEVEL_GOOD}: disabled
- * * {@link #TRUST_FEATURE_LEVEL_POOR}: ADB only
- * * {@link #TRUST_FEATURE_LEVEL_BAD}: apps and ADB
- *
- * @see #getLevelForFeature
- */
- public static final int TRUST_FEATURE_ROOT = 1;
-
- /**
* Trust feature indicator: Platform Security patches
*
* Possible status:
@@ -151,16 +139,6 @@ public class TrustInterface {
public static final int TRUST_WARN_SELINUX = 1;
/**
- * Trust warning: Root access
- *
- * When {@link #TRUST_FEATURE_ROOT} is not {@link #TRUST_FEATURE_LEVEL_GOOD}
- * notify the user about the issue
- *
- * @see #postNotificationForFeature
- */
- public static final int TRUST_WARN_ROOT = 1 << 1;
-
- /**
* Trust warning: Public Key build signature
*
* When {@link #TRUST_FEATURE_KEYS} is not {@link #TRUST_FEATURE_LEVEL_GOOD}
@@ -180,7 +158,6 @@ public class TrustInterface {
*/
public static final int TRUST_WARN_MAX_VALUE =
TRUST_WARN_SELINUX |
- TRUST_WARN_ROOT |
TRUST_WARN_PUBLIC_KEY;
private static final String TAG = "TrustInterface";