diff options
| -rw-r--r-- | core/java/android/net/INetworkStatsService.aidl | 3 | ||||
| -rw-r--r-- | core/java/android/net/TrafficStats.java | 28 | ||||
| -rw-r--r-- | core/java/android/widget/CheckedTextView.java | 2 | ||||
| -rw-r--r-- | core/res/res/values-ru/strings.xml | 2 | ||||
| -rw-r--r-- | docs/html/guide/google/gcm/gcm.jd | 27 | ||||
| -rw-r--r-- | docs/html/guide/google/gcm/index.jd | 2 | ||||
| -rw-r--r-- | services/java/com/android/server/net/NetworkStatsService.java | 8 |
7 files changed, 8 insertions, 64 deletions
diff --git a/core/java/android/net/INetworkStatsService.aidl b/core/java/android/net/INetworkStatsService.aidl index 4d46334fb33e..b7b87318554c 100644 --- a/core/java/android/net/INetworkStatsService.aidl +++ b/core/java/android/net/INetworkStatsService.aidl @@ -45,7 +45,4 @@ interface INetworkStatsService { /** Advise persistance threshold; may be overridden internally. */ void advisePersistThreshold(long thresholdBytes); - /** Adjust recorded network stats. */ - void adjustNetworkStats(int uid, int tag, long rxBytes, long rxPackets, long txBytes, long txPackets, long operationCount); - } diff --git a/core/java/android/net/TrafficStats.java b/core/java/android/net/TrafficStats.java index b66c2fe5cf8d..e437d2e3475b 100644 --- a/core/java/android/net/TrafficStats.java +++ b/core/java/android/net/TrafficStats.java @@ -88,13 +88,6 @@ public class TrafficStats { */ public static final int TAG_SYSTEM_BACKUP = 0xFFFFFF03; - /** - * Default tag value for cloud messaging traffic. - * - * @hide - */ - public static final int TAG_SYSTEM_CLOUD_MESSAGING = 0xFFFFFF04; - private static INetworkStatsService sStatsService; private synchronized static INetworkStatsService getStatsService() { @@ -253,27 +246,6 @@ public class TrafficStats { } } - /** - * Adjust network statistics for the given UID and tag by the requested - * amount. This can be used to correctly account network usage performed on - * behalf of another application. Values can be negative. - * <p> - * Requires that caller holds - * {@link android.Manifest.permission#MODIFY_NETWORK_ACCOUNTING} permission. - * - * @see #setThreadStatsUid(int) - * @hide - */ - public static void adjustNetworkStats(int uid, int tag, long rxBytes, long rxPackets, - long txBytes, long txPackets, long operationCount) { - try { - getStatsService().adjustNetworkStats( - uid, tag, rxBytes, rxPackets, txBytes, txPackets, operationCount); - } catch (RemoteException e) { - throw new RuntimeException(e); - } - } - /** {@hide} */ public static void closeQuietly(INetworkStatsSession session) { // TODO: move to NetworkStatsService once it exists diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index 7e8532460239..46079f937201 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -223,7 +223,7 @@ public class CheckedTextView extends TextView implements Checkable { final int bottom = top + height; final int left = isLayoutRtl ? getPaddingEnd() : width - getPaddingEnd(); final int right = left + mCheckMarkWidth; - checkMarkDrawable.setBounds(left, top, right, bottom); + checkMarkDrawable.setBounds( left, top, right, bottom); checkMarkDrawable.draw(canvas); } } diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 270998f5d87e..50670fe6758a 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -699,7 +699,7 @@ <string name="lockscreen_emergency_call" msgid="5347633784401285225">"Экстренный вызов"</string> <string name="lockscreen_return_to_call" msgid="5244259785500040021">"Вернуться к вызову"</string> <string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Правильно!"</string> - <string name="lockscreen_pattern_wrong" msgid="4317955014948108794">"Повторите попытку"</string> + <string name="lockscreen_pattern_wrong" msgid="4317955014948108794">"Повторить попытку"</string> <string name="lockscreen_password_wrong" msgid="5737815393253165301">"Повторить попытку"</string> <string name="faceunlock_multiple_failures" msgid="754137583022792429">"Все попытки войти с помощью Фейсконтроля использованы"</string> <string name="lockscreen_plugged_in" msgid="8057762828355572315">"Идет зарядка (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string> diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd index 0b05c5358bf0..1b95520bf78f 100644 --- a/docs/html/guide/google/gcm/gcm.jd +++ b/docs/html/guide/google/gcm/gcm.jd @@ -56,7 +56,7 @@ page.title=GCM Architectural Overview </div> </div> -<p>Google Cloud Messaging for Android (GCM) is a free service that helps +<p>Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p> @@ -545,8 +545,7 @@ private void handleRegistration(Intent intent) { <p>The <code>com.google.android.c2dm.intent.RECEIVE</code> intent is used by GCM to deliver the messages sent by the 3rd-party server to the application running in the device. If the server included key-pair values in the <code>data</code> parameter, they are available as -extras in this intent, with the keys being the extra names. GCM also includes an extra called -<code>from</code> which contains the sender ID as an string. +extras in this intent, with the keys being the extra names. <p>Here is an example, again using the <code>MyIntentReceiver</code> class:</p> @@ -653,7 +652,7 @@ message sent by the application server. See <a href="adv.html#collapsible">Advan <td><code>data</code></td> <td>A JSON object whose fields represents the key-value pairs of the message's payload data. If present, the payload data it will be included in the Intent as application data, with the key being the extra's name. For instance, <code>"data":{"score":"3x1"}</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. -There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). Note that the values <em>must be enclosed by strings</em>. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Also note that the key cannot be a reserved word ("from" or any word starting with "google."). Optional.</td> +There is no limit on the number of key/value pairs, though there is a limit on the total size of the message (4kb). Note that the values <em>must be enclosed by strings</em>. If you want to include objects or other non-string data types (such as integers or booleans), you have to do the conversion to string yourself. Optional.</td> </tr> <tr> <td><code>delay_while_idle</code></td> @@ -684,7 +683,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool </tr> <tr> <td><code>data.<key></code></td> - <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Note that the key cannot be a reserved word ("from" or any word starting with "google."). Optional.</td> + <td>Payload data, expressed as parameters prefixed with <code>data.</code> and suffixed as the key. For instance, a parameter of <code>data.score=3x1</code> would result in an intent extra named <code>score</code> whose value is the string <code>3x1</code>. There is no limit on the number of key/value parameters, though there is a limit on the total size of the message. Optional.</td> </tr> <tr> <td><code>delay_while_idle</code></td> @@ -880,20 +879,8 @@ messages. <li>Request originated from a server not whitelisted in the Server Key IPs.</li> </ul> -Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project. You can check the validity of your API key by running the following command:<br/> +Check that the token you're sending inside the <code>Authorization</code> header is the correct API key associated with your project.<br/> -<pre># api_key=YOUR_API_KEY - -# curl --header "Authorization: key=$api_key" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"ABC\"]}"</pre> - - -If you receive a 401 HTTP status code, your API key is not valid. Otherwise you should see something like this:<br/> - -<pre> -{"multicast_id":6782339717028231855,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]} -</pre> -If you want to confirm the validity of a registration ID, you can do so by replacing "ABC" with the registration ID. -<br/> Happens when the HTTP status code is 401. <dt id="timeout"><strong>Timeout</strong></dt> @@ -987,7 +974,7 @@ registration_id=32 <p>To view statistics and any error messages for your GCM applications:</p> <ol> - <li> Go to the <code><a href="http://play.google.com/apps/publish">Android Developer Console</a></code>.</li> + <li> Go to <code><a href="http://play.google.com/apps/publish">play.google.com/apps/publish</a></code>.</li> <li>Login with your developer account. <p>You will see a page that has a list of all of your apps.</p></li> <li> Click on the "statistics" link next to the app for which you want to view GCM stats. @@ -995,8 +982,6 @@ registration_id=32 <li>Go to the drop-down menu and select the GCM metric you want to view. </li> </ol> -<p class="note"><strong>Note:</strong> Stats on the Google API Console are not enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Android Developer Console</a>.</p> - <h2 id="example">Examples</h2> <p>See the <a href="demo.html">GCM Demo Application</a> document.</p> diff --git a/docs/html/guide/google/gcm/index.jd b/docs/html/guide/google/gcm/index.jd index 8079ebae6e2c..140b0762967a 100644 --- a/docs/html/guide/google/gcm/index.jd +++ b/docs/html/guide/google/gcm/index.jd @@ -5,8 +5,6 @@ page.title=Google Cloud Messaging for Android <p><img src="{@docRoot}images/gcm/gcm-logo.png" /></p> <p>Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.</p> -<p>GCM is completely free no matter how big your messaging needs are, and there are no quotas.</p> - <p>To learn more about GCM, you can join the <a href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a> and read the following documents:</p> <dl> diff --git a/services/java/com/android/server/net/NetworkStatsService.java b/services/java/com/android/server/net/NetworkStatsService.java index 373576bd8ddd..ba122ecdf231 100644 --- a/services/java/com/android/server/net/NetworkStatsService.java +++ b/services/java/com/android/server/net/NetworkStatsService.java @@ -695,14 +695,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub { mGlobalAlertBytes = mSettings.getGlobalAlertBytes(mPersistThreshold); } - @Override - public void adjustNetworkStats(int uid, int tag, long rxBytes, long rxPackets, long txBytes, - long txPackets, long operationCount) { - mContext.enforceCallingOrSelfPermission(MODIFY_NETWORK_ACCOUNTING, TAG); - - // TODO: store adjusted network stats in separate data structure - } - /** * Receiver that watches for {@link IConnectivityManager} to claim network * interfaces. Used to associate {@link TelephonyManager#getSubscriberId()} |