Loading Android.mk +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 \ Loading core/java/android/content/Context.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -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. Loading core/java/com/android/internal/os/IKillSwitch.java 0 → 100644 +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(); } core/java/com/android/internal/os/IKillSwitchService.aidl 0 → 100644 +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(); } core/res/res/values/config.xml +11 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
Android.mk +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 \ Loading
core/java/android/content/Context.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -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. Loading
core/java/com/android/internal/os/IKillSwitch.java 0 → 100644 +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(); }
core/java/com/android/internal/os/IKillSwitchService.aidl 0 → 100644 +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(); }
core/res/res/values/config.xml +11 −0 Original line number Original line Diff line number Diff line Loading @@ -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