mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-14 18:34:30 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Collin Fijalkovich <cfijalkovich@google.com>
|
|
Date: Wed, 8 Jul 2020 15:00:03 -0700
|
|
Subject: [PATCH] Block Traceur MainTvActivity when development options
|
|
disabled.
|
|
|
|
The system tracing app is intended to only be accessible when
|
|
development options are enabled, but this requirement could be bypassed
|
|
by sending an intent to launch the MainTvActivity. This change causes
|
|
the activity to immediately exit if development options are disabled.
|
|
|
|
Bug: 160155846
|
|
Test: am start com.android.traceur/com.android.traceur.MainTvActivity
|
|
failed when development options were disabled.
|
|
|
|
Change-Id: I371538eaff180dfc38fa6403a773c24cbbfd4dcf
|
|
Merged-In: I371538eaff180dfc38fa6403a773c24cbbfd4dcf
|
|
---
|
|
src/com/google/android/traceur/MainTvActivity.java | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/src/com/google/android/traceur/MainTvActivity.java b/src/com/google/android/traceur/MainTvActivity.java
|
|
index 18fbe04..91f67c4 100644
|
|
--- a/src/com/google/android/traceur/MainTvActivity.java
|
|
+++ b/src/com/google/android/traceur/MainTvActivity.java
|
|
@@ -17,6 +17,7 @@ package com.android.traceur;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Bundle;
|
|
+import android.provider.Settings;
|
|
|
|
public class MainTvActivity extends Activity {
|
|
@Override
|
|
@@ -24,4 +25,16 @@ public class MainTvActivity extends Activity {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity);
|
|
}
|
|
+
|
|
+ @Override
|
|
+ protected void onStart() {
|
|
+ super.onStart();
|
|
+ boolean developerOptionsIsEnabled =
|
|
+ Settings.Global.getInt(getApplicationContext().getContentResolver(),
|
|
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
|
|
+
|
|
+ if (!developerOptionsIsEnabled) {
|
|
+ finish();
|
|
+ }
|
|
+ }
|
|
}
|