diff options
Diffstat (limited to 'res')
28 files changed, 332 insertions, 0 deletions
diff --git a/res/drawable-hdpi/ic_blacklist_calls_off.png b/res/drawable-hdpi/ic_blacklist_calls_off.png Binary files differnew file mode 100644 index 0000000..22a05c2 --- /dev/null +++ b/res/drawable-hdpi/ic_blacklist_calls_off.png diff --git a/res/drawable-hdpi/ic_blacklist_calls_on.png b/res/drawable-hdpi/ic_blacklist_calls_on.png Binary files differnew file mode 100644 index 0000000..5073d63 --- /dev/null +++ b/res/drawable-hdpi/ic_blacklist_calls_on.png diff --git a/res/drawable-hdpi/ic_blacklist_messages_off.png b/res/drawable-hdpi/ic_blacklist_messages_off.png Binary files differnew file mode 100644 index 0000000..812aaa5 --- /dev/null +++ b/res/drawable-hdpi/ic_blacklist_messages_off.png diff --git a/res/drawable-hdpi/ic_blacklist_messages_on.png b/res/drawable-hdpi/ic_blacklist_messages_on.png Binary files differnew file mode 100644 index 0000000..4d7c809 --- /dev/null +++ b/res/drawable-hdpi/ic_blacklist_messages_on.png diff --git a/res/drawable-hdpi/ic_see_contacts_holo_dark.png b/res/drawable-hdpi/ic_see_contacts_holo_dark.png Binary files differnew file mode 100644 index 0000000..8e2182f --- /dev/null +++ b/res/drawable-hdpi/ic_see_contacts_holo_dark.png diff --git a/res/drawable-mdpi/ic_blacklist_calls_off.png b/res/drawable-mdpi/ic_blacklist_calls_off.png Binary files differnew file mode 100644 index 0000000..7917f46 --- /dev/null +++ b/res/drawable-mdpi/ic_blacklist_calls_off.png diff --git a/res/drawable-mdpi/ic_blacklist_calls_on.png b/res/drawable-mdpi/ic_blacklist_calls_on.png Binary files differnew file mode 100644 index 0000000..9ec572d --- /dev/null +++ b/res/drawable-mdpi/ic_blacklist_calls_on.png diff --git a/res/drawable-mdpi/ic_blacklist_messages_off.png b/res/drawable-mdpi/ic_blacklist_messages_off.png Binary files differnew file mode 100644 index 0000000..a2e53e3 --- /dev/null +++ b/res/drawable-mdpi/ic_blacklist_messages_off.png diff --git a/res/drawable-mdpi/ic_blacklist_messages_on.png b/res/drawable-mdpi/ic_blacklist_messages_on.png Binary files differnew file mode 100644 index 0000000..01b4747 --- /dev/null +++ b/res/drawable-mdpi/ic_blacklist_messages_on.png diff --git a/res/drawable-mdpi/ic_see_contacts_holo_dark.png b/res/drawable-mdpi/ic_see_contacts_holo_dark.png Binary files differnew file mode 100644 index 0000000..ef1d2df --- /dev/null +++ b/res/drawable-mdpi/ic_see_contacts_holo_dark.png diff --git a/res/drawable-xhdpi/ic_blacklist_calls_off.png b/res/drawable-xhdpi/ic_blacklist_calls_off.png Binary files differnew file mode 100644 index 0000000..6fd91de --- /dev/null +++ b/res/drawable-xhdpi/ic_blacklist_calls_off.png diff --git a/res/drawable-xhdpi/ic_blacklist_calls_on.png b/res/drawable-xhdpi/ic_blacklist_calls_on.png Binary files differnew file mode 100644 index 0000000..cb67ee0 --- /dev/null +++ b/res/drawable-xhdpi/ic_blacklist_calls_on.png diff --git a/res/drawable-xhdpi/ic_blacklist_messages_off.png b/res/drawable-xhdpi/ic_blacklist_messages_off.png Binary files differnew file mode 100644 index 0000000..f32eab6 --- /dev/null +++ b/res/drawable-xhdpi/ic_blacklist_messages_off.png diff --git a/res/drawable-xhdpi/ic_blacklist_messages_on.png b/res/drawable-xhdpi/ic_blacklist_messages_on.png Binary files differnew file mode 100644 index 0000000..c12e04c --- /dev/null +++ b/res/drawable-xhdpi/ic_blacklist_messages_on.png diff --git a/res/drawable-xhdpi/ic_see_contacts_holo_dark.png b/res/drawable-xhdpi/ic_see_contacts_holo_dark.png Binary files differnew file mode 100644 index 0000000..279fff9 --- /dev/null +++ b/res/drawable-xhdpi/ic_see_contacts_holo_dark.png diff --git a/res/drawable-xxhdpi/ic_blacklist_calls_off.png b/res/drawable-xxhdpi/ic_blacklist_calls_off.png Binary files differnew file mode 100644 index 0000000..0841442 --- /dev/null +++ b/res/drawable-xxhdpi/ic_blacklist_calls_off.png diff --git a/res/drawable-xxhdpi/ic_blacklist_calls_on.png b/res/drawable-xxhdpi/ic_blacklist_calls_on.png Binary files differnew file mode 100644 index 0000000..7f252d3 --- /dev/null +++ b/res/drawable-xxhdpi/ic_blacklist_calls_on.png diff --git a/res/drawable-xxhdpi/ic_blacklist_messages_off.png b/res/drawable-xxhdpi/ic_blacklist_messages_off.png Binary files differnew file mode 100644 index 0000000..10a07db --- /dev/null +++ b/res/drawable-xxhdpi/ic_blacklist_messages_off.png diff --git a/res/drawable-xxhdpi/ic_blacklist_messages_on.png b/res/drawable-xxhdpi/ic_blacklist_messages_on.png Binary files differnew file mode 100644 index 0000000..50dd562 --- /dev/null +++ b/res/drawable-xxhdpi/ic_blacklist_messages_on.png diff --git a/res/drawable/ic_blacklist_calls.xml b/res/drawable/ic_blacklist_calls.xml new file mode 100644 index 0000000..401fb4a --- /dev/null +++ b/res/drawable/ic_blacklist_calls.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_checked="true" android:drawable="@drawable/ic_blacklist_calls_on" /> + <item android:drawable="@drawable/ic_blacklist_calls_off" /> +</selector> + diff --git a/res/drawable/ic_blacklist_messages.xml b/res/drawable/ic_blacklist_messages.xml new file mode 100644 index 0000000..f0fafa1 --- /dev/null +++ b/res/drawable/ic_blacklist_messages.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_checked="true" android:drawable="@drawable/ic_blacklist_messages_on" /> + <item android:drawable="@drawable/ic_blacklist_messages_off" /> +</selector> + diff --git a/res/layout/blacklist_entry_row.xml b/res/layout/blacklist_entry_row.xml new file mode 100644 index 0000000..16dc1d2 --- /dev/null +++ b/res/layout/blacklist_entry_row.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="?android:attr/listPreferredItemHeight" + android:gravity="center_vertical" + android:padding="5dip" + android:orientation="horizontal" + android:descendantFocusability="blocksDescendants"> + + <LinearLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_vertical" + android:orientation="vertical" + android:paddingStart="10dip" + android:paddingEnd="10dip"> + + <TextView android:id="@+id/number" + style="?android:attr/textAppearanceMedium" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + <TextView android:id="@+id/name" + style="?android:attr/textAppearanceSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + </LinearLayout> + + <com.android.settings.blacklist.ToggleImageView + android:id="@+id/block_calls" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:src="@drawable/ic_blacklist_calls" + android:scaleType="centerInside" + android:clickable="true" + android:contentDescription="@null" /> + + <com.android.settings.blacklist.ToggleImageView + android:id="@+id/block_messages" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:src="@drawable/ic_blacklist_messages" + android:scaleType="centerInside" + android:clickable="true" + android:contentDescription="@null" /> + +</LinearLayout> diff --git a/res/layout/dialog_blacklist_edit_entry.xml b/res/layout/dialog_blacklist_edit_entry.xml new file mode 100644 index 0000000..30b7c24 --- /dev/null +++ b/res/layout/dialog_blacklist_edit_entry.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="5dip" + android:orientation="vertical"> + + <LinearLayout + android:id="@+id/number_field" + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1.0" + android:addStatesFromChildren="true" + android:gravity="center_vertical" + android:baselineAligned="false" + android:paddingStart="10dip" + android:paddingEnd="10dip"> + + <EditText android:id="@+id/number_edit" + android:layout_width="0dip" + android:layout_weight="1" + android:orientation="horizontal" + android:layout_height="wrap_content"/> + + <ImageButton android:id="@+id/select_contact" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="10dip" + android:src="@drawable/ic_see_contacts_holo_dark" + android:contentDescription="@string/select_contact" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/options_field" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1.0" + android:orientation="vertical" + android:baselineAligned="false" + android:padding="10dip" > + + <CheckBox android:id="@+id/incoming_calls" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/blacklist_policy_block_calls" + android:textAppearance="?android:attr/textAppearanceSmall" /> + + <CheckBox android:id="@+id/incoming_messages" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/blacklist_policy_block_messages" + android:textAppearance="?android:attr/textAppearanceSmall" /> + + </LinearLayout> + +</LinearLayout> diff --git a/res/menu/blacklist.xml b/res/menu/blacklist.xml new file mode 100644 index 0000000..a3d294e --- /dev/null +++ b/res/menu/blacklist.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/blacklist_add" + android:title="@string/add_blacklist_number" + android:icon="@drawable/ic_menu_add" + android:showAsAction="ifRoom|withText" /> + <item + android:id="@+id/blacklist_prefs" + android:title="@string/blacklist_prefs" + android:icon="@drawable/ic_sysbar_quicksettings" + android:showAsAction="ifRoom|withText" /> +</menu> diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml index 8aee1ff..7990443 100644 --- a/res/values/cm_arrays.xml +++ b/res/values/cm_arrays.xml @@ -406,4 +406,23 @@ <item>100</item> <item>200</item> </string-array> + + <!-- Phone blacklist management --> + <string-array name="blacklist_policy_unknown_entries" translatable="false"> + <item>@string/blacklist_policy_block_calls</item> + <item>@string/blacklist_policy_block_messages</item> + </string-array> + + <string-array name="blacklist_policy_unknown_values" translatable="false"> + <item>1</item> + <item>16</item> + </string-array> + + <string-array name="blacklist_policy_private_entries" translatable="false"> + <item>@string/blacklist_policy_block_calls</item> + </string-array> + + <string-array name="blacklist_policy_private_values" translatable="false"> + <item>1</item> + </string-array> </resources> diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index 17ef49d..9bf77af 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -732,4 +732,35 @@ <string name="block_notifications_title">Filter notifications</string> <string name="no_filters_title">No filters set</string> + <!-- Blacklist preferences --> + <string name="blacklist_title">Blacklist</string> + <string name="blacklist_edit_dialog_title">Edit blacklist entry</string> + <string name="blacklist_prefs">Settings</string> + <string name="blacklist_button_delete">Delete</string> + <string name="blacklist_empty_text">You don\'t have any blacklisted numbers. Add an entry by touching the Add (+) button.</string> + <string name="blacklist_disabled_empty_text">To blacklist calls and/or messages from certain numbers, enable the blacklist.</string> + <string name="blacklist_summary_disabled">Disabled</string> + <string name="blacklist_summary">Incoming calls and messages from phone numbers in the blacklist will be blocked</string> + <string name="blacklist_notify">Show notification</string> + <string name="blacklist_private_numbers_title">Private numbers</string> + <string name="blacklist_private_numbers_summary_disabled">Don\'t block calls from private numbers</string> + <string name="blacklist_private_numbers_summary">Block incoming <xliff:g id="type">%2$s</xliff:g> from private numbers</string> + <string name="blacklist_unknown_numbers_title">Unknown numbers</string> + <string name="blacklist_unknown_numbers_summary_disabled">Don\'t block calls or messages from numbers not in the contact list</string> + <string name="blacklist_unknown_numbers_summary">Block incoming <xliff:g id="type">%2$s</xliff:g> from numbers not in the contact list</string> + <string name="blacklist_summary_type_calls_only">calls</string> + <string name="blacklist_summary_type_messages_only">messages</string> + <string name="blacklist_summary_type_calls_and_messages">calls and messages</string> + <string name="blacklist_regex_title">Use wildcards</string> + <string name="blacklist_regex_summary">Use . as a wildcard and * for repetition. E.g. 123.* blocks numbers starting with 123 and .*123.* blocks numbers containing 123</string> + <string name="blacklist_policy_block_calls">Block incoming calls</string> + <string name="blacklist_policy_block_messages">Block incoming messages</string> + <string name="blacklist_bad_number_add">Unable to add invalid number to blacklist</string> + + <!-- Blacklist management --> + <string name="add_blacklist_number">Add number</string> + <string name="remove_blacklist_number_title">Remove number</string> + <string name="remove_blacklist_entry">Do you want to remove this blacklist entry?</string> + <string name="select_contact">Select contact</string> + </resources> diff --git a/res/xml/blacklist_prefs.xml b/res/xml/blacklist_prefs.xml new file mode 100644 index 0000000..be63b7d --- /dev/null +++ b/res/xml/blacklist_prefs.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2013 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. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + android:title="@string/blacklist_title" > + + <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference + android:key="phone_blacklist_notify_enabled" + android:title="@string/blacklist_notify" + android:defaultValue="true" /> + + <MultiSelectListPreference + android:key="button_blacklist_private_numbers" + android:title="@string/blacklist_private_numbers_title" + android:dialogTitle="@string/blacklist_private_numbers_title" + android:entries="@array/blacklist_policy_private_entries" + android:entryValues="@array/blacklist_policy_private_values" + android:persistent="false" /> + + <MultiSelectListPreference + android:key="button_blacklist_unknown_numbers" + android:title="@string/blacklist_unknown_numbers_title" + android:dialogTitle="@string/blacklist_unknown_numbers_title" + android:entries="@array/blacklist_policy_unknown_entries" + android:entryValues="@array/blacklist_policy_unknown_values" + android:persistent="false" /> + + <com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference + android:key="phone_blacklist_regex_enabled" + android:title="@string/blacklist_regex_title" + android:summary="@string/blacklist_regex_summary" /> + +</PreferenceScreen> diff --git a/res/xml/security_settings_app_cyanogenmod.xml b/res/xml/security_settings_app_cyanogenmod.xml new file mode 100644 index 0000000..a63fba6 --- /dev/null +++ b/res/xml/security_settings_app_cyanogenmod.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 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. +--> + +<PreferenceScreen + xmlns:android="http://schemas.android.com/apk/res/android"> + + <PreferenceCategory + android:key="app_security" + android:title="@string/app_security_title"> + + <PreferenceScreen + android:key="blacklist" + android:title="@string/blacklist_title" + android:fragment="com.android.settings.blacklist.BlacklistSettings" /> + + </PreferenceCategory> + +</PreferenceScreen> |