-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ied03fa1acf9dedb2a35fd25ad527a2ff890c1f77
- Loading branch information
Showing
28 changed files
with
1,399 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ PRODUCT_PACKAGES += \ | |
|
||
# Doze | ||
PRODUCT_PACKAGES += \ | ||
MotoDoze | ||
CMActions | ||
|
||
# Radio | ||
PRODUCT_PACKAGES += \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
LOCAL_PATH:= $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
|
||
LOCAL_SRC_FILES := $(call all-java-files-under, src) | ||
|
||
LOCAL_PACKAGE_NAME := CMActions | ||
LOCAL_CERTIFICATE := platform | ||
LOCAL_PRIVILEGED_MODULE := true | ||
|
||
LOCAL_STATIC_JAVA_LIBRARIES := \ | ||
android-support-v14-preference \ | ||
android-support-v7-appcompat \ | ||
android-support-v7-preference \ | ||
android-support-v7-recyclerview \ | ||
org.cyanogenmod.platform.internal | ||
|
||
LOCAL_PROGUARD_FLAG_FILES := proguard.flags | ||
|
||
LOCAL_RESOURCE_DIR := \ | ||
$(LOCAL_PATH)/res \ | ||
$(LOCAL_PATH)/../../../../../packages/resources/devicesettings/res \ | ||
frameworks/support/v14/preference/res \ | ||
frameworks/support/v7/appcompat/res \ | ||
frameworks/support/v7/preference/res \ | ||
frameworks/support/v7/recyclerview/res | ||
|
||
LOCAL_AAPT_FLAGS := --auto-add-overlay \ | ||
--extra-packages android.support.v14.preference:android.support.v7.appcompat:android.support.v7.preference:android.support.v7.recyclerview | ||
|
||
ifneq ($(INCREMENTAL_BUILDS),) | ||
LOCAL_PROGUARD_ENABLED := disabled | ||
LOCAL_JACK_ENABLED := incremental | ||
endif | ||
|
||
include frameworks/base/packages/SettingsLib/common.mk | ||
|
||
include $(BUILD_PACKAGE) | ||
|
||
include $(call all-makefiles-under,$(LOCAL_PATH)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.cyanogenmod.cmactions" | ||
android:sharedUserId="android.uid.system"> | ||
|
||
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
|
||
<protected-broadcast android:name="com.android.systemui.doze.pulse" /> | ||
|
||
<application | ||
android:label="@string/device_settings_app_name" | ||
android:persistent="true"> | ||
|
||
<receiver android:name=".CMActionsReceiver"> | ||
<intent-filter> | ||
<action android:name="cyanogenmod.intent.action.UPDATE_PREFERENCE" /> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<service android:name="com.cyanogenmod.cmactions.CMActionsService" | ||
android:permission="CMActionsService"> | ||
</service> | ||
|
||
<activity | ||
android:name=".GesturePreferenceActivity" | ||
android:label="@string/ambient_display_title" | ||
android:theme="@style/CMActions"> | ||
<intent-filter> | ||
<action android:name="org.cyanogenmod.settings.device.DOZE_SETTINGS" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
<meta-data | ||
android:name="org.cyanogenmod.settings.summary.receiver" | ||
android:value="com.cyanogenmod.cmactions.CMActionsReceiver" /> | ||
<meta-data | ||
android:name="org.cyanogenmod.settings.summary.key" | ||
android:value="doze_device_settings" /> | ||
</activity> | ||
|
||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-keep class com.cyanogenmod.CMActions.* { | ||
*; | ||
} | ||
|
||
-keepclasseswithmembers class * { | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
} | ||
|
||
-keep class ** extends android.support.v14.preference.PreferenceFragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2014 The Android Open Source 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. | ||
--> | ||
|
||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:color="?android:attr/colorControlHighlight"> | ||
<item android:drawable="?android:attr/colorSecondary" /> | ||
</ripple> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* | ||
** Copyright 2014, The Android Open Source 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. | ||
*/ | ||
--> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_height="match_parent" | ||
android:layout_width="match_parent"> | ||
|
||
<LinearLayout | ||
android:orientation="vertical" | ||
android:layout_height="0px" | ||
android:layout_width="match_parent" | ||
android:layout_weight="1"> | ||
|
||
<com.cyanogenmod.cmactions.widget.SwitchBar android:id="@+id/switch_bar" | ||
android:layout_height="?android:attr/actionBarSize" | ||
android:layout_width="match_parent" | ||
android:background="@drawable/switchbar_background" | ||
android:theme="?attr/switchBarTheme" | ||
/> | ||
|
||
<FrameLayout | ||
android:id="@+id/main_content" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
/> | ||
|
||
</LinearLayout> | ||
|
||
<RelativeLayout android:id="@+id/button_bar" | ||
android:layout_height="wrap_content" | ||
android:layout_width="match_parent" | ||
android:layout_weight="0" | ||
android:visibility="gone"> | ||
|
||
<Button android:id="@+id/back_button" | ||
android:layout_width="150dip" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="5dip" | ||
android:layout_alignParentStart="true" | ||
android:text="@*android:string/back_button_label" | ||
/> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentEnd="true"> | ||
|
||
<Button android:id="@+id/skip_button" | ||
android:layout_width="150dip" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="5dip" | ||
android:text="@*android:string/skip_button_label" | ||
android:visibility="gone" | ||
/> | ||
|
||
<Button android:id="@+id/next_button" | ||
android:layout_width="150dip" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="5dip" | ||
android:text="@*android:string/next_button_label" | ||
/> | ||
|
||
</LinearLayout> | ||
|
||
</RelativeLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/* | ||
** Copyright 2014, The Android Open Source 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. | ||
*/ | ||
--> | ||
|
||
<merge xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<TextView android:id="@+id/switch_text" | ||
android:layout_height="wrap_content" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" | ||
android:layout_gravity="center_vertical" | ||
android:maxLines="2" | ||
android:ellipsize="end" | ||
android:textAppearance="@style/TextAppearance.Switch" | ||
android:textColor="?android:attr/textColorPrimary" | ||
android:textAlignment="viewStart" /> | ||
|
||
<ImageView android:id="@+id/restricted_icon" | ||
android:layout_width="@dimen/restricted_icon_size" | ||
android:layout_height="@dimen/restricted_icon_size" | ||
android:src="@drawable/ic_info" | ||
android:theme="@android:style/Theme.Material" | ||
android:layout_gravity="center_vertical" | ||
android:layout_marginEnd="@dimen/restricted_icon_margin_end" | ||
android:visibility="gone" /> | ||
|
||
<com.cyanogenmod.cmactions.widget.ToggleSwitch android:id="@+id/switch_widget" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:background="@null" | ||
android:theme="@style/ThemeOverlay.SwitchBar.Settings" /> | ||
|
||
</merge> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2017 The LineageOS 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. | ||
--> | ||
|
||
<resources> | ||
<attr name="switchBarTheme" format="reference" /> | ||
<attr name="switchBarMarginStart" format="dimension" /> | ||
<attr name="switchBarMarginEnd" format="dimension" /> | ||
<attr name="switchBarBackgroundColor" format="color" /> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="secondary_device_default_settings">#ff37474f</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2017 The LineageOS 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. | ||
--> | ||
<resources> | ||
<!-- Restricted icon in switch bar --> | ||
<dimen name="restricted_icon_margin_end">16dp</dimen> | ||
|
||
<!-- SwitchBar sub settings margin start / end --> | ||
<dimen name="switchbar_subsettings_margin_start">72dp</dimen> | ||
<dimen name="switchbar_subsettings_margin_end">16dp</dimen> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2017 The LineageOS 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. | ||
--> | ||
<resources> | ||
<!-- Switch On/Off --> | ||
<string name="switch_on_text">@string/switch_bar_on</string> | ||
<string name="switch_off_text">@string/switch_bar_off</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2016 The CyanogenMod Project | ||
Copyright (C) 2017 The LineageOS 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. | ||
--> | ||
<resources> | ||
<style name="CMActions" parent="@style/PreferenceThemeOverlay.v14.Material"> | ||
<item name="preferenceTheme">@android:style/Theme.Material.Settings</item> | ||
<item name="switchBarTheme">@style/ThemeOverlay.SwitchBar.Settings</item> | ||
<item name="android:colorSecondary">@color/secondary_device_default_settings</item> | ||
</style> | ||
|
||
<style name="ThemeOverlay.SwitchBar.Settings" parent="@*android:style/ThemeOverlay.DeviceDefault.Dark.ActionBar.Accent"> | ||
<item name="switchBarMarginStart">@dimen/switchbar_subsettings_margin_start</item> | ||
<item name="switchBarMarginEnd">@dimen/switchbar_subsettings_margin_end</item> | ||
<item name="switchBarBackgroundColor">?android:attr/colorSecondary</item> | ||
</style> | ||
|
||
<style name="TextAppearance.Switch" parent="@android:style/TextAppearance.Material.Title" /> | ||
|
||
<style name="TextAppearance.Small" parent="@android:style/TextAppearance.Material.Small" /> | ||
|
||
<style name="TextAppearance.Small.SwitchBar"> | ||
<item name="android:textColor">?android:attr/textColorPrimary</item> | ||
<item name="android:textStyle">normal</item> | ||
</style> | ||
</resources> |
Oops, something went wrong.