Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64b309fa authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Roman Birg
Browse files

su: Add an indicator when a 'su' session is active

This adds an indicator to the statusbar that is visible whenever a root
session is active, akin to the fine location icon.

Change-Id: I669fcc87e2b7a3201308170d7727ec5fb0e00e2b
parent ab14ea87
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -73,6 +73,10 @@ public class AppOpsManager {
     * will do this for you).
     */

    /** {@hide */
    public static final String ACTION_SU_SESSION_CHANGED =
            "android.intent.action.SU_SESSION_CHANGED";

    final Context mContext;
    final IAppOpsService mService;
    final ArrayMap<OnOpChangedListener, IAppOpsCallback> mModeWatchers
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@
    <protected-broadcast android:name="android.intent.action.USER_FOREGROUND" />
    <protected-broadcast android:name="android.intent.action.USER_SWITCHED" />
    <protected-broadcast android:name="android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION" />
    <protected-broadcast android:name="android.intent.action.SU_SESSION_CHANGED" />

    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
    <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
       <item><xliff:g id="id">cast</xliff:g></item>
       <item><xliff:g id="id">hotspot</xliff:g></item>
       <item><xliff:g id="id">location</xliff:g></item>
       <item><xliff:g id="id">su</xliff:g></item>
       <item><xliff:g id="id">bluetooth</xliff:g></item>
       <item><xliff:g id="id">nfc</xliff:g></item>
       <item><xliff:g id="id">tty</xliff:g></item>
+15 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetLeft="2.5dp"
    android:insetRight="2.5dp">
    <vector
        android:width="23dp"
        android:height="18dp"
        android:viewportWidth="24"
        android:viewportHeight="24">

        <path
            android:fillColor="#FFFFFFFF"
            android:pathData="M12.49,15.934h-2.373L9.24,21H6.966l0.89-5.066H5.051v-2.089h3.163l0.63-3.584H5.977V8.148h3.238 l0.902-5.141h2.261l-0.902,5.141h2.373l0.914-5.141h2.261l-0.902,5.141h2.719v2.113h-3.089l-0.63,3.584h2.78v2.089h-3.139L13.874,21 H11.6L12.49,15.934Z M10.488,13.845h2.36l0.63-3.584h-2.373L10.488,13.845z" />
    </vector>
</inset>
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
<!--
/**
 * Copyright (c) 2009, The Android Open Source Project
 * Copyright (c) 2015, The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
@@ -26,4 +27,7 @@
         values/config.xml) and must be truncated.
         [CHAR LIMIT=4] -->
    <string name="status_bar_notification_info_overflow" translatable="false">\u221E</string>

    <!-- Content description of the superuser tile -->
    <string name="accessibility_su_active">Superuser session active</string>
</resources>
Loading