summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk29
-rw-r--r--core/java/android/annotation/PrivateApi.java31
-rw-r--r--core/java/android/app/WallpaperManager.java66
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java205
-rw-r--r--core/java/android/bluetooth/BluetoothAdvScanData.java7
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java9
-rw-r--r--core/java/android/bluetooth/IBluetoothGattCallback.aidl1
-rw-r--r--core/java/android/net/MobileDataStateTracker.java11
-rw-r--r--core/java/android/net/nsd/NsdManager.java47
-rw-r--r--core/java/android/os/INetworkManagementService.aidl2
-rw-r--r--core/java/android/view/View.java2
-rw-r--r--core/jni/android/graphics/Paint.cpp3
-rw-r--r--core/res/AndroidManifest.xml2
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_disabled_holo_dark.pngbin549 -> 543 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_disabled_holo_light.pngbin537 -> 561 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_off_holo_dark.pngbin588 -> 497 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_off_holo_light.pngbin573 -> 637 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_0_holo_dark.pngbin616 -> 543 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_0_holo_light.pngbin606 -> 581 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_1_holo_dark.pngbin599 -> 565 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_1_holo_light.pngbin590 -> 599 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_2_holo_dark.pngbin618 -> 568 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_2_holo_light.pngbin593 -> 622 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_holo_dark.pngbin583 -> 551 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_media_route_on_holo_light.pngbin583 -> 699 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_notification_cast_0.pngbin448 -> 471 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_notification_cast_1.pngbin457 -> 473 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_notification_cast_2.pngbin465 -> 472 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_notification_cast_on.pngbin414 -> 470 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_disabled_holo_dark.pngbin388 -> 353 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_disabled_holo_light.pngbin388 -> 380 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_off_holo_dark.pngbin400 -> 379 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_off_holo_light.pngbin394 -> 401 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_0_holo_dark.pngbin429 -> 373 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_0_holo_light.pngbin440 -> 398 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_1_holo_dark.pngbin417 -> 388 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_1_holo_light.pngbin410 -> 401 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_2_holo_dark.pngbin430 -> 383 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_2_holo_light.pngbin424 -> 399 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_holo_dark.pngbin399 -> 402 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_media_route_on_holo_light.pngbin399 -> 438 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_notification_cast_0.pngbin332 -> 329 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_notification_cast_1.pngbin329 -> 330 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_notification_cast_2.pngbin326 -> 351 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_notification_cast_on.pngbin305 -> 342 bytes
-rw-r--r--core/res/res/drawable-xhdpi/cab_background_top_holo_dark.9.pngbin174 -> 1125 bytes
-rw-r--r--core/res/res/drawable-xhdpi/cab_background_top_holo_light.9.pngbin161 -> 1121 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_dark.pngbin709 -> 677 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_light.pngbin702 -> 689 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_off_holo_dark.pngbin759 -> 684 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_off_holo_light.pngbin745 -> 787 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_dark.pngbin807 -> 675 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_light.pngbin806 -> 721 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_dark.pngbin772 -> 698 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_light.pngbin766 -> 719 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_dark.pngbin804 -> 712 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_light.pngbin778 -> 790 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_holo_dark.pngbin746 -> 686 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_media_route_on_holo_light.pngbin749 -> 857 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_notification_cast_0.pngbin557 -> 582 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_notification_cast_1.pngbin585 -> 607 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_notification_cast_2.pngbin589 -> 610 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_notification_cast_on.pngbin555 -> 596 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/cab_background_top_holo_dark.9.pngbin1155 -> 1162 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/cab_background_top_holo_light.9.pngbin1152 -> 1158 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_dark.pngbin1071 -> 1000 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_light.pngbin1053 -> 1033 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_off_holo_dark.pngbin1130 -> 1067 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_off_holo_light.pngbin1108 -> 1130 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_dark.pngbin1183 -> 1014 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_light.pngbin1180 -> 1062 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_dark.pngbin1145 -> 1043 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_light.pngbin1150 -> 1093 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_dark.pngbin1187 -> 1026 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_light.pngbin1168 -> 1110 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_holo_dark.pngbin1102 -> 1148 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_media_route_on_holo_light.pngbin1108 -> 1271 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_notification_cast_0.pngbin812 -> 853 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_notification_cast_1.pngbin847 -> 868 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_notification_cast_2.pngbin827 -> 867 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/ic_notification_cast_on.pngbin768 -> 934 bytes
-rw-r--r--core/res/res/values-ca/strings.xml2
-rw-r--r--core/res/res/values-da/strings.xml20
-rw-r--r--core/res/res/values-el/strings.xml6
-rw-r--r--core/res/res/values-fr/strings.xml4
-rw-r--r--core/res/res/values-in/strings.xml2
-rw-r--r--core/res/res/values-it/strings.xml2
-rw-r--r--core/res/res/values-iw/strings.xml4
-rw-r--r--core/res/res/values-nl/strings.xml4
-rw-r--r--core/res/res/values-pl/strings.xml2
-rw-r--r--core/res/res/values-ru/strings.xml2
-rw-r--r--core/res/res/values-sk/strings.xml34
-rw-r--r--core/res/res/values-sw/strings.xml4
-rw-r--r--core/res/res/values-th/strings.xml2
-rw-r--r--core/res/res/values-tr/strings.xml2
-rw-r--r--core/res/res/values-uk/strings.xml2
-rw-r--r--core/res/res/values-zh-rCN/strings.xml8
-rw-r--r--core/res/res/values/config.xml4
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java33
-rw-r--r--graphics/java/android/graphics/Bitmap.java18
-rw-r--r--libs/hwui/Program.cpp3
-rw-r--r--libs/hwui/Program.h1
-rw-r--r--media/java/android/media/MediaPlayer.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java1
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_cast_available.pngbin1325 -> 1324 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connected.pngbin1277 -> 1395 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.pngbin1275 -> 1256 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.pngbin1288 -> 1280 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.pngbin1301 -> 1290 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_cast_available.pngbin933 -> 959 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connected.pngbin942 -> 1012 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.pngbin921 -> 917 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.pngbin949 -> 937 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.pngbin958 -> 951 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_available.pngbin796 -> 855 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connected.pngbin742 -> 802 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.pngbin743 -> 738 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.pngbin765 -> 782 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.pngbin812 -> 782 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_available.pngbin1202 -> 1326 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connected.pngbin1169 -> 1355 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.pngbin1139 -> 1135 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.pngbin1159 -> 1182 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.pngbin1197 -> 1170 bytes
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java117
-rw-r--r--packages/WallpaperCropper/res/layout/actionbar_set_wallpaper.xml1
-rw-r--r--packages/WallpaperCropper/res/values/config.xml3
-rw-r--r--packages/WallpaperCropper/src/com/android/wallpapercropper/CropView.java3
-rw-r--r--packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java68
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java14
-rw-r--r--services/java/com/android/server/ConnectivityService.java41
-rw-r--r--services/java/com/android/server/NetworkManagementService.java4
-rw-r--r--services/java/com/android/server/NotificationManagerService.java37
-rw-r--r--services/java/com/android/server/am/ActivityStackSupervisor.java2
-rw-r--r--services/java/com/android/server/am/TaskRecord.java2
-rw-r--r--services/java/com/android/server/connectivity/Vpn.java77
-rw-r--r--services/java/com/android/server/content/SyncManager.java2
-rw-r--r--services/java/com/android/server/content/SyncOperation.java50
-rw-r--r--services/java/com/android/server/content/SyncQueue.java6
-rw-r--r--services/java/com/android/server/content/SyncStorageEngine.java2
-rw-r--r--services/java/com/android/server/usb/UsbDeviceManager.java28
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java40
-rw-r--r--services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java11
-rw-r--r--telephony/java/android/telephony/CallStateListener.java36
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java432
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl50
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephonyListener.aidl27
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java11
149 files changed, 1235 insertions, 407 deletions
diff --git a/Android.mk b/Android.mk
index b0a27e41ab4d..bcfc2406d74e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -264,8 +264,9 @@ LOCAL_SRC_FILES += \
telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \
telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \
telephony/java/com/android/internal/telephony/ITelephony.aidl \
- telephony/java/com/android/internal/telephony/ISms.aidl \
+ telephony/java/com/android/internal/telephony/ITelephonyListener.aidl \
telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
+ telephony/java/com/android/internal/telephony/ISms.aidl \
telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
wifi/java/android/net/wifi/IWifiManager.aidl \
wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
@@ -755,6 +756,32 @@ $(full_target): $(framework_built) $(gen)
$(INTERNAL_PLATFORM_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
+# ==== the private api stubs ===================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES)
+LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES)
+LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES)
+LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS)
+LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
+LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR)
+LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
+
+LOCAL_MODULE := private-api-stubs
+
+LOCAL_DROIDDOC_OPTIONS:=\
+ $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+ -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android_private_stubs_current_intermediates/src \
+ -showAnnotation android.annotation.PrivateApi \
+ -nodocs
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
+
+LOCAL_UNINSTALLABLE_MODULE := true
+
+include $(BUILD_DROIDDOC)
+
# ==== check javadoc comments but don't generate docs ========
include $(CLEAR_VARS)
diff --git a/core/java/android/annotation/PrivateApi.java b/core/java/android/annotation/PrivateApi.java
new file mode 100644
index 000000000000..985eafec5d33
--- /dev/null
+++ b/core/java/android/annotation/PrivateApi.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2008 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.
+ */
+
+package android.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Indicates an API is exposed for use by bundled applications.
+ * <p>
+ * These APIs are not guaranteed to remain consistent release-to-release,
+ * and are not for use by apps linking against the SDK.
+ * @hide
+ */
+@Retention(RetentionPolicy.SOURCE)
+public @interface PrivateApi {
+}
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index ced72f80a029..f291e8298bc1 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -45,9 +45,7 @@ import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.util.DisplayMetrics;
import android.util.Log;
-import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import java.io.BufferedInputStream;
@@ -294,9 +292,8 @@ public class WallpaperManager {
try {
BitmapFactory.Options options = new BitmapFactory.Options();
- Bitmap bm = BitmapFactory.decodeFileDescriptor(
+ return BitmapFactory.decodeFileDescriptor(
fd.getFileDescriptor(), null, options);
- return generateBitmap(context, bm, width, height);
} catch (OutOfMemoryError e) {
Log.w(TAG, "Can't decode file", e);
} finally {
@@ -323,8 +320,7 @@ public class WallpaperManager {
try {
BitmapFactory.Options options = new BitmapFactory.Options();
- Bitmap bm = BitmapFactory.decodeStream(is, null, options);
- return generateBitmap(context, bm, width, height);
+ return BitmapFactory.decodeStream(is, null, options);
} catch (OutOfMemoryError e) {
Log.w(TAG, "Can't decode stream", e);
} finally {
@@ -1029,62 +1025,4 @@ public class WallpaperManager {
public void clear() throws IOException {
setResource(com.android.internal.R.drawable.default_wallpaper);
}
-
- static Bitmap generateBitmap(Context context, Bitmap bm, int width, int height) {
- if (bm == null) {
- return null;
- }
-
- WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
- DisplayMetrics metrics = new DisplayMetrics();
- wm.getDefaultDisplay().getMetrics(metrics);
- bm.setDensity(metrics.noncompatDensityDpi);
-
- if (width <= 0 || height <= 0
- || (bm.getWidth() == width && bm.getHeight() == height)) {
- return bm;
- }
-
- // This is the final bitmap we want to return.
- try {
- Bitmap newbm = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- newbm.setDensity(metrics.noncompatDensityDpi);
-
- Canvas c = new Canvas(newbm);
- Rect targetRect = new Rect();
- targetRect.right = bm.getWidth();
- targetRect.bottom = bm.getHeight();
-
- int deltaw = width - targetRect.right;
- int deltah = height - targetRect.bottom;
-
- if (deltaw > 0 || deltah > 0) {
- // We need to scale up so it covers the entire area.
- float scale;
- if (deltaw > deltah) {
- scale = width / (float)targetRect.right;
- } else {
- scale = height / (float)targetRect.bottom;
- }
- targetRect.right = (int)(targetRect.right*scale);
- targetRect.bottom = (int)(targetRect.bottom*scale);
- deltaw = width - targetRect.right;
- deltah = height - targetRect.bottom;
- }
-
- targetRect.offset(deltaw/2, deltah/2);
-
- Paint paint = new Paint();
- paint.setFilterBitmap(true);
- paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
- c.drawBitmap(bm, null, targetRect, paint);
-
- bm.recycle();
- c.setBitmap(null);
- return newbm;
- } catch (OutOfMemoryError e) {
- Log.w(TAG, "Can't generate default bitmap", e);
- return bm;
- }
- }
}
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index d1f1f2af44c9..75b007c75ce3 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -20,7 +20,9 @@ import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
import android.os.Binder;
+import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.Message;
import android.os.ParcelUuid;
import android.os.RemoteException;
@@ -183,43 +185,6 @@ public final class BluetoothAdapter {
"android.bluetooth.adapter.extra.DISCOVERABLE_DURATION";
/**
- * Activity Action: Show a system activity to request BLE advertising.<br>
- * If the device is not doing BLE advertising, this activity will start BLE advertising for the
- * device, otherwise it will continue BLE advertising using the current
- * {@link BluetoothAdvScanData}. <br>
- * Note this activity will also request the user to turn on Bluetooth if it's not currently
- * enabled.
- * @hide
- */
- @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
- public static final String ACTION_START_ADVERTISING =
- "android.bluetooth.adapter.action.START_ADVERTISING";
-
- /**
- * Activity Action: Stop the current BLE advertising.
- * @hide
- */
- @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
- public static final String ACTION_STOP_ADVERTISING =
- "android.bluetooth.adapter.action.STOP_ADVERTISING";
-
- /**
- * Broadcast Action: Indicate BLE Advertising is started.
- * @hide
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_BLUETOOTH_ADVERTISING_STARTED =
- "android.bluetooth.adapter.action.ADVERTISING_STARTED";
-
- /**
- * Broadcast Action: Indicated BLE Advertising is stopped.
- * @hide
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_BLUETOOTH_ADVERTISING_STOPPED =
- "android.bluetooth.adapter.action.ADVERTISING_STOPPED";
-
- /**
* Activity Action: Show a system activity that allows the user to turn on
* Bluetooth.
* <p>This system activity will return once Bluetooth has completed turning
@@ -251,6 +216,22 @@ public final class BluetoothAdapter {
"android.bluetooth.adapter.action.SCAN_MODE_CHANGED";
/**
+ * Broadcast Action: Indicate BLE Advertising is started.
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_BLUETOOTH_ADVERTISING_STARTED =
+ "android.bluetooth.adapter.action.ADVERTISING_STARTED";
+
+ /**
+ * Broadcast Action: Indicated BLE Advertising is stopped.
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_BLUETOOTH_ADVERTISING_STOPPED =
+ "android.bluetooth.adapter.action.ADVERTISING_STOPPED";
+
+ /**
* Used as an int extra field in {@link #ACTION_SCAN_MODE_CHANGED}
* intents to request the current scan mode. Possible values are:
* {@link #SCAN_MODE_NONE},
@@ -386,9 +367,27 @@ public final class BluetoothAdapter {
/** The profile is in disconnecting state */
public static final int STATE_DISCONNECTING = 3;
+ /** States for Bluetooth LE advertising */
+ /** @hide */
+ public static final int STATE_ADVERTISE_STARTING = 0;
+ /** @hide */
+ public static final int STATE_ADVERTISE_STARTED = 1;
+ /** @hide */
+ public static final int STATE_ADVERTISE_STOPPING = 2;
+ /** @hide */
+ public static final int STATE_ADVERTISE_STOPPED = 3;
+ /**
+ * Force stopping advertising without callback in case the advertising app dies.
+ * @hide
+ */
+ public static final int STATE_ADVERTISE_FORCE_STOPPING = 4;
+
/** @hide */
public static final String BLUETOOTH_MANAGER_SERVICE = "bluetooth_manager";
+ /** @hide */
+ public static final int ADVERTISE_CALLBACK_SUCCESS = 0;
+
private static final int ADDRESS_LENGTH = 17;
/**
@@ -402,7 +401,9 @@ public final class BluetoothAdapter {
private final Map<LeScanCallback, GattCallbackWrapper> mLeScanClients;
private BluetoothAdvScanData mBluetoothAdvScanData = null;
- private GattCallbackWrapper mAdvertisingCallback;
+ private GattCallbackWrapper mAdvertisingGattCallback;
+ private final Handler mHandler; // Handler to post the advertise callback to run on main thread.
+ private final Object mLock = new Object();
/**
* Get a handle to the default local Bluetooth adapter.
@@ -438,6 +439,7 @@ public final class BluetoothAdapter {
} catch (RemoteException e) {Log.e(TAG, "", e);}
mManagerService = managerService;
mLeScanClients = new HashMap<LeScanCallback, GattCallbackWrapper>();
+ mHandler = new Handler(Looper.getMainLooper());
}
/**
@@ -477,6 +479,7 @@ public final class BluetoothAdapter {
/**
* Returns a {@link BluetoothAdvScanData} object representing advertising data.
+ * Data will be reset when bluetooth service is turned off.
* @hide
*/
public BluetoothAdvScanData getAdvScanData() {
@@ -497,19 +500,34 @@ public final class BluetoothAdapter {
}
}
+ /**
+ * Interface for BLE advertising callback.
+ *
+ * @hide
+ */
+ public interface AdvertiseCallback {
+ /**
+ * Callback when advertise starts.
+ * @param status - {@link #ADVERTISE_CALLBACK_SUCCESS} for success, others for failure.
+ */
+ void onAdvertiseStart(int status);
+ /**
+ * Callback when advertise stops.
+ * @param status - {@link #ADVERTISE_CALLBACK_SUCCESS} for success, others for failure.
+ */
+ void onAdvertiseStop(int status);
+ }
/**
* Start BLE advertising using current {@link BluetoothAdvScanData}.
- * An app should start advertising by requesting
- * {@link BluetoothAdapter#ACTION_START_ADVERTISING} instead of calling this method directly.
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}
*
- * @return true if BLE avertising succeeds, false otherwise.
+ * @param callback - {@link AdvertiseCallback}
+ * @return true if BLE advertising succeeds, false otherwise.
* @hide
*/
- public boolean startAdvertising() {
+ public boolean startAdvertising(final AdvertiseCallback callback) {
if (getState() != STATE_ON) return false;
-
try {
IBluetoothGatt iGatt = mManagerService.getBluetoothGatt();
if (iGatt == null) {
@@ -519,18 +537,31 @@ public final class BluetoothAdapter {
// Restart/reset advertising packets if advertising is in progress.
if (isAdvertising()) {
// Invalid advertising callback.
- if (mAdvertisingCallback == null || mAdvertisingCallback.mLeHandle == -1) {
+ if (mAdvertisingGattCallback == null || mAdvertisingGattCallback.mLeHandle == -1) {
Log.e(TAG, "failed to restart advertising, invalid callback");
return false;
}
- iGatt.startAdvertising(mAdvertisingCallback.mLeHandle);
+ iGatt.startAdvertising(mAdvertisingGattCallback.mLeHandle);
+ // Run the callback from main thread.
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ // callback with status success.
+ callback.onAdvertiseStart(ADVERTISE_CALLBACK_SUCCESS);
+ }
+ });
return true;
}
UUID uuid = UUID.randomUUID();
GattCallbackWrapper wrapper =
- new GattCallbackWrapper(this, null, null, GattCallbackWrapper.CALLBACK_TYPE_ADV);
+ new GattCallbackWrapper(this, null, null, callback);
iGatt.registerClient(new ParcelUuid(uuid), wrapper);
- mAdvertisingCallback = wrapper;
+ if (!wrapper.advertiseStarted()) {
+ return false;
+ }
+ synchronized (mLock) {
+ mAdvertisingGattCallback = wrapper;
+ }
return true;
} catch (RemoteException e) {
Log.e(TAG, "", e);
@@ -540,25 +571,28 @@ public final class BluetoothAdapter {
/**
* Stop BLE advertising.
- * An app should stop advertising by requesting
- * {@link BluetoothAdapter#ACTION_STOP_ADVERTISING} instead of calling this method directly.
- * <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}
+ *
+ * @param callback - {@link AdvertiseCallback}
* @return true if BLE advertising stops, false otherwise.
* @hide
*/
- public boolean stopAdvertisting() {
+ public boolean stopAdvertising(AdvertiseCallback callback) {
try {
IBluetoothGatt iGatt = mManagerService.getBluetoothGatt();
if (iGatt == null) {
// BLE is not supported
return false;
}
- if (mAdvertisingCallback == null) {
+ if (mAdvertisingGattCallback == null) {
// no callback.
return false;
}
- mAdvertisingCallback.stopAdvertising();
- mAdvertisingCallback = null;
+ // Make sure same callback is used for start and stop advertising.
+ if (callback != mAdvertisingGattCallback.mAdvertiseCallback) {
+ Log.e(TAG, "must use the same callback for star/stop advertising");
+ return false;
+ }
+ mAdvertisingGattCallback.stopAdvertising();
return true;
} catch (RemoteException e) {
Log.e(TAG, "", e);
@@ -1418,6 +1452,8 @@ public final class BluetoothAdapter {
if (VDBG) Log.d(TAG, "onBluetoothServiceDown: " + mService);
synchronized (mManagerCallback) {
mService = null;
+ // Reset bluetooth adv scan data when Gatt service is down.
+ mBluetoothAdvScanData = null;
for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){
try {
if (cb != null) {
@@ -1692,11 +1728,9 @@ public final class BluetoothAdapter {
private static class GattCallbackWrapper extends IBluetoothGattCallback.Stub {
private static final int LE_CALLBACK_REG_TIMEOUT = 2000;
private static final int LE_CALLBACK_REG_WAIT_COUNT = 5;
- private static final int CALLBACK_TYPE_SCAN = 0;
- private static final int CALLBACK_TYPE_ADV = 1;
+ private final AdvertiseCallback mAdvertiseCallback;
private final LeScanCallback mLeScanCb;
- private int mCallbackType;
// mLeHandle 0: not registered
// -1: scan stopped
@@ -1711,26 +1745,34 @@ public final class BluetoothAdapter {
mLeScanCb = leScanCb;
mScanFilter = uuid;
mLeHandle = 0;
- mCallbackType = CALLBACK_TYPE_SCAN;
+ mAdvertiseCallback = null;
}
public GattCallbackWrapper(BluetoothAdapter bluetoothAdapter, LeScanCallback leScanCb,
- UUID[] uuid, int type) {
+ UUID[] uuid, AdvertiseCallback callback) {
mBluetoothAdapter = new WeakReference<BluetoothAdapter>(bluetoothAdapter);
mLeScanCb = leScanCb;
mScanFilter = uuid;
mLeHandle = 0;
- mCallbackType = type;
+ mAdvertiseCallback = callback;
}
public boolean scanStarted() {
+ return waitForRegisteration(LE_CALLBACK_REG_WAIT_COUNT);
+ }
+
+ public boolean advertiseStarted() {
+ // Wait for registeration callback.
+ return waitForRegisteration(1);
+ }
+
+ private boolean waitForRegisteration(int maxWaitCount) {
boolean started = false;
synchronized(this) {
if (mLeHandle == -1) return false;
-
int count = 0;
// wait for callback registration and LE scan to start
- while (mLeHandle == 0 && count < LE_CALLBACK_REG_WAIT_COUNT) {
+ while (mLeHandle == 0 && count < maxWaitCount) {
try {
wait(LE_CALLBACK_REG_TIMEOUT);
} catch (InterruptedException e) {
@@ -1754,15 +1796,12 @@ public final class BluetoothAdapter {
try {
IBluetoothGatt iGatt = adapter.getBluetoothManager().getBluetoothGatt();
iGatt.stopAdvertising();
- Log.d(TAG, "unregeistering client " + mLeHandle);
- iGatt.unregisterClient(mLeHandle);
} catch (RemoteException e) {
- Log.e(TAG, "Failed to stop advertising and unregister" + e);
+ Log.e(TAG, "Failed to stop advertising" + e);
}
} else {
Log.e(TAG, "stopAdvertising, BluetoothAdapter is null");
}
- mLeHandle = -1;
notifyAll();
}
}
@@ -1808,7 +1847,7 @@ public final class BluetoothAdapter {
BluetoothAdapter adapter = mBluetoothAdapter.get();
if (adapter != null) {
iGatt = adapter.getBluetoothManager().getBluetoothGatt();
- if (mCallbackType == CALLBACK_TYPE_ADV) {
+ if (mAdvertiseCallback != null) {
iGatt.startAdvertising(mLeHandle);
} else {
if (mScanFilter == null) {
@@ -1858,7 +1897,7 @@ public final class BluetoothAdapter {
* @hide
*/
public void onScanResult(String address, int rssi, byte[] advData) {
- if (DBG) Log.d(TAG, "onScanResult() - Device=" + address + " RSSI=" +rssi);
+ if (VDBG) Log.d(TAG, "onScanResult() - Device=" + address + " RSSI=" +rssi);
// Check null in case the scan has been stopped
synchronized(this) {
@@ -1947,9 +1986,33 @@ public final class BluetoothAdapter {
// no op
}
- public void onListen(int status) {
- // no op
+ public void onAdvertiseStateChange(int advertiseState, int status) {
+ Log.d(TAG, "on advertise call back, state: " + advertiseState + " status: " + status);
+ if (advertiseState == STATE_ADVERTISE_STARTED) {
+ mAdvertiseCallback.onAdvertiseStart(status);
+ } else {
+ synchronized (this) {
+ if (status == ADVERTISE_CALLBACK_SUCCESS) {
+ BluetoothAdapter adapter = mBluetoothAdapter.get();
+ if (adapter != null) {
+ try {
+ IBluetoothGatt iGatt =
+ adapter.getBluetoothManager().getBluetoothGatt();
+ Log.d(TAG, "unregistering client " + mLeHandle);
+ iGatt.unregisterClient(mLeHandle);
+ // Reset advertise app handle.
+ mLeHandle = -1;
+ adapter.mAdvertisingGattCallback = null;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to unregister client" + e);
+ }
+ } else {
+ Log.e(TAG, "cannot unregister client, BluetoothAdapter is null");
+ }
+ }
+ }
+ mAdvertiseCallback.onAdvertiseStop(status);
+ }
}
}
-
}
diff --git a/core/java/android/bluetooth/BluetoothAdvScanData.java b/core/java/android/bluetooth/BluetoothAdvScanData.java
index a97b0a806e38..df2c25629a3b 100644
--- a/core/java/android/bluetooth/BluetoothAdvScanData.java
+++ b/core/java/android/bluetooth/BluetoothAdvScanData.java
@@ -77,6 +77,7 @@ public final class BluetoothAdvScanData {
try {
return mBluetoothGatt.setAdvManufacturerCodeAndData(manufacturerCode, manufacturerData);
} catch (RemoteException e) {
+ Log.e(TAG, "Unable to set manufacturer id and data.", e);
return false;
}
}
@@ -92,6 +93,7 @@ public final class BluetoothAdvScanData {
try {
return mBluetoothGatt.setAdvServiceData(serviceData);
} catch (RemoteException e) {
+ Log.e(TAG, "Unable to set service data.", e);
return false;
}
}
@@ -103,6 +105,7 @@ public final class BluetoothAdvScanData {
try {
return Collections.unmodifiableList(mBluetoothGatt.getAdvServiceUuids());
} catch (RemoteException e) {
+ Log.e(TAG, "Unable to get service uuids.", e);
return null;
}
}
@@ -115,6 +118,7 @@ public final class BluetoothAdvScanData {
try {
return mBluetoothGatt.getAdvManufacturerData();
} catch (RemoteException e) {
+ Log.e(TAG, "Unable to get manufacturer data.", e);
return null;
}
}
@@ -127,6 +131,7 @@ public final class BluetoothAdvScanData {
try {
return mBluetoothGatt.getAdvServiceData();
} catch (RemoteException e) {
+ Log.e(TAG, "Unable to get service data.", e);
return null;
}
}
@@ -140,7 +145,7 @@ public final class BluetoothAdvScanData {
try {
mBluetoothGatt.removeAdvManufacturerCodeAndData(manufacturerCode);
} catch (RemoteException e) {
- Log.e(TAG, e.toString());
+ Log.e(TAG, "Unable to remove manufacturer : " + manufacturerCode, e);
}
}
}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index cd093c5a4419..ae6ad3b4f269 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -553,6 +553,15 @@ public final class BluetoothGatt implements BluetoothProfile {
Log.w(TAG, "Unhandled exception in callback", ex);
}
}
+
+ /**
+ * Advertise state change callback
+ * @hide
+ */
+ public void onAdvertiseStateChange(int state, int status) {
+ if (DBG) Log.d(TAG, "onAdvertiseStateChange() - state = "
+ + state + " status=" + status);
+ }
};
/*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device) {
diff --git a/core/java/android/bluetooth/IBluetoothGattCallback.aidl b/core/java/android/bluetooth/IBluetoothGattCallback.aidl
index e3563fcc3a77..7c69a066b465 100644
--- a/core/java/android/bluetooth/IBluetoothGattCallback.aidl
+++ b/core/java/android/bluetooth/IBluetoothGattCallback.aidl
@@ -63,4 +63,5 @@ interface IBluetoothGattCallback {
in int charInstId, in ParcelUuid charUuid,
in byte[] value);
void onReadRemoteRssi(in String address, in int rssi, in int status);
+ oneway void onAdvertiseStateChange(in int advertiseState, in int status);
}
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index c1065145dbf2..21352bf73f66 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -566,6 +566,17 @@ public class MobileDataStateTracker extends BaseNetworkStateTracker {
return false;
}
+
+ public void setInternalDataEnable(boolean enabled) {
+ if (DBG) log("setInternalDataEnable: E enabled=" + enabled);
+ final AsyncChannel channel = mDataConnectionTrackerAc;
+ if (channel != null) {
+ channel.sendMessage(DctConstants.EVENT_SET_INTERNAL_DATA_ENABLE,
+ enabled ? DctConstants.ENABLED : DctConstants.DISABLED);
+ }
+ if (VDBG) log("setInternalDataEnable: X enabled=" + enabled);
+ }
+
@Override
public void setUserDataEnable(boolean enabled) {
if (DBG) log("setUserDataEnable: E enabled=" + enabled);
diff --git a/core/java/android/net/nsd/NsdManager.java b/core/java/android/net/nsd/NsdManager.java
index 9c3e405f44b7..7b2c62314089 100644
--- a/core/java/android/net/nsd/NsdManager.java
+++ b/core/java/android/net/nsd/NsdManager.java
@@ -301,27 +301,36 @@ public final class NsdManager {
@Override
public void handleMessage(Message message) {
- Object listener = getListener(message.arg2);
- boolean listenerRemove = true;
switch (message.what) {
case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
mAsyncChannel.sendMessage(AsyncChannel.CMD_CHANNEL_FULL_CONNECTION);
- break;
+ return;
case AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED:
mConnected.countDown();
- break;
+ return;
case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
Log.e(TAG, "Channel lost");
+ return;
+ default:
break;
+ }
+ Object listener = getListener(message.arg2);
+ if (listener == null) {
+ Log.d(TAG, "Stale key " + message.arg2);
+ return;
+ }
+ boolean listenerRemove = true;
+ NsdServiceInfo ns = getNsdService(message.arg2);
+ switch (message.what) {
case DISCOVER_SERVICES_STARTED:
- String s = ((NsdServiceInfo) message.obj).getServiceType();
+ String s = getNsdServiceInfoType((NsdServiceInfo) message.obj);
((DiscoveryListener) listener).onDiscoveryStarted(s);
// Keep listener until stop discovery
listenerRemove = false;
break;
case DISCOVER_SERVICES_FAILED:
- ((DiscoveryListener) listener).onStartDiscoveryFailed(
- getNsdService(message.arg2).getServiceType(), message.arg1);
+ ((DiscoveryListener) listener).onStartDiscoveryFailed(getNsdServiceInfoType(ns),
+ message.arg1);
break;
case SERVICE_FOUND:
((DiscoveryListener) listener).onServiceFound((NsdServiceInfo) message.obj);
@@ -334,16 +343,14 @@ public final class NsdManager {
listenerRemove = false;
break;
case STOP_DISCOVERY_FAILED:
- ((DiscoveryListener) listener).onStopDiscoveryFailed(
- getNsdService(message.arg2).getServiceType(), message.arg1);
+ ((DiscoveryListener) listener).onStopDiscoveryFailed(getNsdServiceInfoType(ns),
+ message.arg1);
break;
case STOP_DISCOVERY_SUCCEEDED:
- ((DiscoveryListener) listener).onDiscoveryStopped(
- getNsdService(message.arg2).getServiceType());
+ ((DiscoveryListener) listener).onDiscoveryStopped(getNsdServiceInfoType(ns));
break;
case REGISTER_SERVICE_FAILED:
- ((RegistrationListener) listener).onRegistrationFailed(
- getNsdService(message.arg2), message.arg1);
+ ((RegistrationListener) listener).onRegistrationFailed(ns, message.arg1);
break;
case REGISTER_SERVICE_SUCCEEDED:
((RegistrationListener) listener).onServiceRegistered(
@@ -352,16 +359,13 @@ public final class NsdManager {
listenerRemove = false;
break;
case UNREGISTER_SERVICE_FAILED:
- ((RegistrationListener) listener).onUnregistrationFailed(
- getNsdService(message.arg2), message.arg1);
+ ((RegistrationListener) listener).onUnregistrationFailed(ns, message.arg1);
break;
case UNREGISTER_SERVICE_SUCCEEDED:
- ((RegistrationListener) listener).onServiceUnregistered(
- getNsdService(message.arg2));
+ ((RegistrationListener) listener).onServiceUnregistered(ns);
break;
case RESOLVE_SERVICE_FAILED:
- ((ResolveListener) listener).onResolveFailed(
- getNsdService(message.arg2), message.arg1);
+ ((ResolveListener) listener).onResolveFailed(ns, message.arg1);
break;
case RESOLVE_SERVICE_SUCCEEDED:
((ResolveListener) listener).onServiceResolved((NsdServiceInfo) message.obj);
@@ -421,6 +425,11 @@ public final class NsdManager {
}
+ private String getNsdServiceInfoType(NsdServiceInfo s) {
+ if (s == null) return "?";
+ return s.getServiceType();
+ }
+
/**
* Initialize AsyncChannel
*/
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 21b8ae57e36a..f65b6ba79cd8 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -420,7 +420,7 @@ interface INetworkManagementService
/**
* Clear a user range from being associated with an interface.
*/
- void clearDnsInterfaceForUidRange(int uid_start, int uid_end);
+ void clearDnsInterfaceForUidRange(String iface, int uid_start, int uid_end);
/**
* Clear the mappings from pid to Dns interface and from uid range to Dns interface.
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 06f8e8c3607a..d545675f8516 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6543,7 +6543,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @attr ref android.R.styleable#View_filterTouchesWhenObscured
*/
public void setFilterTouchesWhenObscured(boolean enabled) {
- setFlags(enabled ? 0 : FILTER_TOUCHES_WHEN_OBSCURED,
+ setFlags(enabled ? FILTER_TOUCHES_WHEN_OBSCURED : 0,
FILTER_TOUCHES_WHEN_OBSCURED);
}
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 4f6cc37aaa0e..fd3f327666cb 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -566,7 +566,7 @@ public:
return 0;
}
}
- jfloat advancesArray[count];
+ jfloat* advancesArray = new jfloat[count];
jfloat totalAdvance = 0;
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@@ -575,6 +575,7 @@ public:
if (advances != NULL) {
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
}
+ delete [] advancesArray;
return totalAdvance;
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index daff390c93b1..ca311096c126 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1192,7 +1192,7 @@
android:permissionGroup="android.permission-group.STORAGE"
android:label="@string/permlab_manageDocs"
android:description="@string/permdesc_manageDocs"
- android:protectionLevel="signature|system" />
+ android:protectionLevel="signature" />
<!-- ================================== -->
<!-- Permissions for screenlock -->
diff --git a/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_dark.png
index b47d666cf95d..e215b96f9301 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_light.png
index 03b0d2ac7138..a014e918441b 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_off_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_off_holo_dark.png
index 13d803cb98a5..bb8bec195185 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_off_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_off_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_off_holo_light.png
index 3ae436b656d5..aa1737edf156 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_off_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_dark.png
index 24824fc9d997..2c1434bbd09f 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_light.png
index af3819bbf044..dbdce3ef2f50 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_0_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_dark.png
index 83dc251908ef..110186495da9 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_light.png
index 8d9d5923cfd0..e8e90697e55f 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_1_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_dark.png
index 1310ec9eb3e4..8595158bed2c 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_light.png
index 1705074567c8..14844d403a26 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_2_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_holo_dark.png b/core/res/res/drawable-hdpi/ic_media_route_on_holo_dark.png
index 7027b88ec157..1565a29b8f47 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_media_route_on_holo_light.png b/core/res/res/drawable-hdpi/ic_media_route_on_holo_light.png
index 7027b88ec157..9b8fe879d55d 100644
--- a/core/res/res/drawable-hdpi/ic_media_route_on_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_media_route_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_notification_cast_0.png b/core/res/res/drawable-hdpi/ic_notification_cast_0.png
index a35f28177f0a..74f7dc0c1f48 100644
--- a/core/res/res/drawable-hdpi/ic_notification_cast_0.png
+++ b/core/res/res/drawable-hdpi/ic_notification_cast_0.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_notification_cast_1.png b/core/res/res/drawable-hdpi/ic_notification_cast_1.png
index 9f6e2adef029..c6d267d8c021 100644
--- a/core/res/res/drawable-hdpi/ic_notification_cast_1.png
+++ b/core/res/res/drawable-hdpi/ic_notification_cast_1.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_notification_cast_2.png b/core/res/res/drawable-hdpi/ic_notification_cast_2.png
index 737137a81340..699b299ffb8b 100644
--- a/core/res/res/drawable-hdpi/ic_notification_cast_2.png
+++ b/core/res/res/drawable-hdpi/ic_notification_cast_2.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_notification_cast_on.png b/core/res/res/drawable-hdpi/ic_notification_cast_on.png
index ff2753ab68f5..3eaf13a8520c 100644
--- a/core/res/res/drawable-hdpi/ic_notification_cast_on.png
+++ b/core/res/res/drawable-hdpi/ic_notification_cast_on.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_dark.png
index fa22d8244cf9..52e3a5a13236 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_light.png
index a686cd1cf2aa..319c57e8f343 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_off_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_off_holo_dark.png
index 6764598fee30..f98c0a85b53b 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_off_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_off_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_off_holo_light.png
index 94e0bb641e91..b74cdb5b1a93 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_off_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_dark.png
index 5ce2f205234d..a6a4bd012e53 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_light.png
index 5105e9081aeb..106fd3a97f94 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_0_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_dark.png
index 68c06ed77aae..2c141ab8e692 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_light.png
index 6e9b14422993..0b62d0b509ff 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_1_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_dark.png
index 45dc56f3d471..23442b06336b 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_light.png
index 46e743ad7ed6..42b329fad28e 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_2_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_holo_dark.png b/core/res/res/drawable-mdpi/ic_media_route_on_holo_dark.png
index e384691fe8b8..58ff50685aca 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_media_route_on_holo_light.png b/core/res/res/drawable-mdpi/ic_media_route_on_holo_light.png
index e384691fe8b8..25257f8b848d 100644
--- a/core/res/res/drawable-mdpi/ic_media_route_on_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_media_route_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_notification_cast_0.png b/core/res/res/drawable-mdpi/ic_notification_cast_0.png
index d9cedbdeb3e5..a51a3cbefd2f 100644
--- a/core/res/res/drawable-mdpi/ic_notification_cast_0.png
+++ b/core/res/res/drawable-mdpi/ic_notification_cast_0.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_notification_cast_1.png b/core/res/res/drawable-mdpi/ic_notification_cast_1.png
index 414c67f17002..e0813678a9f5 100644
--- a/core/res/res/drawable-mdpi/ic_notification_cast_1.png
+++ b/core/res/res/drawable-mdpi/ic_notification_cast_1.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_notification_cast_2.png b/core/res/res/drawable-mdpi/ic_notification_cast_2.png
index 280a8880e522..a7f4de43f203 100644
--- a/core/res/res/drawable-mdpi/ic_notification_cast_2.png
+++ b/core/res/res/drawable-mdpi/ic_notification_cast_2.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_notification_cast_on.png b/core/res/res/drawable-mdpi/ic_notification_cast_on.png
index ab5f1d78608f..42de8c4d5c10 100644
--- a/core/res/res/drawable-mdpi/ic_notification_cast_on.png
+++ b/core/res/res/drawable-mdpi/ic_notification_cast_on.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/cab_background_top_holo_dark.9.png b/core/res/res/drawable-xhdpi/cab_background_top_holo_dark.9.png
index 6b3157985ea5..7b6d48b6e41f 100644
--- a/core/res/res/drawable-xhdpi/cab_background_top_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/cab_background_top_holo_light.9.png b/core/res/res/drawable-xhdpi/cab_background_top_holo_light.9.png
index df0121bb353f..bafe8781c2b8 100644
--- a/core/res/res/drawable-xhdpi/cab_background_top_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/cab_background_top_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_dark.png
index 1d48e12a3c68..4119cffb3932 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_light.png
index 2c8d1ec19b25..b629a5726b3b 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_off_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_off_holo_dark.png
index 00b20433ab79..fe81128d5443 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_off_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_off_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_off_holo_light.png
index ce1d93954734..9b59eaf73976 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_off_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_dark.png
index 3064b46e5299..1a513c1cd75e 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_light.png
index 431668642ce1..ff788032ea7b 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_0_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_dark.png
index 25c4e3118cf0..4c4b624b9bdb 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_light.png
index 8e32bd2902ac..60f8c4dede13 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_1_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_dark.png
index aeaa78ffaec3..cdb2f30f0bcf 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_light.png
index 85277fa12ebd..97a10a37a29f 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_2_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_holo_dark.png b/core/res/res/drawable-xhdpi/ic_media_route_on_holo_dark.png
index b01dbe8ceae4..a19a083706da 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_media_route_on_holo_light.png b/core/res/res/drawable-xhdpi/ic_media_route_on_holo_light.png
index c19a2ad0163b..db30613771ca 100644
--- a/core/res/res/drawable-xhdpi/ic_media_route_on_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_media_route_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_cast_0.png b/core/res/res/drawable-xhdpi/ic_notification_cast_0.png
index 5fb23a06df35..818c1cdd7a26 100644
--- a/core/res/res/drawable-xhdpi/ic_notification_cast_0.png
+++ b/core/res/res/drawable-xhdpi/ic_notification_cast_0.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_cast_1.png b/core/res/res/drawable-xhdpi/ic_notification_cast_1.png
index f01d17db0821..2a56e3131789 100644
--- a/core/res/res/drawable-xhdpi/ic_notification_cast_1.png
+++ b/core/res/res/drawable-xhdpi/ic_notification_cast_1.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_cast_2.png b/core/res/res/drawable-xhdpi/ic_notification_cast_2.png
index 4f4ba7f98bcd..3515a76825e2 100644
--- a/core/res/res/drawable-xhdpi/ic_notification_cast_2.png
+++ b/core/res/res/drawable-xhdpi/ic_notification_cast_2.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_notification_cast_on.png b/core/res/res/drawable-xhdpi/ic_notification_cast_on.png
index 38f15ddc416d..142065b4f575 100644
--- a/core/res/res/drawable-xhdpi/ic_notification_cast_on.png
+++ b/core/res/res/drawable-xhdpi/ic_notification_cast_on.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/cab_background_top_holo_dark.9.png b/core/res/res/drawable-xxhdpi/cab_background_top_holo_dark.9.png
index 418f322ce0f4..cbb4f4cf63da 100644
--- a/core/res/res/drawable-xxhdpi/cab_background_top_holo_dark.9.png
+++ b/core/res/res/drawable-xxhdpi/cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/cab_background_top_holo_light.9.png b/core/res/res/drawable-xxhdpi/cab_background_top_holo_light.9.png
index a5a59d4e61ba..6d467f7ee6d5 100644
--- a/core/res/res/drawable-xxhdpi/cab_background_top_holo_light.9.png
+++ b/core/res/res/drawable-xxhdpi/cab_background_top_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_dark.png
index 7b0c383a5093..6fad4a641e81 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_light.png
index efb624e182a7..865617c0fd0e 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_dark.png
index 5ee57e46a010..44d98d56d2b5 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_light.png
index 6bc2e4aa2265..b5b29b020900 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_off_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_dark.png
index c13af9c80afd..c807b50ad076 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_light.png
index 744fb42a6633..3fc7188f31b4 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_0_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_dark.png
index ca4d59c5b0c2..d54f44acb84b 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_light.png
index fde5688ad092..092fe8cc0dc5 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_1_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_dark.png
index b8715c39d35b..17c1d9945b12 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_light.png
index 668bb2510a55..4fd580864841 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_2_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_dark.png
index 7f54a623dd7e..906401e6f03f 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_dark.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_light.png b/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_light.png
index 2df924de1b82..d29e56300408 100644
--- a/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_light.png
+++ b/core/res/res/drawable-xxhdpi/ic_media_route_on_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_notification_cast_0.png b/core/res/res/drawable-xxhdpi/ic_notification_cast_0.png
index f5b16ed10e0e..7ef0d3d0e390 100644
--- a/core/res/res/drawable-xxhdpi/ic_notification_cast_0.png
+++ b/core/res/res/drawable-xxhdpi/ic_notification_cast_0.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_notification_cast_1.png b/core/res/res/drawable-xxhdpi/ic_notification_cast_1.png
index 22efeec677f7..ed04beb7e48b 100644
--- a/core/res/res/drawable-xxhdpi/ic_notification_cast_1.png
+++ b/core/res/res/drawable-xxhdpi/ic_notification_cast_1.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_notification_cast_2.png b/core/res/res/drawable-xxhdpi/ic_notification_cast_2.png
index e24cd970da16..d62d27dd7a4c 100644
--- a/core/res/res/drawable-xxhdpi/ic_notification_cast_2.png
+++ b/core/res/res/drawable-xxhdpi/ic_notification_cast_2.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_notification_cast_on.png b/core/res/res/drawable-xxhdpi/ic_notification_cast_on.png
index da1a627be5bf..d5626024b0a5 100644
--- a/core/res/res/drawable-xxhdpi/ic_notification_cast_on.png
+++ b/core/res/res/drawable-xxhdpi/ic_notification_cast_on.png
Binary files differ
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 40f950954609..a921f1636f00 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -136,7 +136,7 @@
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Massa supressions de <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
<string name="low_memory" product="tablet" msgid="6494019234102154896">"L\'emmagatzematge de la tauleta és ple. Suprimeix uns quants fitxers per alliberar espai."</string>
<string name="low_memory" product="default" msgid="3475999286680000541">"L\'emmagatzematge del telèfon és ple. Suprimeix uns quants fitxers per alliberar espai."</string>
- <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Pot ser que la xarxa se supervisi."</string>
+ <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"És possible que la xarxa estigui supervisada"</string>
<string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Per un tercer desconegut"</string>
<string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"Per <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
<string name="me" msgid="6545696007631404292">"Mi"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 0dbcb0721d32..7781df3dc30f 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -46,7 +46,7 @@
<string name="badPin" msgid="9015277645546710014">"Den gamle pinkode, som du har indtastet, er ikke korrekt."</string>
<string name="badPuk" msgid="5487257647081132201">"Den indtastede PUK-kode er forkert."</string>
<string name="mismatchPin" msgid="609379054496863419">"De indtastede pinkoder er ikke ens"</string>
- <string name="invalidPin" msgid="3850018445187475377">"Indtast en PIN-kode på mellem 4 og 8 tal."</string>
+ <string name="invalidPin" msgid="3850018445187475377">"Indtast en pinkode på mellem 4 og 8 tal."</string>
<string name="invalidPuk" msgid="8761456210898036513">"Angiv en PUK-kode på 8 eller flere cifre."</string>
<string name="needPuk" msgid="919668385956251611">"Dit SIM-kort er låst med PUK-koden. Indtast PUK-koden for at låse den op."</string>
<string name="needPuk2" msgid="4526033371987193070">"Indtast PUK2-koden for at låse op for SIM-kortet."</string>
@@ -63,12 +63,12 @@
<string name="CwMmi" msgid="9129678056795016867">"Ventende opkald"</string>
<string name="BaMmi" msgid="455193067926770581">"Opkaldsspærring"</string>
<string name="PwdMmi" msgid="7043715687905254199">"Ændring af adgangskode"</string>
- <string name="PinMmi" msgid="3113117780361190304">"ændring af PIN-kode"</string>
+ <string name="PinMmi" msgid="3113117780361190304">"ændring af pinkode"</string>
<string name="CnipMmi" msgid="3110534680557857162">"Opkaldsnummeret er til stede"</string>
<string name="CnirMmi" msgid="3062102121430548731">"Opkaldsnummeret er begrænset"</string>
<string name="ThreeWCMmi" msgid="9051047170321190368">"Trevejsopkald"</string>
<string name="RuacMmi" msgid="7827887459138308886">"Afvisning af uønskede, irriterende opkald"</string>
- <string name="CndMmi" msgid="3116446237081575808">"Levering af opkaldsnummer"</string>
+ <string name="CndMmi" msgid="3116446237081575808">"Levering af nummervisning"</string>
<string name="DndMmi" msgid="1265478932418334331">"Forstyr ikke"</string>
<string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"Standarder for opkalds-id til begrænset. Næste opkald: Begrænset"</string>
<string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"Standarder for opkalds-id til begrænset. Næste opkald: Ikke begrænset"</string>
@@ -241,7 +241,7 @@
<string name="capability_desc_canRetrieveWindowContent" msgid="3772225008605310672">"undersøge indholdet i et vindue, du interagerer med."</string>
<string name="capability_title_canRequestTouchExploration" msgid="3108723364676667320">"aktivere Udforsk ved berøring"</string>
<string name="capability_desc_canRequestTouchExploration" msgid="5800552516779249356">"De emner, der trykkes på, læses højt, og skærmen kan udforskes ved hjælp af bevægelser."</string>
- <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"aktivere forbedret webhjælpefunktioner"</string>
+ <string name="capability_title_canRequestEnhancedWebAccessibility" msgid="1739881766522594073">"aktivere forbedrede webhjælpefunktioner"</string>
<string name="capability_desc_canRequestEnhancedWebAccessibility" msgid="7881063961507511765">"Der installeres muligvis scripts for at gøre appindhold mere tilgængeligt."</string>
<string name="capability_title_canRequestFilterKeyEvents" msgid="2103440391902412174">"observere tekst, du skriver"</string>
<string name="capability_desc_canRequestFilterKeyEvents" msgid="7463135292204152818">"Dette omfatter personlige data såsom kreditkortnumre og adgangskoder."</string>
@@ -263,8 +263,8 @@
<string name="permdesc_receiveMms" msgid="533019437263212260">"Tillader, at appen kan modtage og behandle mms-beskeder. Det betyder, at appen kan overvåge eller slette de beskeder, der sendes til din enhed, uden at vise dem til dig."</string>
<string name="permlab_receiveEmergencyBroadcast" msgid="1803477660846288089">"modtage nødudsendelser"</string>
<string name="permdesc_receiveEmergencyBroadcast" msgid="848524070262431974">"Tillader, at appen kan modtage og behandle nødtransmissioner. Denne tilladelse er kun tilgængelig for systemapps."</string>
- <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"læse mobiltransmissionsbeskeder"</string>
- <string name="permdesc_readCellBroadcasts" msgid="6361972776080458979">"Tillader, at appen læser mobiltransmissionsbeskeder, der modtages af din enhed. I nogle områder sendes mobiltransmissionsbeskeder for at advare om nødsituationer. Ondsindede apps kan forstyrre ydelsen eller driften af ​din ​enhed, når en mobiltransmission om en nødsituation modtages."</string>
+ <string name="permlab_readCellBroadcasts" msgid="1598328843619646166">"læse Cell Broadcast-beskeder"</string>
+ <string name="permdesc_readCellBroadcasts" msgid="6361972776080458979">"Tillader, at appen læser Cell Broadcast-beskeder, der modtages af din enhed. I nogle områder sendes der Cell Broadcast-beskeder for at advare om nødsituationer. Ondsindede apps kan forstyrre ydelsen eller driften af ​din ​enhed, når der modtages en Cell Broadcast-besked om en nødsituation."</string>
<string name="permlab_sendSms" msgid="5600830612147671529">"send sms-beskeder"</string>
<string name="permdesc_sendSms" msgid="7094729298204937667">"Tillader, at appen kan sende sms-beskeder. Dette kan resultere i uventede opkrævninger. Skadelige apps kan koste dig penge ved at sende beskeder uden din bekræftelse."</string>
<string name="permlab_sendRespondViaMessageRequest" msgid="8713889105305943200">"send hændelser, hvor der skal svares pr. besked"</string>
@@ -380,7 +380,7 @@
<string name="permdesc_bindTextService" msgid="8151968910973998670">"Tillader, at ejeren kan binde en teksttjenestes grænseflade (f. eks. SpellCheckerService) på øverste niveau. Dette bør aldrig være nødvendigt til normale apps."</string>
<string name="permlab_bindVpnService" msgid="4708596021161473255">"bind til en VPN-tjeneste"</string>
<string name="permdesc_bindVpnService" msgid="2067845564581693905">"Tillader, at brugeren forpligter sig til en VPN-tjenestes grænseflade på øverste niveau. Bør aldrig være nødvendigt i almindelige apps."</string>
- <string name="permlab_bindWallpaper" msgid="8716400279937856462">"forpligt til et tapet"</string>
+ <string name="permlab_bindWallpaper" msgid="8716400279937856462">"knyt til en baggrund"</string>
<string name="permdesc_bindWallpaper" msgid="7108428692595491668">"Tillader, at indehaveren kan binde en baggrunds grænseflade på øverste niveau. Dette bør aldrig være nødvendigt for almindelige apps."</string>
<string name="permlab_bindRemoteDisplay" msgid="1782923938029941960">"bind til en ekstern skærm"</string>
<string name="permdesc_bindRemoteDisplay" msgid="1261242718727295981">"Tillader, at brugeren kan foretage en binding til grænsefladens øverste niveau på en ekstern skærm. Bør aldrig være nødvendigt til almindelige apps."</string>
@@ -571,7 +571,7 @@
<string name="permlab_factoryTest" msgid="3715225492696416187">"kør i fabriksindstillet testtilstand"</string>
<string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Kør som en producenttest på lavt niveau, der giver fuld adgang til tabletens hardware. Kun tilgængeligt når en tablet kører i producenttesttilstand."</string>
<string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Kør som en producenttest på lavt niveau. Giver fuld adgang til telefonens hardware. Kun tilgængeligt når en telefon kører i producenttesttilstand."</string>
- <string name="permlab_setWallpaper" msgid="6627192333373465143">"angiv tapet"</string>
+ <string name="permlab_setWallpaper" msgid="6627192333373465143">"angive baggrund"</string>
<string name="permdesc_setWallpaper" msgid="7373447920977624745">"Tillader, at appen kan konfigurere systembaggrunden."</string>
<string name="permlab_setWallpaperHints" msgid="3278608165977736538">"ændre størrelsen på din baggrund"</string>
<string name="permdesc_setWallpaperHints" msgid="8235784384223730091">"Tillader, at appen giver tips til systembaggrundens størrelse."</string>
@@ -1334,8 +1334,8 @@
<string name="input_method_binding_label" msgid="1283557179944992649">"Inputmetode"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synkroniser"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Hjælpefunktioner"</string>
- <string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapet"</string>
- <string name="chooser_wallpaper" msgid="7873476199295190279">"Skift tapet"</string>
+ <string name="wallpaper_binding_label" msgid="1240087844304687662">"Baggrund"</string>
+ <string name="chooser_wallpaper" msgid="7873476199295190279">"Skift baggrund"</string>
<string name="notification_listener_binding_label" msgid="2014162835481906429">"Underretningslytter"</string>
<string name="vpn_title" msgid="19615213552042827">"VPN er aktiveret."</string>
<string name="vpn_title_long" msgid="6400714798049252294">"VPN aktiveres af <xliff:g id="APP">%s</xliff:g>"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 474d409d2f93..b6378471bbc3 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1423,8 +1423,8 @@
<string name="keyboardview_keycode_enter" msgid="2985864015076059467">"Enter"</string>
<string name="activitychooserview_choose_application" msgid="2125168057199941199">"Επιλέξτε κάποια εφαρμογή"</string>
<string name="activitychooserview_choose_application_error" msgid="8624618365481126668">"Δεν ήταν δυνατή η εκκίνηση του <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="shareactionprovider_share_with" msgid="806688056141131819">"Κοινή χρήση με"</string>
- <string name="shareactionprovider_share_with_application" msgid="5627411384638389738">"Κοινή χρήση με <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
+ <string name="shareactionprovider_share_with" msgid="806688056141131819">"Κοινοποίηση με"</string>
+ <string name="shareactionprovider_share_with_application" msgid="5627411384638389738">"Κοινοποίηση με <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
<string name="content_description_sliding_handle" msgid="415975056159262248">"Στοιχείο χειρισμού με δυνατότητα ολίσθησης. Αγγίξτε και πατήστε παρατεταμένα."</string>
<string name="description_direction_up" msgid="7169032478259485180">"Κύλιση προς τα επάνω για <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
<string name="description_direction_down" msgid="5087739728639014595">"Κύλιση προς τα κάτω για <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
@@ -1477,7 +1477,7 @@
<string name="sha1_fingerprint" msgid="7930330235269404581">"Αποτύπωμα SHA-1"</string>
<string name="activity_chooser_view_see_all" msgid="4292569383976636200">"Εμφάνιση όλων"</string>
<string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"Επιλογή δραστηριότητας"</string>
- <string name="share_action_provider_share_with" msgid="5247684435979149216">"Κοινή χρήση με"</string>
+ <string name="share_action_provider_share_with" msgid="5247684435979149216">"Κοινοποίηση με"</string>
<string name="list_delimeter" msgid="3975117572185494152">", "</string>
<string name="sending" msgid="3245653681008218030">"Γίνεται αποστολή…"</string>
<string name="launchBrowserDefault" msgid="2057951947297614725">"Εκκίνηση προγράμματος περιήγησης;"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 23e371f091fb..b33b62b53441 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -709,7 +709,7 @@
<item msgid="7897544654242874543">"Bureau"</item>
<item msgid="1103601433382158155">"Télécopie bureau"</item>
<item msgid="1735177144948329370">"Télécopie domicile"</item>
- <item msgid="603878674477207394">"Pager"</item>
+ <item msgid="603878674477207394">"Bipeur"</item>
<item msgid="1650824275177931637">"Autre"</item>
<item msgid="9192514806975898961">"Personnalisé"</item>
</string-array>
@@ -752,7 +752,7 @@
<string name="phoneTypeWork" msgid="8863939667059911633">"Bureau"</string>
<string name="phoneTypeFaxWork" msgid="3517792160008890912">"Télécopie bureau"</string>
<string name="phoneTypeFaxHome" msgid="2067265972322971467">"Télécopie domicile"</string>
- <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Bipeur"</string>
<string name="phoneTypeOther" msgid="1544425847868765990">"Autre"</string>
<string name="phoneTypeCallback" msgid="2712175203065678206">"Rappel"</string>
<string name="phoneTypeCar" msgid="8738360689616716982">"Voiture"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 4d33417c0146..334c401a2caf 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -973,7 +973,7 @@
<string name="save_password_remember" msgid="6491879678996749466">"Ingat"</string>
<string name="save_password_never" msgid="8274330296785855105">"Jangan"</string>
<string name="open_permission_deny" msgid="7374036708316629800">"Anda tidak memiliki izin untuk membuka laman ini."</string>
- <string name="text_copied" msgid="4985729524670131385">"Teks disalin ke clipboard."</string>
+ <string name="text_copied" msgid="4985729524670131385">"Teks disalin ke papan klip."</string>
<string name="more_item_label" msgid="4650918923083320495">"Lainnya"</string>
<string name="prepend_shortcut_label" msgid="2572214461676015642">"Menu+"</string>
<string name="menu_space_shortcut_label" msgid="2410328639272162537">"spasi"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 4e3e9ba5c7a2..a156fe891b35 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -456,7 +456,7 @@
<string name="permlab_writeCallLog" msgid="8552045664743499354">"scrittura del registro chiamate"</string>
<string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"Consente all\'applicazione di modificare il registro chiamate del tablet, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string>
<string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"Consente all\'applicazione di modificare il registro chiamate del telefono, inclusi i dati sulle chiamate in arrivo e in uscita. Le applicazioni dannose potrebbero farne uso per cancellare o modificare il registro chiamate."</string>
- <string name="permlab_readProfile" msgid="4701889852612716678">"lettura scheda cont. personale"</string>
+ <string name="permlab_readProfile" msgid="4701889852612716678">"lettura scheda contatti pers."</string>
<string name="permdesc_readProfile" product="default" msgid="5462475151849888848">"Consente all\'applicazione di leggere informazioni del profilo personale memorizzate sul dispositivo, come il tuo nome e le tue informazioni di contatto. Ciò significa che l\'applicazione può identificarti e inviare le informazioni del tuo profilo ad altri."</string>
<string name="permlab_writeProfile" msgid="907793628777397643">"modifica scheda contatti"</string>
<string name="permdesc_writeProfile" product="default" msgid="5552084294598465899">"Consente all\'applicazione di modificare o aggiungere informazioni ai dati del profilo personale memorizzati sul dispositivo, come il tuo nome e le tue informazioni di contatto. Significa che l\'applicazione può identificarti e inviare le informazioni del tuo profilo ad altri."</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index eb7c389c59fa..4a2479c63b57 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -163,7 +163,7 @@
<string name="global_action_lock" msgid="2844945191792119712">"נעילת מסך"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"כיבוי"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"דיווח על באג"</string>
- <string name="bugreport_title" msgid="2667494803742548533">"מלא דיווח על באג"</string>
+ <string name="bugreport_title" msgid="2667494803742548533">"שלח דיווח על באג"</string>
<string name="bugreport_message" msgid="398447048750350456">"פעולה זו תאסוף מידע על מצב המכשיר הנוכחי שלך על מנת לשלוח אותו כהודעת דוא\"ל. היא תימשך זמן קצר מרגע פתיחת דיווח הבאג ועד שיהיה ניתן לבצע שליחה. התאזר בסבלנות."</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"מצב שקט"</string>
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"הקול כבוי"</string>
@@ -1101,7 +1101,7 @@
<string name="cut" msgid="3092569408438626261">"חתוך"</string>
<string name="copy" msgid="2681946229533511987">"העתק"</string>
<string name="paste" msgid="5629880836805036433">"הדבק"</string>
- <string name="replace" msgid="5781686059063148930">"להחליף..."</string>
+ <string name="replace" msgid="5781686059063148930">"החלף..."</string>
<string name="delete" msgid="6098684844021697789">"מחק"</string>
<string name="copyUrl" msgid="2538211579596067402">"העתק כתובת אתר"</string>
<string name="selectTextMode" msgid="1018691815143165326">"בחר טקסט"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 0af94ca457a4..703fe86810e5 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1508,9 +1508,9 @@
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", beveiligd"</string>
- <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Scherm sturen"</string>
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Scherm casten"</string>
<string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Verbinden met <xliff:g id="NAME">%1$s</xliff:g>"</string>
- <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Scherm sturen"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Scherm casten"</string>
<string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Verbonden met <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Verbinding verbreken"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Noodoproep"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index edff8788eb8e..2b985c46e468 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -137,7 +137,7 @@
<string name="low_memory" product="tablet" msgid="6494019234102154896">"Pamięć tabletu jest pełna. Usuń niektóre pliki, aby zwolnić miejsce."</string>
<string name="low_memory" product="default" msgid="3475999286680000541">"Pamięć telefonu jest pełna. Usuń niektóre pliki, aby zwolnić miejsce."</string>
<string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Sieć może być monitorowana"</string>
- <string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Przez nieznaną firmę zewnętrzną"</string>
+ <string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Przez nieznany podmiot zewnętrzny"</string>
<string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"Przez <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
<string name="me" msgid="6545696007631404292">"Ja"</string>
<string name="power_dialog" product="tablet" msgid="8545351420865202853">"Opcje tabletu"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 050aa6f3480d..226f03b808ca 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -136,7 +136,7 @@
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Слишком много удалений <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
<string name="low_memory" product="tablet" msgid="6494019234102154896">"Память планшетного ПК заполнена. Удалите какие-нибудь файлы, чтобы освободить место."</string>
<string name="low_memory" product="default" msgid="3475999286680000541">"Память телефона заполнена. Удалите какие-нибудь файлы, чтобы освободить место."</string>
- <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Действия в сети могут отслеживаться"</string>
+ <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Сеть может отслеживаться"</string>
<string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"администратором"</string>
<string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"администратором домена <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
<string name="me" msgid="6545696007631404292">"Я"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 7da583702998..dd13684c908d 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -38,7 +38,7 @@
<string name="mmiFdnError" msgid="5224398216385316471">"Operácia je obmedzená len na režim čísla pevného vytáčania."</string>
<string name="serviceEnabled" msgid="8147278346414714315">"Služba bola povolená."</string>
<string name="serviceEnabledFor" msgid="6856228140453471041">"Služba bola povolená pre:"</string>
- <string name="serviceDisabled" msgid="1937553226592516411">"Služba bola zakázaná."</string>
+ <string name="serviceDisabled" msgid="1937553226592516411">"Služba bola vypnutá."</string>
<string name="serviceRegistered" msgid="6275019082598102493">"Registrácia prebehla úspešne."</string>
<string name="serviceErased" msgid="1288584695297200972">"Vymazanie prebehlo úspešne."</string>
<string name="passwordIncorrect" msgid="7612208839450128715">"Nesprávne heslo."</string>
@@ -145,7 +145,7 @@
<string name="silent_mode" msgid="7167703389802618663">"Tichý režim"</string>
<string name="turn_on_radio" msgid="3912793092339962371">"Zapnúť bezdrôtové pripojenie"</string>
<string name="turn_off_radio" msgid="8198784949987062346">"Vypnúť bezdrôtové pripojenie"</string>
- <string name="screen_lock" msgid="799094655496098153">"Uzamknutie obrazovky"</string>
+ <string name="screen_lock" msgid="799094655496098153">"Zámka obrazovky"</string>
<string name="power_off" msgid="4266614107412865048">"Vypnúť"</string>
<string name="silent_mode_silent" msgid="319298163018473078">"Zvonenie je vypnuté"</string>
<string name="silent_mode_vibrate" msgid="7072043388581551395">"Vibračné zvonenie"</string>
@@ -160,11 +160,11 @@
<string name="no_recent_tasks" msgid="8794906658732193473">"Žiadne nedávne aplikácie"</string>
<string name="global_actions" product="tablet" msgid="408477140088053665">"Možnosti tabletu"</string>
<string name="global_actions" product="default" msgid="2406416831541615258">"Možnosti telefónu"</string>
- <string name="global_action_lock" msgid="2844945191792119712">"Uzamknutie obrazovky"</string>
+ <string name="global_action_lock" msgid="2844945191792119712">"Zámka obrazovky"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"Vypnúť"</string>
- <string name="global_action_bug_report" msgid="7934010578922304799">"Správa o chybe"</string>
- <string name="bugreport_title" msgid="2667494803742548533">"Zaznamenať správu o chybe"</string>
- <string name="bugreport_message" msgid="398447048750350456">"Zhromažďuje informácie o aktuálnom stave zariadenia a tieto informácie je následne možné odoslať prostredníctvom e-mailovej správy. Od spustenia vytvárania správy o chybe až do chvíle, kedy je tento nástroj pripravený odoslať prvú správu, môže uplynúť nejaký čas. Prosíme vás preto o trpezlivosť."</string>
+ <string name="global_action_bug_report" msgid="7934010578922304799">"Hlásenie o chybách"</string>
+ <string name="bugreport_title" msgid="2667494803742548533">"Vytvoriť hlásenie o chybách"</string>
+ <string name="bugreport_message" msgid="398447048750350456">"Zhromaždí informácie o aktuálnom stave zariadenia na odoslanie v e-mailovej správe. Chvíľu však potrvá, kým bude hlásenie o chybách pripravené na odoslanie. Prosíme vás preto o trpezlivosť."</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Tichý režim"</string>
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Zvuk je VYPNUTÝ."</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Zvuk je zapnutý"</string>
@@ -522,14 +522,14 @@
<string name="permdesc_mount_format_filesystems" msgid="8784268246779198627">"Umožňuje aplikácii formátovať vymeniteľný ukladací priestor."</string>
<string name="permlab_asec_access" msgid="3411338632002193846">"získať informácie o internom ukladacom priestore"</string>
<string name="permdesc_asec_access" msgid="3094563844593878548">"Umožňuje aplikácii získať informácie o internom ukladacom priestore."</string>
- <string name="permlab_asec_create" msgid="6414757234789336327">"vytvoriť interný ukladací priestor"</string>
- <string name="permdesc_asec_create" msgid="4558869273585856876">"Umožňuje aplikácii vytvoriť interný ukladací priestor."</string>
- <string name="permlab_asec_destroy" msgid="526928328301618022">"zničiť interný ukladací priestor"</string>
- <string name="permdesc_asec_destroy" msgid="7218749286145526537">"Umožňuje aplikácii zničiť interný ukladací priestor."</string>
- <string name="permlab_asec_mount_unmount" msgid="8877998101944999386">"pripojiť alebo odpojiť interný ukladací priestor"</string>
- <string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Umožňuje aplikácii pripojiť alebo odpojiť interný ukladací priestor."</string>
- <string name="permlab_asec_rename" msgid="7496633954080472417">"premenovať interný ukladací priestor"</string>
- <string name="permdesc_asec_rename" msgid="1794757588472127675">"Umožňuje aplikácii premenovať interný ukladací priestor."</string>
+ <string name="permlab_asec_create" msgid="6414757234789336327">"vytvoriť interné úložisko"</string>
+ <string name="permdesc_asec_create" msgid="4558869273585856876">"Umožňuje aplikácii vytvoriť interné úložisko."</string>
+ <string name="permlab_asec_destroy" msgid="526928328301618022">"zničiť interné úložisko"</string>
+ <string name="permdesc_asec_destroy" msgid="7218749286145526537">"Umožňuje aplikácii zničiť interné úložisko."</string>
+ <string name="permlab_asec_mount_unmount" msgid="8877998101944999386">"pripojiť alebo odpojiť interné úložisko"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Umožňuje aplikácii pripojiť alebo odpojiť interné úložisko."</string>
+ <string name="permlab_asec_rename" msgid="7496633954080472417">"premenovať interné úložisko"</string>
+ <string name="permdesc_asec_rename" msgid="1794757588472127675">"Umožňuje aplikácii premenovať interné úložisko."</string>
<string name="permlab_vibrate" msgid="7696427026057705834">"ovládať vibrovanie"</string>
<string name="permdesc_vibrate" msgid="6284989245902300945">"Umožňuje aplikácii ovládať vibrácie."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"ovládanie kontrolky"</string>
@@ -558,7 +558,7 @@
<string name="permlab_readPhoneState" msgid="9178228524507610486">"čítať stav a identitu telefónu"</string>
<string name="permdesc_readPhoneState" msgid="1639212771826125528">"Umožňuje aplikácii pristupovať k telefónnym funkciám zariadenia. Aplikácia s týmto povolením môže určiť telefónne číslo a ID zariadenia, či práve prebieha hovor, a vzdialené číslo, s ktorým je prostredníctvom hovoru nadviazané spojenie."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"zabránenie prechodu tabletu do režimu spánku"</string>
- <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"deaktivácia režimu spánku"</string>
+ <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"deaktivovať režim spánku"</string>
<string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"Umožňuje aplikácii zabrániť prechodu tabletu do režimu spánku."</string>
<string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"Umožňuje aplikácii zabrániť prechodu telefónu do režimu spánku."</string>
<string name="permlab_transmitIr" msgid="7545858504238530105">"infračervený prenos"</string>
@@ -695,7 +695,7 @@
<string name="policydesc_wipeData" product="default" msgid="5096895604574188391">"Bez predchádzajúceho upozornenia zmazať všetky údaje tým, že sa obnovia továrenské nastavenia telefónu."</string>
<string name="policylab_setGlobalProxy" msgid="2784828293747791446">"Nastaviť globálny server proxy zariadenia"</string>
<string name="policydesc_setGlobalProxy" msgid="6387497466660154931">"Vyberte globálny server proxy, ktorý sa bude používať po aktivácii pravidiel. Platný globálny server proxy nastavuje iba prvý správca zariadenia."</string>
- <string name="policylab_expirePassword" msgid="885279151847254056">"Nastav. koniec platnosti hesla"</string>
+ <string name="policylab_expirePassword" msgid="885279151847254056">"Nastaviť vypršanie hesla zámky"</string>
<string name="policydesc_expirePassword" msgid="1729725226314691591">"Nastavte, ako často sa musí zmeniť heslo na uzamknutie obrazovky."</string>
<string name="policylab_encryptedStorage" msgid="8901326199909132915">"Nastaviť šifr. ukl. priestoru"</string>
<string name="policydesc_encryptedStorage" msgid="2637732115325316992">"Vyžadovať šifrovanie uložených údajov aplikácií."</string>
@@ -1138,7 +1138,7 @@
<string name="anr_application_process" msgid="8941757607340481057">"Aplikácia <xliff:g id="APPLICATION">%1$s</xliff:g> neodpovedá. Chcete ju zavrieť?"</string>
<string name="anr_process" msgid="6513209874880517125">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> neodpovedá. \n\nChcete ho zavrieť?"</string>
<string name="force_close" msgid="8346072094521265605">"OK"</string>
- <string name="report" msgid="4060218260984795706">"Prehľad"</string>
+ <string name="report" msgid="4060218260984795706">"Nahlásiť"</string>
<string name="wait" msgid="7147118217226317732">"Čakajte"</string>
<string name="webpage_unresponsive" msgid="3272758351138122503">"Stránka nereaguje.\n\nChcete ju zavrieť?"</string>
<string name="launch_warning_title" msgid="1547997780506713581">"Presmerovaná aplikácia"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 94086b7d0371..131f4dbc5691 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -530,7 +530,7 @@
<string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Inaruhusu programu kupachika/kupachua hifadhi ya ndani."</string>
<string name="permlab_asec_rename" msgid="7496633954080472417">"ipe hifadhi ya ndani jina jipya"</string>
<string name="permdesc_asec_rename" msgid="1794757588472127675">"Inaruhusu programu kubadilisha jina la hifadhi ya ndani."</string>
- <string name="permlab_vibrate" msgid="7696427026057705834">"dhibiti mtetemo"</string>
+ <string name="permlab_vibrate" msgid="7696427026057705834">"Kudhibiti mtetemo"</string>
<string name="permdesc_vibrate" msgid="6284989245902300945">"Inaruhusu programu kudhibiti kitingishi."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"dhibiti tochi"</string>
<string name="permdesc_flashlight" msgid="6522284794568368310">"Inaruhusu programu kudhibiti tochi."</string>
@@ -606,7 +606,7 @@
<string name="permdesc_changeTetherState" msgid="1524441344412319780">"Inaruhusu programu kubadilisha hali ya muunganisho wa mtandao uliofungwa."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"badilisha mpangilio wa utumiaji data ya mandharinyuma"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="5347729578468744379">"Inaruhusu programu kubadilisha mpangilio wa matumizi ya data ya usuli."</string>
- <string name="permlab_accessWifiState" msgid="5202012949247040011">"ona miunganisho ya Wi-Fi"</string>
+ <string name="permlab_accessWifiState" msgid="5202012949247040011">"Kuona miunganisho ya Wi-Fi"</string>
<string name="permdesc_accessWifiState" msgid="5002798077387803726">"Inaruhusu programu kuona taarifa kuhusu mtandao wa Wi-Fi, kama vile ikiwa Wi-Fi imewezeshwa mna jina la vifaa vya Wi-Fi vilivyounganishwa."</string>
<string name="permlab_changeWifiState" msgid="6550641188749128035">"unganisha na utenganishe kutoka kwa Wi-Fi"</string>
<string name="permdesc_changeWifiState" msgid="7137950297386127533">"Inaruhusu programu kuunganisha kwenye au kukata kutoka pointi za ufikivu wa Wi-Fi na kufanya mabadiliko kwenye usanidi wa kifaa cha mitandao ya Wi-Fi."</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 593ff9e74abb..4832585f85c6 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1664,5 +1664,5 @@
<item quantity="other" msgid="4730868920742952817">"ลองอีกใน <xliff:g id="COUNT">%d</xliff:g> วินาที"</item>
</plurals>
<string name="restr_pin_try_later" msgid="973144472490532377">"ลองอีกครั้งในภายหลัง"</string>
- <string name="immersive_mode_confirmation" msgid="7227416894979047467">"กวาดนิ้วจากบนลงล่างเพื่อออกจากโหมดเต็มหน้าจอ"</string>
+ <string name="immersive_mode_confirmation" msgid="7227416894979047467">"กวาดนิ้วบนลงล่างเพื่อออกจากโหมดเต็มหน้าจอ"</string>
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 4d65fb9899b0..1fe5da4cd433 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -645,7 +645,7 @@
<string name="permdesc_readDictionary" msgid="659614600338904243">"Uygulamaya, kullanıcının kullanıcı sözlüğünde depolamış olabileceği kelimeleri, adları ve kelime öbeklerini okuma izni verir."</string>
<string name="permlab_writeDictionary" msgid="2183110402314441106">"kullanıcı tanımlı sözlüğe kelime ekle"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"Uygulamaya, kullanıcı sözlüğüne yeni kelimeler yazma izni verir."</string>
- <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"USB belleğimin içeriğini oku"</string>
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"USB belleğini okuma"</string>
<string name="permlab_sdcardRead" product="default" msgid="2188156462934977940">"SD kartımın içeriğini oku"</string>
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3446988712598386079">"Uygulamaya, USB depolama biriminizin içeriğini okuma izni verir."</string>
<string name="permdesc_sdcardRead" product="default" msgid="2607362473654975411">"Uygulamaya, SD kartınızın içeriğini okuma izni verir."</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index edf0014c46eb..dcf8cd7e7dd1 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -136,7 +136,7 @@
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Забагато видалень <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
<string name="low_memory" product="tablet" msgid="6494019234102154896">"Пам’ять планшетного ПК заповнено. Видаліть якісь файли, щоб звільнити місце."</string>
<string name="low_memory" product="default" msgid="3475999286680000541">"Пам’ять телефону заповнено. Видаліть якісь файли, щоб звільнити місце."</string>
- <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Мережу можуть відстежувати"</string>
+ <string name="ssl_ca_cert_warning" msgid="5848402127455021714">"Мережа може відстежуватися"</string>
<string name="ssl_ca_cert_noti_by_unknown" msgid="4475437862189850602">"Невідомою третьою стороною"</string>
<string name="ssl_ca_cert_noti_managed" msgid="4030263497686867141">"Доменом <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
<string name="me" msgid="6545696007631404292">"Я"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index e63ca3047d31..680c38259bec 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -170,7 +170,7 @@
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"声音已开启"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飞行模式"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"已开启飞行模式"</string>
- <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"已关闭飞行模式"</string>
+ <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"未开启飞行模式"</string>
<string name="status_bar_notification_info_overflow" msgid="5301981741705354993">"999+"</string>
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系统"</string>
@@ -477,9 +477,9 @@
<string name="permlab_installLocationProvider" msgid="6578101199825193873">"允许安装位置信息提供程序"</string>
<string name="permdesc_installLocationProvider" msgid="9066146120470591509">"创建用于测试的模拟位置源或安装新的位置提供程序。此权限可让该应用覆盖由其他位置源(如 GPS)或位置提供程序返回的位置和/或状态信息。"</string>
<string name="permlab_accessFineLocation" msgid="1191898061965273372">"精确位置(基于 GPS 和网络)"</string>
- <string name="permdesc_accessFineLocation" msgid="5295047563564981250">"允许该应用通过全球定位系统 (GPS) 或网络位置信息源(例如基站和 WLAN)获取您的精确位置信息。您必须在设备上开启这些位置服务,应用才能获得位置信息。应用会使用此类服务确定您的位置,这可能会消耗更多电量。"</string>
+ <string name="permdesc_accessFineLocation" msgid="5295047563564981250">"允许该应用通过全球定位系统(GPS)或网络位置信息源(例如基站和WLAN)获取您的精确位置信息。您必须在设备上开启这些位置信息服务,应用才能获得位置信息。应用会使用此类服务确定您的位置,这可能会消耗更多电量。"</string>
<string name="permlab_accessCoarseLocation" msgid="4887895362354239628">"大致位置(基于网络)"</string>
- <string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"允许该应用获取您的大致位置信息。这类位置信息来自于使用网络位置信息源(例如基站和 WLAN)的位置服务。您必须在设备上开启这些位置服务,应用才能获得位置信息。应用会使用此类服务确定您的大概位置。"</string>
+ <string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"允许该应用获取您的大致位置信息。这类位置信息来自于使用网络位置信息源(例如基站和WLAN)的位置信息服务。您必须在设备上开启这些位置信息服务,应用才能获得位置信息。应用会使用此类服务确定您的大概位置。"</string>
<string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"访问 SurfaceFlinger"</string>
<string name="permdesc_accessSurfaceFlinger" msgid="1041619516733293551">"允许应用使用 SurfaceFlinger 低级功能。"</string>
<string name="permlab_readFrameBuffer" msgid="6690504248178498136">"读取帧缓冲区"</string>
@@ -1120,7 +1120,7 @@
<string name="no" msgid="5141531044935541497">"取消"</string>
<string name="dialog_alert_title" msgid="2049658708609043103">"注意"</string>
<string name="loading" msgid="7933681260296021180">"正在加载..."</string>
- <string name="capital_on" msgid="1544682755514494298">"打开"</string>
+ <string name="capital_on" msgid="1544682755514494298">"开启"</string>
<string name="capital_off" msgid="6815870386972805832">"关闭"</string>
<string name="whichApplication" msgid="4533185947064773386">"选择要使用的应用:"</string>
<string name="whichHomeApplication" msgid="4616420172727326782">"选择主屏幕应用"</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 50b3a35dbdf7..a3b81327b738 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -352,6 +352,10 @@
<!-- Wifi driver supports batched scan -->
<bool translatable="false" name="config_wifi_batched_scan_supported">false</bool>
+ <!-- Wifi driver's fallback country code; WS is ISO-Alpha2 code for Samoa which
+ has restrictions on can be scanned; which may satisfy quite a few regulatory issues. -->
+ <string translatable="false" name="config_wifi_unknown_country_code">WS</string>
+
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 417135584de1..120027629a64 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -478,6 +478,7 @@
<java-symbol type="string" name="config_ntpServer" />
<java-symbol type="string" name="config_tether_apndata" />
<java-symbol type="string" name="config_useragentprofile_url" />
+ <java-symbol type="string" name="config_wifi_unknown_country_code" />
<java-symbol type="string" name="config_wifi_p2p_device_type" />
<java-symbol type="string" name="contentServiceSync" />
<java-symbol type="string" name="contentServiceSyncNotificationTitle" />
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java
index 5a4a2d0ba8d3..9d97ac58011e 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/NetworkState.java
@@ -101,9 +101,10 @@ public class NetworkState {
}
/*
- * Transition from CONNECTED -> DISCONNECTED:
- * CONNECTED->DISCONNECTING->DISCONNECTED
- * return false if any state transition is not valid and save a message in mReason
+ * Verifies state transition from CONNECTED->...-> DISCONNECTED.
+ *
+ * returns false if initial state or target state is not correct, or if there is
+ * any transition from DISCONNECTING/DISCONNECTED -> CONNECTED.
*/
public boolean transitToDisconnection () {
mReason = "states: " + printStates();
@@ -120,13 +121,13 @@ public class NetworkState {
for (int i = 1; i < mStateDepository.size() - 1; i++) {
State preState = mStateDepository.get(i-1);
State curState = mStateDepository.get(i);
- if ((preState == State.CONNECTED) && ((curState == State.DISCONNECTING) ||
+ if (preState == curState) {
+ continue;
+ } else if ((preState == State.CONNECTED) && ((curState == State.DISCONNECTING) ||
(curState == State.DISCONNECTED))) {
continue;
} else if ((preState == State.DISCONNECTING) && (curState == State.DISCONNECTED)) {
continue;
- } else if ((preState == State.DISCONNECTED) && (curState == State.DISCONNECTED)) {
- continue;
} else {
mReason += " Transition state from " + preState.toString() + " to " +
curState.toString() + " is not valid.";
@@ -136,7 +137,12 @@ public class NetworkState {
return true;
}
- // DISCONNECTED->CONNECTING->CONNECTED
+ /*
+ * Verifies state transition from DISCONNECTED->...-> CONNECTED.
+ *
+ * returns false if initial state or target state is not correct, or if there is
+ * any transition from CONNECED -> DISCONNECTED.
+ */
public boolean transitToConnection() {
mReason = "states: " + printStates();
if (mStateDepository.get(0) != State.DISCONNECTED) {
@@ -152,14 +158,15 @@ public class NetworkState {
for (int i = 1; i < mStateDepository.size(); i++) {
State preState = mStateDepository.get(i-1);
State curState = mStateDepository.get(i);
- if ((preState == State.DISCONNECTED) && ((curState == State.CONNECTING) ||
- (curState == State.CONNECTED) || (curState == State.DISCONNECTED))) {
+ if (preState == curState) {
continue;
- } else if ((preState == State.CONNECTING) && (curState == State.CONNECTED)) {
- continue;
- } else if ((preState == State.CONNECTED) && (curState == State.CONNECTED)) {
+ }
+ if ((preState == State.DISCONNECTED) && ((curState == State.CONNECTING) ||
+ (curState == State.CONNECTED))) {
continue;
- } else {
+ } else if ((preState == State.CONNECTING) && (curState == State.CONNECTED)) {
+ continue;
+ } else {
mReason += " Transition state from " + preState.toString() + " to " +
curState.toString() + " is not valid.";
return false;
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 17727d3160f0..74838ee2c14b 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -68,15 +68,6 @@ public final class Bitmap implements Parcelable {
*/
private boolean mIsPremultiplied;
- /**
- * Whether the Bitmap's content is expected to have alpha. Note that hasAlpha()
- * does not directly return this value, because hasAlpha() may never return true
- * for a 565 Bitmap.
- *
- * Any time this or mIsPremultiplied is changed, both are passed to native so they
- * are not order dependent.
- */
- private boolean mHasAlpha;
private byte[] mNinePatchChunk; // may be null
private int[] mLayoutBounds; // may be null
private int mWidth;
@@ -564,7 +555,7 @@ public final class Bitmap implements Parcelable {
checkRecycled("Can't copy a recycled bitmap");
Bitmap b = nativeCopy(mNativeBitmap, config.nativeInt, isMutable);
if (b != null) {
- b.setAlphaAndPremultiplied(mHasAlpha, mIsPremultiplied);
+ b.setAlphaAndPremultiplied(hasAlpha(), mIsPremultiplied);
b.mDensity = mDensity;
}
return b;
@@ -741,7 +732,7 @@ public final class Bitmap implements Parcelable {
// The new bitmap was created from a known bitmap source so assume that
// they use the same density
bitmap.mDensity = source.mDensity;
- bitmap.setAlphaAndPremultiplied(source.mHasAlpha, source.mIsPremultiplied);
+ bitmap.setAlphaAndPremultiplied(source.hasAlpha(), source.mIsPremultiplied);
canvas.setBitmap(bitmap);
canvas.drawBitmap(source, srcR, dstR, paint);
@@ -894,7 +885,6 @@ public final class Bitmap implements Parcelable {
if (display != null) {
bm.mDensity = display.densityDpi;
}
- bm.mHasAlpha = true;
return bm;
}
@@ -1062,12 +1052,11 @@ public final class Bitmap implements Parcelable {
*/
public final void setPremultiplied(boolean premultiplied) {
mIsPremultiplied = premultiplied;
- nativeSetAlphaAndPremultiplied(mNativeBitmap, mHasAlpha, premultiplied);
+ nativeSetAlphaAndPremultiplied(mNativeBitmap, hasAlpha(), premultiplied);
}
/** Helper function to set both alpha and premultiplied. **/
private final void setAlphaAndPremultiplied(boolean hasAlpha, boolean premultiplied) {
- mHasAlpha = hasAlpha;
mIsPremultiplied = premultiplied;
nativeSetAlphaAndPremultiplied(mNativeBitmap, hasAlpha, premultiplied);
}
@@ -1230,7 +1219,6 @@ public final class Bitmap implements Parcelable {
* non-opaque per-pixel alpha values.
*/
public void setHasAlpha(boolean hasAlpha) {
- mHasAlpha = hasAlpha;
nativeSetAlphaAndPremultiplied(mNativeBitmap, hasAlpha, mIsPremultiplied);
}
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp
index 7814a01ad929..58f5325476eb 100644
--- a/libs/hwui/Program.cpp
+++ b/libs/hwui/Program.cpp
@@ -163,7 +163,7 @@ GLuint Program::buildShader(const char* source, GLenum type) {
void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix,
const mat4& transformMatrix, bool offset) {
- if (projectionMatrix != mProjection) {
+ if (projectionMatrix != mProjection || offset != mOffset) {
if (CC_LIKELY(!offset)) {
glUniformMatrix4fv(projection, 1, GL_FALSE, &projectionMatrix.data[0]);
} else {
@@ -177,6 +177,7 @@ void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix,
glUniformMatrix4fv(projection, 1, GL_FALSE, &p.data[0]);
}
mProjection = projectionMatrix;
+ mOffset = offset;
}
mat4 t(transformMatrix);
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h
index 4f94afce9164..f6ac8ec76da8 100644
--- a/libs/hwui/Program.h
+++ b/libs/hwui/Program.h
@@ -431,6 +431,7 @@ private:
bool mHasSampler;
mat4 mProjection;
+ bool mOffset;
}; // class Program
}; // namespace uirenderer
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 706258a9cd85..2c16b5eef634 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -3128,7 +3128,7 @@ public class MediaPlayer implements SubtitleController.Listener
if (refreshTime ||
nanoTime >= mLastNanoTime + MAX_NS_WITHOUT_POSITION_CHECK) {
try {
- mLastTimeUs = mPlayer.getCurrentPosition() * 1000;
+ mLastTimeUs = mPlayer.getCurrentPosition() * 1000L;
mPaused = !mPlayer.isPlaying();
if (DEBUG) Log.v(TAG, (mPaused ? "paused" : "playing") + " at " + mLastTimeUs);
} catch (IllegalStateException e) {
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
index 1bae9b83e9da..247089f5bad1 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardHostView.java
@@ -1655,6 +1655,7 @@ public class KeyguardHostView extends KeyguardViewBase {
KeyguardWidgetFrame frame = mAppWidgetContainer.getWidgetPageAt(i);
frame.removeAllViews();
}
+ mSecurityViewContainer.onPause(); // clean up any actions in progress
}
/**
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_available.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_available.png
index 1c3518af96a2..f256fbbb246a 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_available.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_available.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connected.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connected.png
index 9dbc65ec38c3..b946ec9029f7 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connected.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png
index ddb002d39f86..48606a8d0513 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png
index 43b7ef2793d6..d006f13e4b46 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png
index 1d8b7ee1cc31..867947b22d6d 100644
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png
+++ b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_available.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_available.png
index 11b2134495ae..b1e984c7c0a0 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_available.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_available.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connected.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connected.png
index a858573e0275..ceda1bb6398a 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connected.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png
index 04de5d7f8d68..25fc7593beb1 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png
index caea37e6c0c7..9dfc3c6537fa 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png
index b66aa46d36d6..82f4113b39b1 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_available.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_available.png
index 10ebcd5e2ccf..47be502e0a31 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_available.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_available.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connected.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connected.png
index fef43b8ca3e1..4b12809b9c96 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connected.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png
index 05e32677c583..945c6060055a 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png
index ef42b27e94b5..0a3f73e1b7bb 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png
index fc1c95e4dee1..398cbef8baa0 100644
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_available.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_available.png
index 68b1b7c75b74..8e225af212ef 100644
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_available.png
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_available.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connected.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connected.png
index 8a8f890298b1..937202bdf809 100644
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connected.png
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connected.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png
index 12d4a0178d37..4621d185380a 100644
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png
index 3cb44217cb12..a1ab61be9c7d 100644
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png
index 4620b3a2decd..ea42a7f670b5 100644
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png
+++ b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png
Binary files differ
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 4b0c2cb31ee8..8092ab3e4243 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -27,13 +27,16 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Point;
import android.graphics.Rect;
+import android.graphics.RectF;
import android.graphics.Region.Op;
import android.opengl.GLUtils;
import android.os.SystemProperties;
import android.renderscript.Matrix4f;
import android.service.wallpaper.WallpaperService;
import android.util.Log;
+import android.view.Display;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.WindowManager;
@@ -107,10 +110,12 @@ public class ImageWallpaper extends WallpaperService {
private WallpaperObserver mReceiver;
Bitmap mBackground;
+ int mBackgroundWidth = -1, mBackgroundHeight = -1;
int mLastSurfaceWidth = -1, mLastSurfaceHeight = -1;
int mLastRotation = -1;
- float mXOffset;
- float mYOffset;
+ float mXOffset = 0.5f;
+ float mYOffset = 0.5f;
+ float mScale = 1f;
boolean mVisible = true;
boolean mRedrawNeeded;
@@ -155,6 +160,8 @@ public class ImageWallpaper extends WallpaperService {
mLastSurfaceWidth = mLastSurfaceHeight = -1;
mBackground = null;
+ mBackgroundWidth = -1;
+ mBackgroundHeight = -1;
mRedrawNeeded = true;
drawFrame();
}
@@ -173,6 +180,8 @@ public class ImageWallpaper extends WallpaperService {
}
mBackground.recycle();
mBackground = null;
+ mBackgroundWidth = -1;
+ mBackgroundHeight = -1;
mWallpaperManager.forgetLoadedWallpaper();
}
}
@@ -204,21 +213,40 @@ public class ImageWallpaper extends WallpaperService {
}
}
- @Override
- public void onDesiredSizeChanged(int desiredWidth, int desiredHeight) {
- super.onDesiredSizeChanged(desiredWidth, desiredHeight);
- SurfaceHolder surfaceHolder = getSurfaceHolder();
- if (surfaceHolder != null) {
- updateSurfaceSize(surfaceHolder);
+ void updateSurfaceSize(SurfaceHolder surfaceHolder) {
+ Point p = getDefaultDisplaySize();
+
+ // Load background image dimensions, if we haven't saved them yet
+ if (mBackgroundWidth <= 0 || mBackgroundHeight <= 0) {
+ // Need to load the image to get dimensions
+ mWallpaperManager.forgetLoadedWallpaper();
+ updateWallpaperLocked();
+ if (mBackgroundWidth <= 0 || mBackgroundHeight <= 0) {
+ // Default to the display size if we can't find the dimensions
+ mBackgroundWidth = p.x;
+ mBackgroundHeight = p.y;
+ }
+ }
+
+ // Force the wallpaper to cover the screen in both dimensions
+ int surfaceWidth = Math.max(p.x, mBackgroundWidth);
+ int surfaceHeight = Math.max(p.y, mBackgroundHeight);
+
+ // If the surface dimensions haven't changed, then just return
+ final Rect frame = surfaceHolder.getSurfaceFrame();
+ if (frame != null) {
+ final int dw = frame.width();
+ final int dh = frame.height();
+ if (surfaceWidth == dw && surfaceHeight == dh) {
+ return;
+ }
}
- }
- void updateSurfaceSize(SurfaceHolder surfaceHolder) {
if (FIXED_SIZED_SURFACE) {
// Used a fixed size surface, because we are special. We can do
// this because we know the current design of window animations doesn't
// cause this to break.
- surfaceHolder.setFixedSize(getDesiredMinimumWidth(), getDesiredMinimumHeight());
+ surfaceHolder.setFixedSize(surfaceWidth, surfaceHeight);
} else {
surfaceHolder.setSizeFromLayout();
}
@@ -298,13 +326,30 @@ public class ImageWallpaper extends WallpaperService {
drawFrame();
}
+ private Point getDefaultDisplaySize() {
+ Point p = new Point();
+ Context c = ImageWallpaper.this.getApplicationContext();
+ WindowManager wm = (WindowManager)c.getSystemService(Context.WINDOW_SERVICE);
+ Display d = wm.getDefaultDisplay();
+ d.getRealSize(p);
+ return p;
+ }
+
void drawFrame() {
+ int newRotation = ((WindowManager) getSystemService(WINDOW_SERVICE)).
+ getDefaultDisplay().getRotation();
+
+ // Sometimes a wallpaper is not large enough to cover the screen in one dimension.
+ // Call updateSurfaceSize -- it will only actually do the update if the dimensions
+ // should change
+ if (newRotation != mLastRotation) {
+ // Update surface size (if necessary)
+ updateSurfaceSize(getSurfaceHolder());
+ }
SurfaceHolder sh = getSurfaceHolder();
final Rect frame = sh.getSurfaceFrame();
final int dw = frame.width();
final int dh = frame.height();
- int newRotation = ((WindowManager) getSystemService(WINDOW_SERVICE)).
- getDefaultDisplay().getRotation();
boolean surfaceDimensionsChanged = dw != mLastSurfaceWidth || dh != mLastSurfaceHeight;
boolean redrawNeeded = surfaceDimensionsChanged || newRotation != mLastRotation;
@@ -343,10 +388,21 @@ public class ImageWallpaper extends WallpaperService {
}
}
- final int availw = dw - mBackground.getWidth();
- final int availh = dh - mBackground.getHeight();
- int xPixels = availw < 0 ? (int)(availw * mXOffset + .5f) : (availw / 2);
- int yPixels = availh < 0 ? (int)(availh * mYOffset + .5f) : (availh / 2);
+ // Center the scaled image
+ mScale = Math.max(1f, Math.max(dw / (float) mBackground.getWidth(),
+ dh / (float) mBackground.getHeight()));
+ final int availw = dw - (int) (mBackground.getWidth() * mScale);
+ final int availh = dh - (int) (mBackground.getHeight() * mScale);
+ int xPixels = availw / 2;
+ int yPixels = availh / 2;
+
+ // Adjust the image for xOffset/yOffset values. If window manager is handling offsets,
+ // mXOffset and mYOffset are set to 0.5f by default and therefore xPixels and yPixels
+ // will remain unchanged
+ final int availwUnscaled = dw - mBackground.getWidth();
+ final int availhUnscaled = dh - mBackground.getHeight();
+ if (availwUnscaled < 0) xPixels += (int)(availwUnscaled * (mXOffset - .5f) + .5f);
+ if (availhUnscaled < 0) yPixels += (int)(availhUnscaled * (mYOffset - .5f) + .5f);
mOffsetsChanged = false;
mRedrawNeeded = false;
@@ -354,8 +410,6 @@ public class ImageWallpaper extends WallpaperService {
mLastSurfaceWidth = dw;
mLastSurfaceHeight = dh;
}
- mLastXTranslation = xPixels;
- mLastYTranslation = yPixels;
if (!redrawNeeded && xPixels == mLastXTranslation && yPixels == mLastYTranslation) {
if (DEBUG) {
Log.d(TAG, "Suppressed drawFrame since the image has not "
@@ -363,6 +417,8 @@ public class ImageWallpaper extends WallpaperService {
}
return;
}
+ mLastXTranslation = xPixels;
+ mLastYTranslation = yPixels;
if (DEBUG) {
Log.d(TAG, "Redrawing wallpaper");
@@ -391,7 +447,11 @@ public class ImageWallpaper extends WallpaperService {
Throwable exception = null;
try {
mBackground = null;
+ mBackgroundWidth = -1;
+ mBackgroundHeight = -1;
mBackground = mWallpaperManager.getBitmap();
+ mBackgroundWidth = mBackground.getWidth();
+ mBackgroundHeight = mBackground.getHeight();
} catch (RuntimeException e) {
exception = e;
} catch (OutOfMemoryError e) {
@@ -400,6 +460,8 @@ public class ImageWallpaper extends WallpaperService {
if (exception != null) {
mBackground = null;
+ mBackgroundWidth = -1;
+ mBackgroundHeight = -1;
// Note that if we do fail at this, and the default wallpaper can't
// be loaded, we will go into a cycle. Don't do a build where the
// default wallpaper can't be loaded.
@@ -413,24 +475,27 @@ public class ImageWallpaper extends WallpaperService {
}
}
- private void drawWallpaperWithCanvas(SurfaceHolder sh, int w, int h, int x, int y) {
+ private void drawWallpaperWithCanvas(SurfaceHolder sh, int w, int h, int left, int top) {
Canvas c = sh.lockCanvas();
if (c != null) {
try {
if (DEBUG) {
- Log.d(TAG, "Redrawing: x=" + x + ", y=" + y);
+ Log.d(TAG, "Redrawing: left=" + left + ", top=" + top);
}
- c.translate(x, y);
+ final float right = left + mBackground.getWidth() * mScale;
+ final float bottom = top + mBackground.getHeight() * mScale;
if (w < 0 || h < 0) {
c.save(Canvas.CLIP_SAVE_FLAG);
- c.clipRect(0, 0, mBackground.getWidth(), mBackground.getHeight(),
+ c.clipRect(left, top, right, bottom,
Op.DIFFERENCE);
c.drawColor(0xff000000);
c.restore();
}
if (mBackground != null) {
- c.drawBitmap(mBackground, 0, 0, null);
+ RectF dest = new RectF(left, top, right, bottom);
+ // add a filter bitmap?
+ c.drawBitmap(mBackground, null, dest, null);
}
} finally {
sh.unlockCanvasAndPost(c);
@@ -441,8 +506,8 @@ public class ImageWallpaper extends WallpaperService {
private boolean drawWallpaperWithOpenGL(SurfaceHolder sh, int w, int h, int left, int top) {
if (!initGL(sh)) return false;
- final float right = left + mBackground.getWidth();
- final float bottom = top + mBackground.getHeight();
+ final float right = left + mBackground.getWidth() * mScale;
+ final float bottom = top + mBackground.getHeight() * mScale;
final Rect frame = sh.getSurfaceFrame();
final Matrix4f ortho = new Matrix4f();
diff --git a/packages/WallpaperCropper/res/layout/actionbar_set_wallpaper.xml b/packages/WallpaperCropper/res/layout/actionbar_set_wallpaper.xml
index 1622742a52a2..2a0188ae2b6a 100644
--- a/packages/WallpaperCropper/res/layout/actionbar_set_wallpaper.xml
+++ b/packages/WallpaperCropper/res/layout/actionbar_set_wallpaper.xml
@@ -20,6 +20,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:actionButtonStyle"
+ android:id="@+id/set_wallpaper_button"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView style="?android:actionBarTabTextStyle"
diff --git a/packages/WallpaperCropper/res/values/config.xml b/packages/WallpaperCropper/res/values/config.xml
index 1b2419073502..2e2fa6fd250a 100644
--- a/packages/WallpaperCropper/res/values/config.xml
+++ b/packages/WallpaperCropper/res/values/config.xml
@@ -15,4 +15,7 @@
-->
<resources>
<bool name="allow_rotation">false</bool>
+ <!-- Specifies whether to expand the cropped area on both sides (rather
+ than just to one side) -->
+ <bool name="center_crop">true</bool>
</resources>
diff --git a/packages/WallpaperCropper/src/com/android/wallpapercropper/CropView.java b/packages/WallpaperCropper/src/com/android/wallpapercropper/CropView.java
index 14f7c1d1f7cf..c3ef3024f484 100644
--- a/packages/WallpaperCropper/src/com/android/wallpapercropper/CropView.java
+++ b/packages/WallpaperCropper/src/com/android/wallpapercropper/CropView.java
@@ -165,7 +165,8 @@ public class CropView extends TiledImageView implements OnScaleGestureListener {
final float imageWidth = imageDims[0];
final float imageHeight = imageDims[1];
mMinScale = Math.max(w / imageWidth, h / imageHeight);
- mRenderer.scale = Math.max(mMinScale, mRenderer.scale);
+ mRenderer.scale =
+ Math.max(mMinScale, resetScale ? Float.MIN_VALUE : mRenderer.scale);
}
}
}
diff --git a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
index 7b3f112ff8c6..757a7a2f0e5c 100644
--- a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
+++ b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
@@ -73,6 +73,7 @@ public class WallpaperCropActivity extends Activity {
protected CropView mCropView;
protected Uri mUri;
+ private View mSetWallpaperButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -109,10 +110,12 @@ public class WallpaperCropActivity extends Activity {
cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone);
}
});
+ mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);
// Load image in background
final BitmapRegionTileSource.UriBitmapSource bitmapSource =
new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024);
+ mSetWallpaperButton.setVisibility(View.INVISIBLE);
Runnable onLoad = new Runnable() {
public void run() {
if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) {
@@ -120,6 +123,8 @@ public class WallpaperCropActivity extends Activity {
getString(R.string.wallpaper_load_fail),
Toast.LENGTH_LONG).show();
finish();
+ } else {
+ mSetWallpaperButton.setVisibility(View.VISIBLE);
}
}
};
@@ -326,10 +331,10 @@ public class WallpaperCropActivity extends Activity {
protected void cropImageAndSetWallpaper(Uri uri,
OnBitmapCroppedHandler onBitmapCroppedHandler, final boolean finishActivityWhenDone) {
+ boolean centerCrop = getResources().getBoolean(R.bool.center_crop);
// Get the crop
boolean ltr = mCropView.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
-
Display d = getWindowManager().getDefaultDisplay();
Point displaySize = new Point();
@@ -341,16 +346,17 @@ public class WallpaperCropActivity extends Activity {
// Get the crop
RectF cropRect = mCropView.getCrop();
+ Point inSize = mCropView.getSourceDimensions();
+
// Due to rounding errors in the cropview renderer the edges can be slightly offset
// therefore we ensure that the boundaries are sanely defined
cropRect.left = Math.max(0, cropRect.left);
- cropRect.right = Math.min(mCropView.getWidth(), cropRect.right);
+ cropRect.right = Math.min(inSize.x, cropRect.right);
cropRect.top = Math.max(0, cropRect.top);
- cropRect.bottom = Math.min(mCropView.getHeight(), cropRect.bottom);
+ cropRect.bottom = Math.min(inSize.y, cropRect.bottom);
int cropRotation = mCropView.getImageRotation();
float cropScale = mCropView.getWidth() / (float) cropRect.width();
- Point inSize = mCropView.getSourceDimensions();
Matrix rotateMatrix = new Matrix();
rotateMatrix.setRotate(cropRotation);
float[] rotatedInSize = new float[] { inSize.x, inSize.y };
@@ -361,15 +367,25 @@ public class WallpaperCropActivity extends Activity {
// ADJUST CROP WIDTH
// Extend the crop all the way to the right, for parallax
// (or all the way to the left, in RTL)
- float extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left;
+ float extraSpace;
+ if (centerCrop) {
+ extraSpace = 2f * Math.min(rotatedInSize[0] - cropRect.right, cropRect.left);
+ } else {
+ extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left;
+ }
// Cap the amount of extra width
float maxExtraSpace = defaultWallpaperSize.x / cropScale - cropRect.width();
extraSpace = Math.min(extraSpace, maxExtraSpace);
- if (ltr) {
- cropRect.right += extraSpace;
+ if (centerCrop) {
+ cropRect.left -= extraSpace / 2f;
+ cropRect.right += extraSpace / 2f;
} else {
- cropRect.left -= extraSpace;
+ if (ltr) {
+ cropRect.right += extraSpace;
+ } else {
+ cropRect.left -= extraSpace;
+ }
}
// ADJUST CROP HEIGHT
@@ -557,6 +573,8 @@ public class WallpaperCropActivity extends Activity {
Rect roundedTrueCrop = new Rect();
Matrix rotateMatrix = new Matrix();
Matrix inverseRotateMatrix = new Matrix();
+
+ Point bounds = getImageBounds();
if (mRotation > 0) {
rotateMatrix.setRotate(mRotation);
inverseRotateMatrix.setRotate(-mRotation);
@@ -564,7 +582,6 @@ public class WallpaperCropActivity extends Activity {
mCropBounds.roundOut(roundedTrueCrop);
mCropBounds = new RectF(roundedTrueCrop);
- Point bounds = getImageBounds();
if (bounds == null) {
Log.w(LOGTAG, "cannot get bounds for image");
failure = true;
@@ -636,12 +653,38 @@ public class WallpaperCropActivity extends Activity {
Utils.closeSilently(is);
}
if (fullSize != null) {
+ // Find out the true sample size that was used by the decoder
+ scaleDownSampleSize = bounds.x / fullSize.getWidth();
mCropBounds.left /= scaleDownSampleSize;
mCropBounds.top /= scaleDownSampleSize;
mCropBounds.bottom /= scaleDownSampleSize;
mCropBounds.right /= scaleDownSampleSize;
mCropBounds.roundOut(roundedTrueCrop);
+ // Adjust values to account for issues related to rounding
+ if (roundedTrueCrop.width() > fullSize.getWidth()) {
+ // Adjust the width
+ roundedTrueCrop.right = roundedTrueCrop.left + fullSize.getWidth();
+ }
+ if (roundedTrueCrop.right > fullSize.getWidth()) {
+ // Adjust the left value
+ int adjustment = roundedTrueCrop.left -
+ Math.max(0, roundedTrueCrop.right - roundedTrueCrop.width());
+ roundedTrueCrop.left -= adjustment;
+ roundedTrueCrop.right -= adjustment;
+ }
+ if (roundedTrueCrop.height() > fullSize.getHeight()) {
+ // Adjust the height
+ roundedTrueCrop.bottom = roundedTrueCrop.top + fullSize.getHeight();
+ }
+ if (roundedTrueCrop.bottom > fullSize.getHeight()) {
+ // Adjust the top value
+ int adjustment = roundedTrueCrop.top -
+ Math.max(0, roundedTrueCrop.bottom - roundedTrueCrop.height());
+ roundedTrueCrop.top -= adjustment;
+ roundedTrueCrop.bottom -= adjustment;
+ }
+
crop = Bitmap.createBitmap(fullSize, roundedTrueCrop.left,
roundedTrueCrop.top, roundedTrueCrop.width(),
roundedTrueCrop.height());
@@ -766,14 +809,15 @@ public class WallpaperCropActivity extends Activity {
final WallpaperManager wallpaperManager) {
final Point defaultWallpaperSize = getDefaultWallpaperSize(res, windowManager);
- new Thread("suggestWallpaperDimension") {
- public void run() {
+ new AsyncTask<Void, Void, Void>() {
+ public Void doInBackground(Void ... args) {
// If we have saved a wallpaper width/height, use that instead
int savedWidth = sharedPrefs.getInt(WALLPAPER_WIDTH_KEY, defaultWallpaperSize.x);
int savedHeight = sharedPrefs.getInt(WALLPAPER_HEIGHT_KEY, defaultWallpaperSize.y);
wallpaperManager.suggestDesiredDimensions(savedWidth, savedHeight);
+ return null;
}
- }.start();
+ }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null);
}
protected static RectF getMaxCropRect(
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index b28cef57b130..d36b8f1a3855 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -105,6 +105,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.HashSet;
import static android.view.WindowManager.LayoutParams.*;
import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT;
@@ -381,7 +382,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final Rect mTmpNavigationFrame = new Rect();
WindowState mTopFullscreenOpaqueWindowState;
- boolean mHideWindowBehindKeyguard;
+ HashSet<IApplicationToken> mAppsToBeHidden = new HashSet<IApplicationToken>();
boolean mTopIsFullscreen;
boolean mForceStatusBar;
boolean mForceStatusBarFromKeyguard;
@@ -3366,7 +3367,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) {
mTopFullscreenOpaqueWindowState = null;
- mHideWindowBehindKeyguard = false;
+ mAppsToBeHidden.clear();
mForceStatusBar = false;
mForceStatusBarFromKeyguard = false;
mForcingShowNavBar = false;
@@ -3416,12 +3417,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final boolean showWhenLocked = (attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
if (appWindow) {
+ if (showWhenLocked) {
+ mAppsToBeHidden.remove(win.getAppToken());
+ } else {
+ mAppsToBeHidden.add(win.getAppToken());
+ }
if (attrs.x == 0 && attrs.y == 0
&& attrs.width == WindowManager.LayoutParams.MATCH_PARENT
&& attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
if (DEBUG_LAYOUT) Slog.v(TAG, "Fullscreen window: " + win);
mTopFullscreenOpaqueWindowState = win;
- if (!mHideWindowBehindKeyguard) {
+ if (mAppsToBeHidden.isEmpty()) {
if (showWhenLocked) {
if (DEBUG_LAYOUT) Slog.v(TAG,
"Setting mHideLockScreen to true by win " + win);
@@ -3441,8 +3447,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
mAllowLockscreenWhenOn = true;
}
- } else if (!showWhenLocked) {
- mHideWindowBehindKeyguard = true;
}
}
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index e283da99368d..41a0e6b9a61d 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3907,7 +3907,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
boolean forwardDns) {
try {
mNetd.clearUidRangeRoute(interfaze, uidStart, uidEnd);
- if (forwardDns) mNetd.clearDnsInterfaceForUidRange(uidStart, uidEnd);
+ if (forwardDns) mNetd.clearDnsInterfaceForUidRange(interfaze, uidStart, uidEnd);
} catch (RemoteException e) {
}
@@ -4062,6 +4062,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
*/
private static final int CMP_RESULT_CODE_PROVISIONING_NETWORK = 5;
+ /**
+ * The mobile network is provisioning
+ */
+ private static final int CMP_RESULT_CODE_IS_PROVISIONING = 6;
+
+ private AtomicBoolean mIsProvisioningNetwork = new AtomicBoolean(false);
+ private AtomicBoolean mIsStartingProvisioning = new AtomicBoolean(false);
+
private AtomicBoolean mIsCheckingMobileProvisioning = new AtomicBoolean(false);
@Override
@@ -4132,11 +4140,25 @@ public class ConnectivityService extends IConnectivityManager.Stub {
setProvNotificationVisible(true,
ConnectivityManager.TYPE_MOBILE_HIPRI, ni.getExtraInfo(),
url);
+ // Mark that we've got a provisioning network and
+ // Disable Mobile Data until user actually starts provisioning.
+ mIsProvisioningNetwork.set(true);
+ MobileDataStateTracker mdst = (MobileDataStateTracker)
+ mNetTrackers[ConnectivityManager.TYPE_MOBILE];
+ mdst.setInternalDataEnable(false);
} else {
if (DBG) log("CheckMp.onComplete: warm (no dns/tcp), no url");
}
break;
}
+ case CMP_RESULT_CODE_IS_PROVISIONING: {
+ // FIXME: Need to know when provisioning is done. Probably we can
+ // check the completion status if successful we're done if we
+ // "timedout" or still connected to provisioning APN turn off data?
+ if (DBG) log("CheckMp.onComplete: provisioning started");
+ mIsStartingProvisioning.set(false);
+ break;
+ }
default: {
loge("CheckMp.onComplete: ignore unexpected result=" + result);
break;
@@ -4286,6 +4308,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return result;
}
+ if (mCs.mIsStartingProvisioning.get()) {
+ result = CMP_RESULT_CODE_IS_PROVISIONING;
+ log("isMobileOk: X is provisioning result=" + result);
+ return result;
+ }
+
// See if we've already determined we've got a provisioning connection,
// if so we don't need to do anything active.
MobileDataStateTracker mdstDefault = (MobileDataStateTracker)
@@ -4620,19 +4648,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
};
private void handleMobileProvisioningAction(String url) {
- // Notication mark notification as not visible
+ // Mark notification as not visible
setProvNotificationVisible(false, ConnectivityManager.TYPE_MOBILE_HIPRI, null, null);
// If provisioning network handle as a special case,
// otherwise launch browser with the intent directly.
- NetworkInfo ni = getProvisioningNetworkInfo();
- if ((ni != null) && ni.isConnectedToProvisioningNetwork()) {
- if (DBG) log("handleMobileProvisioningAction: on provisioning network");
+ if (mIsProvisioningNetwork.get()) {
+ if (DBG) log("handleMobileProvisioningAction: on prov network enable then launch");
+ mIsStartingProvisioning.set(true);
MobileDataStateTracker mdst = (MobileDataStateTracker)
mNetTrackers[ConnectivityManager.TYPE_MOBILE];
+ mdst.setEnableFailFastMobileData(DctConstants.ENABLED);
mdst.enableMobileProvisioning(url);
} else {
- if (DBG) log("handleMobileProvisioningAction: on default network");
+ if (DBG) log("handleMobileProvisioningAction: not prov network, launch browser directly");
Intent newIntent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
Intent.CATEGORY_APP_BROWSER);
newIntent.setData(Uri.parse(url));
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 92f99c2e4aec..72fce62e62b1 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -1567,10 +1567,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
@Override
- public void clearDnsInterfaceForUidRange(int uid_start, int uid_end) {
+ public void clearDnsInterfaceForUidRange(String iface, int uid_start, int uid_end) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
- mConnector.execute("resolver", "clearifaceforuidrange", uid_start, uid_end);
+ mConnector.execute("resolver", "clearifaceforuidrange", iface, uid_start, uid_end);
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 04386759df50..dedc9bd48c7e 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -260,10 +260,11 @@ public class NotificationManagerService extends INotificationManager.Stub
@Override
public void binderDied() {
- if (connection == null) {
- // This is not a service; it won't be recreated. We can give up this connection.
- unregisterListener(this.listener, this.userid);
- }
+ // Remove the listener, but don't unbind from the service. The system will bring the
+ // service back up, and the onServiceConnected handler will readd the listener with the
+ // new binding. If this isn't a bound service, and is just a registered
+ // INotificationListener, just removing it from the list is all we need to do anyway.
+ removeListenerImpl(this.listener, this.userid);
}
/** convenience method for looking in mEnabledListenersForCurrentUser */
@@ -757,26 +758,36 @@ public class NotificationManagerService extends INotificationManager.Stub
}
/**
- * Remove a listener binder directly
+ * Removes a listener from the list and unbinds from its service.
*/
- @Override
- public void unregisterListener(INotificationListener listener, int userid) {
- // no need to check permissions; if your listener binder is in the list,
- // that's proof that you had permission to add it in the first place
+ public void unregisterListener(final INotificationListener listener, final int userid) {
+ if (listener == null) return;
+
+ NotificationListenerInfo info = removeListenerImpl(listener, userid);
+ if (info != null && info.connection != null) {
+ mContext.unbindService(info.connection);
+ }
+ }
+ /**
+ * Removes a listener from the list but does not unbind from the listener's service.
+ *
+ * @return the removed listener.
+ */
+ NotificationListenerInfo removeListenerImpl(
+ final INotificationListener listener, final int userid) {
+ NotificationListenerInfo listenerInfo = null;
synchronized (mNotificationList) {
final int N = mListeners.size();
for (int i=N-1; i>=0; i--) {
final NotificationListenerInfo info = mListeners.get(i);
if (info.listener.asBinder() == listener.asBinder()
&& info.userid == userid) {
- mListeners.remove(i);
- if (info.connection != null) {
- mContext.unbindService(info.connection);
- }
+ listenerInfo = mListeners.remove(i);
}
}
}
+ return listenerInfo;
}
/**
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java
index 62e134044326..d616f1b66e7a 100644
--- a/services/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1709,6 +1709,7 @@ public final class ActivityStackSupervisor {
TaskRecord sourceTask = sourceRecord.task;
targetStack = sourceTask.stack;
moveHomeStack(targetStack.isHomeStack());
+ mWindowManager.moveTaskToTop(sourceTask.taskId);
if (!addingToTask &&
(launchFlags&Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
// In this case, we are adding the activity to an existing
@@ -1767,6 +1768,7 @@ public final class ActivityStackSupervisor {
r.setTask(prev != null ? prev.task
: targetStack.createTaskRecord(getNextTaskId(), r.info, intent, true),
null, true);
+ mWindowManager.moveTaskToTop(r.task.taskId);
if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+ " in new guessed " + r.task);
}
diff --git a/services/java/com/android/server/am/TaskRecord.java b/services/java/com/android/server/am/TaskRecord.java
index 5f32dbb4b419..9105103ac632 100644
--- a/services/java/com/android/server/am/TaskRecord.java
+++ b/services/java/com/android/server/am/TaskRecord.java
@@ -163,7 +163,7 @@ final class TaskRecord extends ThumbnailHolder {
final void setFrontOfTask() {
boolean foundFront = false;
final int numActivities = mActivities.size();
- for (int activityNdx = 0; numActivities < activityNdx; ++activityNdx) {
+ for (int activityNdx = 0; activityNdx < numActivities; ++activityNdx) {
final ActivityRecord r = mActivities.get(activityNdx);
if (foundFront || r.finishing) {
r.frontOfTask = false;
diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java
index 03405e7c0cbc..8f25860172de 100644
--- a/services/java/com/android/server/connectivity/Vpn.java
+++ b/services/java/com/android/server/connectivity/Vpn.java
@@ -352,6 +352,12 @@ public class Vpn extends BaseNetworkStateTracker {
Binder.restoreCallingIdentity(token);
}
+ // Save the old config in case we need to go back.
+ VpnConfig oldConfig = mConfig;
+ String oldInterface = mInterface;
+ Connection oldConnection = mConnection;
+ SparseBooleanArray oldUsers = mVpnUsers;
+
// Configure the interface. Abort if any of these steps fails.
ParcelFileDescriptor tun = ParcelFileDescriptor.adoptFd(jniCreate(config.mtu));
try {
@@ -371,12 +377,7 @@ public class Vpn extends BaseNetworkStateTracker {
new UserHandle(mUserId))) {
throw new IllegalStateException("Cannot bind " + config.user);
}
- if (mConnection != null) {
- mContext.unbindService(mConnection);
- }
- if (mInterface != null && !mInterface.equals(interfaze)) {
- jniReset(mInterface);
- }
+
mConnection = connection;
mInterface = interfaze;
@@ -385,50 +386,74 @@ public class Vpn extends BaseNetworkStateTracker {
config.interfaze = mInterface;
config.startTime = SystemClock.elapsedRealtime();
mConfig = config;
+
// Set up forwarding and DNS rules.
mVpnUsers = new SparseBooleanArray();
token = Binder.clearCallingIdentity();
try {
mCallback.setMarkedForwarding(mInterface);
- mCallback.setRoutes(interfaze, config.routes);
+ mCallback.setRoutes(mInterface, config.routes);
mCallback.override(mInterface, config.dnsServers, config.searchDomains);
addVpnUserLocked(mUserId);
-
+ // If we are owner assign all Restricted Users to this VPN
+ if (mUserId == UserHandle.USER_OWNER) {
+ for (UserInfo user : mgr.getUsers()) {
+ if (user.isRestricted()) {
+ try {
+ addVpnUserLocked(user.id);
+ } catch (Exception e) {
+ Log.wtf(TAG, "Failed to add user " + user.id + " to owner's VPN");
+ }
+ }
+ }
+ }
} finally {
Binder.restoreCallingIdentity(token);
}
+ if (oldConnection != null) {
+ mContext.unbindService(oldConnection);
+ }
+ if (oldInterface != null && !oldInterface.equals(interfaze)) {
+ // Remove the old tun's user forwarding rules
+ // The new tun's user rules have already been added so they will take over
+ // as rules are deleted. This prevents data leakage as the rules are moved over.
+ token = Binder.clearCallingIdentity();
+ try {
+ final int size = oldUsers.size();
+ final boolean forwardDns = (oldConfig.dnsServers != null &&
+ oldConfig.dnsServers.size() != 0);
+ for (int i = 0; i < size; i++) {
+ int user = oldUsers.keyAt(i);
+ mCallback.clearUserForwarding(oldInterface, user, forwardDns);
+ }
+ mCallback.clearMarkedForwarding(oldInterface);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ jniReset(oldInterface);
+ }
} catch (RuntimeException e) {
updateState(DetailedState.FAILED, "establish");
IoUtils.closeQuietly(tun);
// make sure marked forwarding is cleared if it was set
+ token = Binder.clearCallingIdentity();
try {
mCallback.clearMarkedForwarding(mInterface);
} catch (Exception ingored) {
// ignored
+ } finally {
+ Binder.restoreCallingIdentity(token);
}
+ // restore old state
+ mConfig = oldConfig;
+ mConnection = oldConnection;
+ mVpnUsers = oldUsers;
+ mInterface = oldInterface;
throw e;
}
Log.i(TAG, "Established by " + config.user + " on " + mInterface);
-
- // If we are owner assign all Restricted Users to this VPN
- if (mUserId == UserHandle.USER_OWNER) {
- token = Binder.clearCallingIdentity();
- try {
- for (UserInfo user : mgr.getUsers()) {
- if (user.isRestricted()) {
- try {
- addVpnUserLocked(user.id);
- } catch (Exception e) {
- Log.wtf(TAG, "Failed to add user " + user.id + " to owner's VPN");
- }
- }
- }
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- }
// TODO: ensure that contract class eventually marks as connected
updateState(DetailedState.AUTHENTICATING, "establish");
return tun;
diff --git a/services/java/com/android/server/content/SyncManager.java b/services/java/com/android/server/content/SyncManager.java
index 71d8d9911f9a..9e3dad6ee500 100644
--- a/services/java/com/android/server/content/SyncManager.java
+++ b/services/java/com/android/server/content/SyncManager.java
@@ -2352,7 +2352,7 @@ public class SyncManager {
Log.v(TAG, "canceling and rescheduling sync since an initialization "
+ "takes higher priority, " + conflict);
}
- } else if (candidate.expedited && !conflict.mSyncOperation.expedited
+ } else if (candidate.isExpedited() && !conflict.mSyncOperation.isExpedited()
&& (candidateIsInitialization
== conflict.mSyncOperation.isInitialization())) {
toReschedule = conflict;
diff --git a/services/java/com/android/server/content/SyncOperation.java b/services/java/com/android/server/content/SyncOperation.java
index 485674782aeb..67e3b098f37c 100644
--- a/services/java/com/android/server/content/SyncOperation.java
+++ b/services/java/com/android/server/content/SyncOperation.java
@@ -66,7 +66,8 @@ public class SyncOperation implements Comparable {
public final boolean allowParallelSyncs;
public Bundle extras;
public final String key;
- public boolean expedited;
+ /** Internal boolean to avoid reading a bundle everytime we want to compare operations. */
+ private final boolean expedited;
public SyncStorageEngine.PendingOperation pendingOperation;
/** Elapsed real time in millis at which to run this sync. */
public long latestRunTime;
@@ -79,7 +80,7 @@ public class SyncOperation implements Comparable {
* Depends on max(backoff, latestRunTime, and delayUntil).
*/
public long effectiveRunTime;
- /** Amount of time before {@link effectiveRunTime} from which this sync can run. */
+ /** Amount of time before {@link #effectiveRunTime} from which this sync can run. */
public long flexTime;
public SyncOperation(Account account, int userId, int reason, int source, String authority,
@@ -98,11 +99,16 @@ public class SyncOperation implements Comparable {
this.backoff = backoff;
final long now = SystemClock.elapsedRealtime();
// Checks the extras bundle. Must occur after we set the internal bundle.
- if (runTimeFromNow < 0 || isExpedited()) {
+ if (runTimeFromNow < 0) {
+ // Sanity check: Will always be true.
+ if (!this.extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false)) {
+ this.extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
+ }
this.expedited = true;
this.latestRunTime = now;
this.flexTime = 0;
} else {
+ this.extras.remove(ContentResolver.SYNC_EXTRAS_EXPEDITED);
this.expedited = false;
this.latestRunTime = now + runTimeFromNow;
this.flexTime = flexTime;
@@ -111,6 +117,24 @@ public class SyncOperation implements Comparable {
this.key = toKey();
}
+ /** Only used to immediately reschedule a sync. */
+ SyncOperation(SyncOperation other) {
+ this.service = other.service;
+ this.account = other.account;
+ this.authority = other.authority;
+ this.userId = other.userId;
+ this.reason = other.reason;
+ this.syncSource = other.syncSource;
+ this.extras = new Bundle(other.extras);
+ this.expedited = other.expedited;
+ this.latestRunTime = SystemClock.elapsedRealtime();
+ this.flexTime = 0L;
+ this.backoff = other.backoff;
+ this.allowParallelSyncs = other.allowParallelSyncs;
+ this.updateEffectiveRunTime();
+ this.key = toKey();
+ }
+
/**
* Make sure the bundle attached to this SyncOperation doesn't have unnecessary
* flags set.
@@ -138,24 +162,6 @@ public class SyncOperation implements Comparable {
}
}
- /** Only used to immediately reschedule a sync. */
- SyncOperation(SyncOperation other) {
- this.service = other.service;
- this.account = other.account;
- this.authority = other.authority;
- this.userId = other.userId;
- this.reason = other.reason;
- this.syncSource = other.syncSource;
- this.extras = new Bundle(other.extras);
- this.expedited = other.expedited;
- this.latestRunTime = SystemClock.elapsedRealtime();
- this.flexTime = 0L;
- this.backoff = other.backoff;
- this.allowParallelSyncs = other.allowParallelSyncs;
- this.updateEffectiveRunTime();
- this.key = toKey();
- }
-
@Override
public String toString() {
return dump(null, true);
@@ -220,7 +226,7 @@ public class SyncOperation implements Comparable {
}
public boolean isExpedited() {
- return extras.getBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, false) || expedited;
+ return expedited;
}
public boolean ignoreBackoff() {
diff --git a/services/java/com/android/server/content/SyncQueue.java b/services/java/com/android/server/content/SyncQueue.java
index 6f3fe6e1d37b..22fa2de6c5d6 100644
--- a/services/java/com/android/server/content/SyncQueue.java
+++ b/services/java/com/android/server/content/SyncQueue.java
@@ -73,10 +73,9 @@ public class SyncQueue {
}
SyncOperation syncOperation = new SyncOperation(
op.account, op.userId, op.reason, op.syncSource, op.authority, op.extras,
- 0 /* delay */, 0 /* flex */, backoff != null ? backoff.first : 0,
+ op.expedited ? -1: 0 /* delay */, 0 /* flex */, backoff != null ? backoff.first : 0,
mSyncStorageEngine.getDelayUntilTime(op.account, op.userId, op.authority),
syncAdapterInfo.type.allowParallelSyncs());
- syncOperation.expedited = op.expedited;
syncOperation.pendingOperation = op;
add(syncOperation, op);
}
@@ -104,7 +103,6 @@ public class SyncQueue {
if (existingOperation != null) {
boolean changed = false;
if (operation.compareTo(existingOperation) <= 0 ) {
- existingOperation.expedited = operation.expedited;
long newRunTime =
Math.min(existingOperation.latestRunTime, operation.latestRunTime);
// Take smaller runtime.
@@ -123,7 +121,7 @@ public class SyncQueue {
if (operation.pendingOperation == null) {
pop = new SyncStorageEngine.PendingOperation(
operation.account, operation.userId, operation.reason, operation.syncSource,
- operation.authority, operation.extras, operation.expedited);
+ operation.authority, operation.extras, operation.isExpedited());
pop = mSyncStorageEngine.insertIntoPending(pop);
if (pop == null) {
throw new IllegalStateException("error adding pending sync operation "
diff --git a/services/java/com/android/server/content/SyncStorageEngine.java b/services/java/com/android/server/content/SyncStorageEngine.java
index 5ebf9ea9ba5e..781280ed69bc 100644
--- a/services/java/com/android/server/content/SyncStorageEngine.java
+++ b/services/java/com/android/server/content/SyncStorageEngine.java
@@ -501,7 +501,7 @@ public class SyncStorageEngine extends Handler {
* @return amount of seconds before syncTimeSeconds that the sync can occur.
* I.e.
* earliest_sync_time = syncTimeSeconds - calculateDefaultFlexTime(syncTimeSeconds)
- * The flex time is capped at a percentage of the {@link DEFAULT_POLL_FREQUENCY_SECONDS}.
+ * The flex time is capped at a percentage of the {@link #DEFAULT_POLL_FREQUENCY_SECONDS}.
*/
public static long calculateDefaultFlexTime(long syncTimeSeconds) {
if (syncTimeSeconds < DEFAULT_MIN_FLEX_ALLOWED_SECS) {
diff --git a/services/java/com/android/server/usb/UsbDeviceManager.java b/services/java/com/android/server/usb/UsbDeviceManager.java
index 0f9c953de2f2..bb61e491c0d3 100644
--- a/services/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/java/com/android/server/usb/UsbDeviceManager.java
@@ -89,7 +89,6 @@ public class UsbDeviceManager {
private static final int MSG_SYSTEM_READY = 3;
private static final int MSG_BOOT_COMPLETED = 4;
private static final int MSG_USER_SWITCHED = 5;
- private static final int MSG_START_ACCESSORY_MODE = 6;
private static final int AUDIO_MODE_NONE = 0;
private static final int AUDIO_MODE_SOURCE = 1;
@@ -152,7 +151,7 @@ public class UsbDeviceManager {
mHandler.updateState(state);
} else if ("START".equals(accessory)) {
if (DEBUG) Slog.d(TAG, "got accessory start");
- mHandler.sendEmptyMessage(MSG_START_ACCESSORY_MODE);
+ startAccessoryMode();
}
}
};
@@ -170,7 +169,7 @@ public class UsbDeviceManager {
if (nativeIsStartRequested()) {
if (DEBUG) Slog.d(TAG, "accessory attached at boot");
- mHandler.sendEmptyMessage(MSG_START_ACCESSORY_MODE);
+ startAccessoryMode();
}
boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false);
@@ -232,8 +231,6 @@ public class UsbDeviceManager {
functions = UsbManager.USB_FUNCTION_AUDIO_SOURCE;
}
- if (DEBUG) Slog.d(TAG, "startAccessoryMode: " + functions);
-
if (functions != null) {
mAccessoryModeRequestTime = SystemClock.elapsedRealtime();
setCurrentFunctions(functions, false);
@@ -313,7 +310,6 @@ public class UsbDeviceManager {
// current USB state
private boolean mConnected;
private boolean mConfigured;
- private boolean mAccessoryStartPending;
private String mCurrentFunctions;
private String mDefaultFunctions;
private UsbAccessory mCurrentAccessory;
@@ -542,7 +538,6 @@ public class UsbDeviceManager {
if (mConfigured && enteringAccessoryMode) {
// successfully entered accessory mode
- mAccessoryModeRequestTime = 0;
if (mAccessoryStrings != null) {
mCurrentAccessory = new UsbAccessory(mAccessoryStrings);
@@ -620,11 +615,6 @@ public class UsbDeviceManager {
case MSG_UPDATE_STATE:
mConnected = (msg.arg1 == 1);
mConfigured = (msg.arg2 == 1);
-
- if (!mConnected) {
- mAccessoryStartPending = false;
- }
-
updateUsbNotification();
updateAdbNotification();
if (containsFunction(mCurrentFunctions,
@@ -638,10 +628,6 @@ public class UsbDeviceManager {
updateUsbState();
updateAudioSourceFunction();
}
- if (mConnected && mConfigured && mAccessoryStartPending) {
- startAccessoryMode();
- mAccessoryStartPending = false;
- }
break;
case MSG_ENABLE_ADB:
setAdbEnabled(msg.arg1 == 1);
@@ -678,16 +664,6 @@ public class UsbDeviceManager {
mCurrentUser = msg.arg1;
break;
}
- case MSG_START_ACCESSORY_MODE:
- if (mConnected && mConfigured) {
- startAccessoryMode();
- } else {
- // we sometimes receive the kernel "accessory start" uevent
- // before the "configured" uevent. In this case we need to defer
- // handling this event until after we received the configured event
- mAccessoryStartPending = true;
- }
- break;
}
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 3ed507656fd6..737f38488f78 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -437,8 +437,15 @@ public class WindowManagerService extends IWindowManager.Stub
int mRotation = 0;
int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
boolean mAltOrientation = false;
- ArrayList<IRotationWatcher> mRotationWatchers
- = new ArrayList<IRotationWatcher>();
+ class RotationWatcher {
+ IRotationWatcher watcher;
+ IBinder.DeathRecipient dr;
+ RotationWatcher(IRotationWatcher w, IBinder.DeathRecipient d) {
+ watcher = w;
+ dr = d;
+ }
+ }
+ ArrayList<RotationWatcher> mRotationWatchers = new ArrayList<RotationWatcher>();
int mDeferredRotationPauseCount;
int mSystemDecorLayer = 0;
@@ -2373,6 +2380,11 @@ public class WindowManagerService extends IWindowManager.Stub
}
public void removeWindowLocked(Session session, WindowState win) {
+ removeWindowLocked(session, win, false);
+ }
+
+ private void removeWindowLocked(Session session, WindowState win,
+ boolean forceRemove) {
if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "Starting window removed " + win);
removeStartingWindowTimeout(win.mAppToken);
@@ -2423,7 +2435,7 @@ public class WindowManagerService extends IWindowManager.Stub
mDisplayMagnifier.onWindowTransitionLocked(win, transit);
}
}
- if (win.mExiting || win.mWinAnimator.isAnimating()) {
+ if (!forceRemove && (win.mExiting || win.mWinAnimator.isAnimating())) {
// The exit animation is running... wait for it!
//Slog.i(TAG, "*** Running exit animation...");
win.mExiting = true;
@@ -5993,7 +6005,7 @@ public class WindowManagerService extends IWindowManager.Stub
for (int i=mRotationWatchers.size()-1; i>=0; i--) {
try {
- mRotationWatchers.get(i).onRotationChanged(rotation);
+ mRotationWatchers.get(i).watcher.onRotationChanged(rotation);
} catch (RemoteException e) {
}
}
@@ -6025,10 +6037,10 @@ public class WindowManagerService extends IWindowManager.Stub
public void binderDied() {
synchronized (mWindowMap) {
for (int i=0; i<mRotationWatchers.size(); i++) {
- if (watcherBinder == mRotationWatchers.get(i).asBinder()) {
- IRotationWatcher removed = mRotationWatchers.remove(i);
+ if (watcherBinder == mRotationWatchers.get(i).watcher.asBinder()) {
+ RotationWatcher removed = mRotationWatchers.remove(i);
if (removed != null) {
- removed.asBinder().unlinkToDeath(this, 0);
+ removed.watcher.asBinder().unlinkToDeath(this, 0);
}
i--;
}
@@ -6040,7 +6052,7 @@ public class WindowManagerService extends IWindowManager.Stub
synchronized (mWindowMap) {
try {
watcher.asBinder().linkToDeath(dr, 0);
- mRotationWatchers.add(watcher);
+ mRotationWatchers.add(new RotationWatcher(watcher, dr));
} catch (RemoteException e) {
// Client died, no cleanup needed.
}
@@ -6054,9 +6066,13 @@ public class WindowManagerService extends IWindowManager.Stub
final IBinder watcherBinder = watcher.asBinder();
synchronized (mWindowMap) {
for (int i=0; i<mRotationWatchers.size(); i++) {
- if (watcherBinder == mRotationWatchers.get(i).asBinder()) {
- mRotationWatchers.remove(i);
- i--;
+ RotationWatcher rotationWatcher = mRotationWatchers.get(i);
+ if (watcherBinder == rotationWatcher.watcher.asBinder()) {
+ RotationWatcher removed = mRotationWatchers.remove(i);
+ if (removed != null) {
+ removed.watcher.asBinder().unlinkToDeath(removed.dr, 0);
+ i--;
+ }
}
}
}
@@ -10840,7 +10856,7 @@ public class WindowManagerService extends IWindowManager.Stub
WindowList windows = displayContent.getWindowList();
while (!windows.isEmpty()) {
final WindowState win = windows.get(windows.size() - 1);
- removeWindowLocked(win.mSession, win);
+ removeWindowLocked(win.mSession, win, true);
}
}
mAnimator.removeDisplayLocked(displayId);
diff --git a/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java b/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
index 37176d6d31f4..910b6855dc21 100644
--- a/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
+++ b/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
@@ -136,10 +136,11 @@ public class SyncOperationTest extends AndroidTestCase {
"authority1", b1, soon + 100, soonFlex + 100, unimportant, unimportant, true);
assertTrue(op1.compareTo(op2) == -1);
- assertTrue("less than not transitive.", op2.compareTo(op1) == 1);
- assertTrue(op1.compareTo(op3) == 1);
- assertTrue("greater than not transitive. ", op3.compareTo(op1) == -1);
- assertTrue("overlapping intervals not the same.", op1.compareTo(op4) == 0);
- assertTrue("equality not transitive.", op4.compareTo(op1) == 0);
+ assertTrue("Less than not transitive.", op2.compareTo(op1) == 1);
+ assertEquals("Expedited not smaller than non-expedited.", -1, op1.compareTo(op3));
+ assertEquals("Greater than not transitive for expedited. ", 1, op3.compareTo(op1));
+ assertTrue("overlapping intervals not compared based on start interval.",
+ op1.compareTo(op4) == -1);
+ assertTrue("overlapping interval comparison not transitive.", op4.compareTo(op1) == 1);
}
}
diff --git a/telephony/java/android/telephony/CallStateListener.java b/telephony/java/android/telephony/CallStateListener.java
new file mode 100644
index 000000000000..e2ffbfa55be0
--- /dev/null
+++ b/telephony/java/android/telephony/CallStateListener.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+package android.telephony;
+
+import android.annotation.PrivateApi;
+
+/** @hide */
+@PrivateApi
+public interface CallStateListener {
+ /**
+ * Notify of a new or updated call.
+ * Any time the state of a call is updated, it will alert any listeners. This includes changes
+ * of state such as when a call is put on hold or conferenced.
+ *
+ * @param callId a unique ideCntifier for a given call that can be used to track state changes
+ * @param state the new state of the call.
+ * {@see com.android.services.telephony.common.Call$State}
+ * @param number the phone number of the call. For some states, this may be blank. However, it
+ * will be populated for any initial state.
+ */
+ public void onCallStateChanged(int callId, int state, String number);
+}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 8f17e7279924..3ab7000fec1b 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -16,17 +16,22 @@
package android.telephony;
+import android.annotation.PrivateApi;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.telephony.Rlog;
+import android.util.Log;
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
+import com.android.internal.telephony.ITelephonyListener;
import com.android.internal.telephony.ITelephonyRegistry;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
@@ -34,6 +39,7 @@ import com.android.internal.telephony.TelephonyProperties;
import java.io.FileInputStream;
import java.io.IOException;
+import java.util.HashMap;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -60,8 +66,41 @@ public class TelephonyManager {
private static final String TAG = "TelephonyManager";
private static ITelephonyRegistry sRegistry;
+
+ private final HashMap<CallStateListener,Listener> mListeners
+ = new HashMap<CallStateListener,Listener>();
private final Context mContext;
+ private static class Listener extends ITelephonyListener.Stub {
+ final CallStateListener mListener;
+ private static final int WHAT = 1;
+
+ private Handler mHandler = new Handler() {
+ @Override
+ public void handleMessage(Message msg) {
+ mListener.onCallStateChanged(msg.arg1, msg.arg2, (String)msg.obj);
+ }
+ };
+
+ Listener(CallStateListener listener) {
+ mListener = listener;
+ }
+
+ @Override
+ public void onUpdate(final int callId, final int state, final String number) {
+ if (mHandler != null) {
+ mHandler.sendMessage(mHandler.obtainMessage(WHAT, callId, state, number));
+ }
+ }
+
+ void clearQueue() {
+ mHandler.removeMessages(WHAT);
+
+ // Don't accept more incoming binder calls either.
+ mHandler = null;
+ }
+ }
+
/** @hide */
public TelephonyManager(Context context) {
Context appContext = context.getApplicationContext();
@@ -1439,4 +1478,397 @@ public class TelephonyManager {
return mContext.getResources().getString(
com.android.internal.R.string.config_mms_user_agent_profile_url);
}
+
+ /** @hide */
+ @PrivateApi
+ public void dial(String number) {
+ try {
+ getITelephony().dial(number);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#dial", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void call(String callingPackage, String number) {
+ try {
+ getITelephony().call(callingPackage, number);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#call", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean showCallScreen() {
+ try {
+ return getITelephony().showCallScreen();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#showCallScreen", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean showCallScreenWithDialpad(boolean showDialpad) {
+ try {
+ return getITelephony().showCallScreenWithDialpad(showDialpad);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#showCallScreenWithDialpad", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean endCall() {
+ try {
+ return getITelephony().endCall();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#endCall", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void answerRingingCall() {
+ try {
+ getITelephony().answerRingingCall();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#answerRingingCall", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void toggleHold() {
+ try {
+ getITelephony().toggleHold();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#toggleHold", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void merge() {
+ try {
+ getITelephony().merge();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#merge", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void swap() {
+ try {
+ getITelephony().swap();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#swap", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void mute(boolean mute) {
+ try {
+ getITelephony().mute(mute);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#mute", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void silenceRinger() {
+ try {
+ getITelephony().silenceRinger();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#silenceRinger", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isOffhook() {
+ try {
+ return getITelephony().isOffhook();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isOffhook", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isRinging() {
+ try {
+ return getITelephony().isRinging();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isRinging", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isIdle() {
+ try {
+ return getITelephony().isIdle();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isIdle", e);
+ }
+ return true;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isRadioOn() {
+ try {
+ return getITelephony().isRadioOn();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isRadioOn", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isSimPinEnabled() {
+ try {
+ return getITelephony().isSimPinEnabled();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isSimPinEnabled", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void cancelMissedCallsNotification() {
+ try {
+ getITelephony().cancelMissedCallsNotification();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#cancelMissedCallsNotification", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean supplyPin(String pin) {
+ try {
+ return getITelephony().supplyPin(pin);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#supplyPin", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean supplyPuk(String puk, String pin) {
+ try {
+ return getITelephony().supplyPuk(puk, pin);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#supplyPuk", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public int[] supplyPinReportResult(String pin) {
+ try {
+ return getITelephony().supplyPinReportResult(pin);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#supplyPinReportResult", e);
+ }
+ return new int[0];
+ }
+
+ /** @hide */
+ @PrivateApi
+ public int[] supplyPukReportResult(String puk, String pin) {
+ try {
+ return getITelephony().supplyPukReportResult(puk, pin);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#]", e);
+ }
+ return new int[0];
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean handlePinMmi(String dialString) {
+ try {
+ return getITelephony().handlePinMmi(dialString);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#handlePinMmi", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void toggleRadioOnOff() {
+ try {
+ getITelephony().toggleRadioOnOff();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#toggleRadioOnOff", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean setRadio(boolean turnOn) {
+ try {
+ return getITelephony().setRadio(turnOn);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#setRadio", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean setRadioPower(boolean turnOn) {
+ try {
+ return getITelephony().setRadioPower(turnOn);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#setRadioPower", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void updateServiceLocation() {
+ try {
+ getITelephony().updateServiceLocation();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#updateServiceLocation", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public int enableApnType(String type) {
+ try {
+ return getITelephony().enableApnType(type);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#enableApnType", e);
+ }
+ return PhoneConstants.APN_REQUEST_FAILED;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public int disableApnType(String type) {
+ try {
+ return getITelephony().disableApnType(type);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#disableApnType", e);
+ }
+ return PhoneConstants.APN_REQUEST_FAILED;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean enableDataConnectivity() {
+ try {
+ return getITelephony().enableDataConnectivity();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#enableDataConnectivity", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean disableDataConnectivity() {
+ try {
+ return getITelephony().disableDataConnectivity();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#disableDataConnectivity", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean isDataConnectivityPossible() {
+ try {
+ return getITelephony().isDataConnectivityPossible();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#isDataConnectivityPossible", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public boolean needsOtaServiceProvisioning() {
+ try {
+ return getITelephony().needsOtaServiceProvisioning();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#needsOtaServiceProvisioning", e);
+ }
+ return false;
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void playDtmfTone(char digit, boolean timedShortCode) {
+ try {
+ getITelephony().playDtmfTone(digit, timedShortCode);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#playDtmfTone", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void stopDtmfTone() {
+ try {
+ getITelephony().stopDtmfTone();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#stopDtmfTone", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void addCallStateListener(CallStateListener listener) {
+ try {
+ if (listener == null) {
+ throw new RuntimeException("Listener can't be null");
+ }
+ if (!mListeners.containsKey(listener)) {
+ final Listener l = new Listener(listener);
+ mListeners.put(listener, l);
+ getITelephony().addListener(l);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#addListener", e);
+ }
+ }
+
+ /** @hide */
+ @PrivateApi
+ public void removeCallStateListener(CallStateListener listener) {
+ try {
+ final Listener l = mListeners.remove(listener);
+ if (l != null) {
+ // Make sure that no callbacks that are already in flight come.
+ l.clearQueue();
+ getITelephony().removeListener(l);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error calling ITelephony#removeListener", e);
+ }
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 7bd2c8412e97..9c73059f7a7c 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -17,9 +17,12 @@
package com.android.internal.telephony;
import android.os.Bundle;
-import java.util.List;
-import android.telephony.NeighboringCellInfo;
import android.telephony.CellInfo;
+import android.telephony.NeighboringCellInfo;
+
+import com.android.internal.telephony.ITelephonyListener;
+
+import java.util.List;
/**
* Interface used to interact with the phone. Mostly this is used by the
@@ -324,5 +327,48 @@ interface ITelephony {
* Sets minimum time in milli-seconds between onCellInfoChanged
*/
void setCellInfoListRate(int rateInMillis);
+
+ /**
+ * Put a call on hold.
+ */
+ void toggleHold();
+
+ /**
+ * Merge foreground and background calls.
+ */
+ void merge();
+
+ /**
+ * Swap foreground and background calls.
+ */
+ void swap();
+
+ /**
+ * Mute the phone.
+ */
+ void mute(boolean mute);
+
+ /**
+ * Start playing DTMF tone for the specified digit.
+ *
+ * @param digit the digit that corresponds with the desired tone.
+ * @param timedShortcode whether the specified digit should be played as a timed short code.
+ */
+ void playDtmfTone(char digit, boolean timedShortCode);
+
+ /**
+ * Stop playing DTMF tones.
+ */
+ void stopDtmfTone();
+
+ /**
+ * Register a callback.
+ */
+ void addListener(ITelephonyListener listener);
+
+ /**
+ * Unregister a callback.
+ */
+ void removeListener(ITelephonyListener listener);
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl b/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl
new file mode 100644
index 000000000000..c2262172a3c7
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+package com.android.internal.telephony;
+
+/**
+ * Interface used to register a listener that gets more detailed call state information than
+ * {@link android.telephony.PhoneStateListener}
+ *
+ * {@hide}
+ */
+oneway interface ITelephonyListener {
+ void onUpdate(int callId, int state, String number);
+}
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 3dda56a434de..d6b23ae692a9 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -1542,8 +1542,11 @@ public class WifiStateMachine extends StateMachine {
// If it's empty, delay it in case it's a momentary dropout
int countryCodeSequence = mCountryCodeSequence.incrementAndGet();
if (TextUtils.isEmpty(countryCode)) {
+ String defaultCountryCode = mContext.getResources().getString(
+ R.string.config_wifi_unknown_country_code);
+
sendMessageDelayed(CMD_SET_COUNTRY_CODE, countryCodeSequence, persist ? 1 : 0,
- countryCode, COUNTRY_CODE_DELAY_MS);
+ defaultCountryCode, COUNTRY_CODE_DELAY_MS);
} else {
sendMessage(CMD_SET_COUNTRY_CODE, countryCodeSequence, persist ? 1 : 0, countryCode);
}
@@ -3092,7 +3095,11 @@ public class WifiStateMachine extends StateMachine {
case CMD_SET_BATCHED_SCAN:
if (recordBatchedScanSettings(message.arg1, message.arg2,
(Bundle)message.obj)) {
- startBatchedScan();
+ if (mBatchedScanSettings != null) {
+ startBatchedScan();
+ } else {
+ stopBatchedScan();
+ }
}
break;
case CMD_SET_COUNTRY_CODE: