Merge "Add support for per-package policy for sending premium SMS." into jb-mr1-dev
This commit is contained in:
@@ -3236,7 +3236,7 @@ public final class Settings {
|
||||
public static final String DISPLAY_DENSITY_FORCED = Global.DISPLAY_DENSITY_FORCED;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link android.provider.Settings.Global#ASSISTED_GPS_ENABLE} instead
|
||||
* @deprecated Use {@link android.provider.Settings.Global#ASSISTED_GPS_ENABLED} instead
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -4345,21 +4345,18 @@ public final class Settings {
|
||||
"sync_max_retry_delay_in_seconds";
|
||||
|
||||
/**
|
||||
* The interval in milliseconds at which to check the number of SMS sent
|
||||
* out without asking for use permit, to limit the un-authorized SMS
|
||||
* usage.
|
||||
* @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_INTERVAL_MS} instead.
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
|
||||
"sms_outgoing_check_interval_ms";
|
||||
Global.SMS_OUTGOING_CHECK_INTERVAL_MS;
|
||||
|
||||
/**
|
||||
* The number of outgoing SMS sent without asking for user permit
|
||||
* (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS}
|
||||
* @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_MAX_COUNT} instead.
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
|
||||
"sms_outgoing_check_max_count";
|
||||
Global.SMS_OUTGOING_CHECK_MAX_COUNT;
|
||||
|
||||
/**
|
||||
* The global search provider chosen by the user (if multiple global
|
||||
@@ -4860,13 +4857,6 @@ public final class Settings {
|
||||
public static final String CONTACTS_PREAUTH_URI_EXPIRATION =
|
||||
"contacts_preauth_uri_expiration";
|
||||
|
||||
/**
|
||||
* Prefix for SMS short code regex patterns (country code is appended).
|
||||
* @see com.android.internal.telephony.SmsUsageMonitor
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_SHORT_CODES_PREFIX = "sms_short_codes_";
|
||||
|
||||
/**
|
||||
* Overlay display devices setting.
|
||||
* The associated value is a specially formatted string that describes the
|
||||
@@ -5426,6 +5416,38 @@ public final class Settings {
|
||||
public static final String SETUP_PREPAID_DETECTION_REDIR_HOST =
|
||||
"setup_prepaid_detection_redir_host";
|
||||
|
||||
/**
|
||||
* The interval in milliseconds at which to check the number of SMS sent out without asking
|
||||
* for use permit, to limit the un-authorized SMS usage.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
|
||||
"sms_outgoing_check_interval_ms";
|
||||
|
||||
/**
|
||||
* The number of outgoing SMS sent without asking for user permit (of {@link
|
||||
* #SMS_OUTGOING_CHECK_INTERVAL_MS}
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
|
||||
"sms_outgoing_check_max_count";
|
||||
|
||||
/**
|
||||
* Used to disable SMS short code confirmation - defaults to true.
|
||||
* @see com.android.internal.telephony.SmsUsageMonitor
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_SHORT_CODE_CONFIRMATION = "sms_short_code_confirmation";
|
||||
|
||||
/**
|
||||
* Prefix for SMS short code regex patterns (country code is appended).
|
||||
* @see com.android.internal.telephony.SmsUsageMonitor
|
||||
* @hide
|
||||
*/
|
||||
public static final String SMS_SHORT_CODES_PREFIX = "sms_short_codes_";
|
||||
|
||||
/**
|
||||
* Used to disable Tethering on a device - defaults to true
|
||||
* @hide
|
||||
|
||||
61
core/res/res/layout/sms_short_code_confirmation_dialog.xml
Normal file
61
core/res/res/layout/sms_short_code_confirmation_dialog.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2012 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:id="@+id/parentPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="8dip"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView android:id="@+id/sms_short_code_confirm_message"
|
||||
style="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip"
|
||||
android:paddingTop="8dip"
|
||||
android:paddingBottom="8dip"/>
|
||||
|
||||
<LinearLayout android:id="@+id/sms_short_code_detail_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/alert_dialog_title_height"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip">
|
||||
<ImageView android:id="@+id/sms_short_code_coins_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="8dip"
|
||||
android:src="@null" />
|
||||
<TextView android:id="@+id/sms_short_code_detail_message"
|
||||
style="?android:attr/textAppearanceMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<CheckBox android:id="@+id/sms_short_code_remember_choice_checkbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sms_short_code_remember_choice" />
|
||||
</LinearLayout>
|
||||
@@ -3089,20 +3089,22 @@
|
||||
<string name="sms_control_no">Deny</string>
|
||||
|
||||
<!-- SMS short code verification dialog. --> <skip />
|
||||
<!-- The dialog title for the SMS short code confirmation dialog. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_title">Send SMS to short code?</string>
|
||||
<!-- The dialog title for the SMS premium short code confirmation dialog. [CHAR LIMIT=30] -->
|
||||
<string name="sms_premium_short_code_confirm_title">Send premium SMS?</string>
|
||||
<!-- The message text for the SMS short code confirmation dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="sms_short_code_confirm_message"><b><xliff:g id="app_name">%1$s</xliff:g></b> would like to send a text message to <b><xliff:g id="dest_address">%2$s</xliff:g></b>, which appears to be an SMS short code.<p>Sending text messages to some short codes may cause your mobile account to be billed for premium services.<p>Do you want to allow this app to send the message?</string>
|
||||
<!-- The message text for the SMS short code confirmation dialog. [CHAR LIMIT=NONE] -->
|
||||
<string name="sms_premium_short_code_confirm_message"><b><xliff:g id="app_name">%1$s</xliff:g></b> would like to send a text message to <b><xliff:g id="dest_address">%2$s</xliff:g></b>, which is a premium SMS short code.<p><b>Sending a message to this destination will cause your mobile account to be billed for premium services.</b><p>Do you want to allow this app to send the message?</string>
|
||||
<!-- Text of the approval button for the SMS short code confirmation dialog. [CHAR LIMIT=50] -->
|
||||
<string name="sms_short_code_confirm_allow">Send message</string>
|
||||
<string name="sms_short_code_confirm_message"><b><xliff:g id="app_name">%1$s</xliff:g></b> would like to send a message to <b><xliff:g id="dest_address">%2$s</xliff:g></b>.</string>
|
||||
<!-- Message details for the SMS short code confirmation dialog (possible premium short code). [CHAR LIMIT=NONE] -->
|
||||
<string name="sms_short_code_details">This may cause charges on your mobile account.</string>
|
||||
<!-- Message details for the SMS short code confirmation dialog (premium short code). [CHAR LIMIT=NONE] -->
|
||||
<string name="sms_premium_short_code_details">This will cause charges on your mobile account.</string>
|
||||
<!-- Text of the approval button for the SMS short code confirmation dialog. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_allow">Send</string>
|
||||
<!-- Text of the cancel button for the SMS short code confirmation dialog. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_deny">Don\'t send</string>
|
||||
<!-- Text of the button for the SMS short code confirmation dialog to report a malicious app. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_report">Report malicious app</string>
|
||||
<string name="sms_short_code_confirm_deny">Cancel</string>
|
||||
<!-- Text of the checkbox for the SMS short code confirmation dialog to remember the user's choice. [CHAR LIMIT=40] -->
|
||||
<string name="sms_short_code_remember_choice">Remember my choice</string>
|
||||
<!-- Text of the approval button for the SMS short code confirmation dialog when checkbox is checked. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_always_allow">Always Allow</string>
|
||||
<!-- Text of the cancel button for the SMS short code confirmation dialog when checkbox is checked. [CHAR LIMIT=30] -->
|
||||
<string name="sms_short_code_confirm_never_allow">Never Allow</string>
|
||||
|
||||
<!-- SIM swap and device reboot Dialog --> <skip />
|
||||
<!-- See SIM_REMOVED_DIALOG. This is the title of that dialog. -->
|
||||
|
||||
@@ -211,6 +211,10 @@
|
||||
<java-symbol type="id" name="status_bar_latest_event_content" />
|
||||
<java-symbol type="id" name="action_divider" />
|
||||
<java-symbol type="id" name="overflow_divider" />
|
||||
<java-symbol type="id" name="sms_short_code_confirm_message" />
|
||||
<java-symbol type="id" name="sms_short_code_detail_layout" />
|
||||
<java-symbol type="id" name="sms_short_code_detail_message" />
|
||||
<java-symbol type="id" name="sms_short_code_remember_choice_checkbox" />
|
||||
|
||||
<java-symbol type="attr" name="actionModeShareDrawable" />
|
||||
<java-symbol type="attr" name="alertDialogCenterButtons" />
|
||||
@@ -739,13 +743,13 @@
|
||||
<java-symbol type="string" name="sms_control_title" />
|
||||
<java-symbol type="string" name="sms_control_no" />
|
||||
<java-symbol type="string" name="sms_control_yes" />
|
||||
<java-symbol type="string" name="sms_premium_short_code_confirm_message" />
|
||||
<java-symbol type="string" name="sms_premium_short_code_confirm_title" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_allow" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_deny" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_always_allow" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_never_allow" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_message" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_report" />
|
||||
<java-symbol type="string" name="sms_short_code_confirm_title" />
|
||||
<java-symbol type="string" name="sms_short_code_details" />
|
||||
<java-symbol type="string" name="sms_premium_short_code_details" />
|
||||
<java-symbol type="string" name="submit" />
|
||||
<java-symbol type="string" name="sync_binding_label" />
|
||||
<java-symbol type="string" name="sync_do_nothing" />
|
||||
@@ -1051,6 +1055,7 @@
|
||||
<java-symbol type="layout" name="notification_template_inbox" />
|
||||
<java-symbol type="layout" name="keyguard_multi_user_avatar" />
|
||||
<java-symbol type="layout" name="keyguard_multi_user_selector_widget" />
|
||||
<java-symbol type="layout" name="sms_short_code_confirmation_dialog" />
|
||||
|
||||
<java-symbol type="anim" name="slide_in_child_bottom" />
|
||||
<java-symbol type="anim" name="slide_in_right" />
|
||||
|
||||
Reference in New Issue
Block a user