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

Commit f54744a5 authored by Dave Kessler's avatar Dave Kessler Committed by Gerrit Code Review
Browse files

Power menu customizations [1/2]

power
reboot
screenshot
profile switcher
airplane mode
user switcher
bug reports
sound modes

[mikeioannina]: Modify for CyanogenMod

Change-Id: I6f1ef036a5495ef49b9520c63df5ce322991cd08
parent 1f75e638
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1585,6 +1585,15 @@ public class Intent implements Parcelable, Cloneable {
     * dialogs are the notification window-shade and the recent tasks dialog.
     */
    public static final String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
    /**
     * Broadcast Action: Update preferences for the power menu dialog.  This is to provide a
     * way for the preferences that need to be enabled/disabled to update because they were
     * toggled elsewhere in the settings (ie profiles, immersive desktop, etc) so we don't have
     * to do constant lookups while we wait for the menu to be created. Getting the values once
     * when necessary is enough.
     *@hide
     */
    public static final String UPDATE_POWER_MENU = "android.intent.action.UPDATE_POWER_MENU";
    /**
     * Broadcast Action: Trigger the download and eventual installation
     * of a package.
+6 −0
Original line number Diff line number Diff line
@@ -5980,6 +5980,12 @@ public final class Settings {
         */
        public static final String ADB_ENABLED = "adb_enabled";

        /**
         * String to contain power menu actions
         * @hide
         */
        public static final String POWER_MENU_ACTIONS = "power_menu_actions";

        /**
         * Whether Views are allowed to save their attribute data.
         * @hide
+48 −0
Original line number Diff line number Diff line
/*
 * 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.internal.util.cm;

/* Master list of all actions for the power menu */
public class PowerMenuConstants {
    public static final String GLOBAL_ACTION_KEY_POWER = "power";
    public static final String GLOBAL_ACTION_KEY_REBOOT = "reboot";
    public static final String GLOBAL_ACTION_KEY_SCREENSHOT = "screenshot";
    public static final String GLOBAL_ACTION_KEY_PROFILE = "profile";
    public static final String GLOBAL_ACTION_KEY_AIRPLANE = "airplane";
    public static final String GLOBAL_ACTION_KEY_USERS = "users";
    public static final String GLOBAL_ACTION_KEY_SETTINGS = "settings";
    public static final String GLOBAL_ACTION_KEY_LOCKDOWN = "lockdown";
    public static final String GLOBAL_ACTION_KEY_BUGREPORT = "bugreport";
    public static final String GLOBAL_ACTION_KEY_SILENT = "silent";

    private static String[] ALL_ACTIONS = {
        GLOBAL_ACTION_KEY_POWER,
        GLOBAL_ACTION_KEY_REBOOT,
        GLOBAL_ACTION_KEY_SCREENSHOT,
        GLOBAL_ACTION_KEY_PROFILE,
        GLOBAL_ACTION_KEY_AIRPLANE,
        GLOBAL_ACTION_KEY_USERS,
        GLOBAL_ACTION_KEY_SETTINGS,
        GLOBAL_ACTION_KEY_LOCKDOWN,
        GLOBAL_ACTION_KEY_BUGREPORT,
        GLOBAL_ACTION_KEY_SILENT
    };

    public static String[] getAllActions() {
        return ALL_ACTIONS;
    }
}
Loading