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

Commit a1621d2a authored by Roman Birg's avatar Roman Birg
Browse files

framework: add KillSwitch stubs



Change-Id: Ie6cec065df0f821d9a5b8ab7bb3032fe7655389f
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 1e86e5fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -236,6 +236,7 @@ LOCAL_SRC_FILES += \
	core/java/com/android/internal/policy/IKeyguardService.aidl \
	core/java/com/android/internal/policy/IKeyguardService.aidl \
	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
	core/java/com/android/internal/os/IDropBoxManagerService.aidl \
	core/java/com/android/internal/os/IResultReceiver.aidl \
	core/java/com/android/internal/os/IResultReceiver.aidl \
	core/java/com/android/internal/os/IKillSwitchService.aidl \
	core/java/com/android/internal/statusbar/IStatusBar.aidl \
	core/java/com/android/internal/statusbar/IStatusBar.aidl \
	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
	core/java/com/android/internal/statusbar/IStatusBarService.aidl \
	core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
	core/java/com/android/internal/textservice/ISpellCheckerService.aidl \
+10 −0
Original line number Original line Diff line number Diff line
@@ -2509,6 +2509,16 @@ public abstract class Context {
     */
     */
    public static final String TORCH_SERVICE = "torch";
    public static final String TORCH_SERVICE = "torch";


    /**
     * Use with {@link #getSystemService} to retrieve a
     * {@link com.android.server.KillSwitchService}for accessing the kill switch service.
     *
     * @see #getSystemService
     * @see com.android.server.KillSwitchService
     * @hide
     */
    public static final String KILLSWITCH_SERVICE = "killswitch";

    /**
    /**
     * Determine whether the given permission is allowed for a particular
     * Determine whether the given permission is allowed for a particular
     * process and user ID running in the system.
     * process and user ID running in the system.
+31 −0
Original line number Original line 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.os;

/**
 * @hide
 */
public interface IKillSwitch {
    public void setDeviceUuid(String uuid);
    public String getDeviceUuid();

    public boolean isDeviceLocked();
    public void setDeviceLocked(boolean locked);

    public void setAccountId(String value);
    public String getAccountId();
}
+33 −0
Original line number Original line 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.os;

/**
 * @hide
 */
interface IKillSwitchService {
    boolean hasKillSwitch();

    void setDeviceUuid(String uuid);
    String getDeviceUuid();

    boolean isDeviceLocked();
    void setDeviceLocked(boolean locked);

    void setAccountId(String value);
    String getAccountId();
}
+11 −0
Original line number Original line Diff line number Diff line
@@ -1547,6 +1547,17 @@
    <string-array name="config_auto_perf_activities" translatable="false">
    <string-array name="config_auto_perf_activities" translatable="false">
    </string-array>
    </string-array>


    <!-- Packages that are allowed to write killswitch values -->
    <string-array name="config_packagesAllowedAccessToKillSwitch" translatable="false">
    </string-array>

    <!-- Path to the library that contains the kill switch library -->
    <string name="config_killSwitchLib" translatable="false"></string>

    <!-- Name of the class which implements the IKillSwitch interface -->
    <string name="config_killSwitchClass" translatable="false"></string>


    <!-- Control the behavior when the user long presses the menu button.
    <!-- Control the behavior when the user long presses the menu button.
            0 - Nothing
            0 - Nothing
            1 - Menu key
            1 - Menu key
Loading