From cf3790550d628cdcd7b5e87a18bf5dd6cf6efc9a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 28 Feb 2013 14:49:24 -0800 Subject: [PATCH] Settings: Add Superuser entry Amended for oreo-x86 porting by cwhuang. Squashed commit of the following: Author: Koushik Dutta Switch to new Superuser Change-Id: I9d91392ad6fbc9953d19059ab59b91d214c00e0c Author: Danny Baumann Hide Superuser entry if root access for apps is disabled. Change-Id: Ibb77ba5a0fccf22564a26b8b1e13f7762c65718e Author: Ricardo Cerqueira Development: Root for apps is unavailable if the su daemon isn't running The superuser options are tied to the Superuser app variant we use, which in turn is tied to the su daemon. No daemon, no menu options. Change-Id: I41d58e62986759336ab38e67f26a558c2eed5aa3 Change-Id: I9d91392ad6fbc9953d19059ab59b91d214c00e0c --- Android.mk | 13 +++- AndroidManifest.xml | 87 ++++++++++++++++++++++ proguard.flags | 2 + src/com/android/settings/Settings.java | 1 + src/com/android/settings/SettingsActivity.java | 5 ++ .../settings/core/gateway/SettingsGateway.java | 2 + .../superuser/MultitaskSuRequestActivity.java | 4 + .../cyanogenmod/superuser/NotifyActivity.java | 4 + .../superuser/PolicyNativeFragment.java | 4 + .../cyanogenmod/superuser/RequestActivity.java | 4 + .../settings/cyanogenmod/superuser/SuReceiver.java | 4 + .../settings/development/DevelopmentSettings.java | 7 ++ 12 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/cyanogenmod/superuser/MultitaskSuRequestActivity.java create mode 100644 src/com/android/settings/cyanogenmod/superuser/NotifyActivity.java create mode 100644 src/com/android/settings/cyanogenmod/superuser/PolicyNativeFragment.java create mode 100644 src/com/android/settings/cyanogenmod/superuser/RequestActivity.java create mode 100644 src/com/android/settings/cyanogenmod/superuser/SuReceiver.java diff --git a/Android.mk b/Android.mk index eeaad0c936..fd0b4caa52 100644 --- a/Android.mk +++ b/Android.mk @@ -17,7 +17,9 @@ LOCAL_PRIVILEGED_MODULE := true LOCAL_MODULE_TAGS := optional LOCAL_USE_AAPT2 := true -LOCAL_SRC_FILES := $(call all-java-files-under, src) +LOCAL_SRC_FILES := $(call all-java-files-under, src) \ + $(call all-java-files-under,../../../external/koush/Widgets/Widgets/src) \ + $(call all-java-files-under,../../../external/koush/Superuser/Superuser/src) LOCAL_STATIC_ANDROID_LIBRARIES := \ android-support-v4 \ @@ -40,6 +42,15 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags +LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \ + external/koush/Widgets/Widgets/res \ + external/koush/Superuser/Superuser/res + +LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true + +LOCAL_AAPT_FLAGS := --auto-add-overlay \ + --extra-packages com.koushikdutta.superuser:com.koushikdutta.widgets + ifneq ($(INCREMENTAL_BUILDS),) LOCAL_PROGUARD_ENABLED := disabled LOCAL_JACK_ENABLED := incremental diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9c71c4f0f4..0a6dc10421 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -87,6 +87,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +