Merge "[ActivityManager] Fix the inconsistence between ProcessRecord and BroadcastQueues" am: 09dcaf1948
am: 744f0e0997
Change-Id: Ib2d02a9a5a04256120c7982b0e1d6298a5d197dc
diff --git a/Android.mk b/Android.mk
index 491c8be..7a21023 100644
--- a/Android.mk
+++ b/Android.mk
@@ -857,6 +857,7 @@
-since $(SRC_API_DIR)/22.txt 22 \
-since $(SRC_API_DIR)/23.txt 23 \
-since $(SRC_API_DIR)/24.txt 24 \
+ -since $(SRC_API_DIR)/25.txt 25 \
-werror -hide 111 -hide 113 \
-overview $(LOCAL_PATH)/core/java/overview.html
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index d2e0327..8adec03 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -839,19 +839,19 @@
tmpConfig = new Configuration();
}
tmpConfig.setTo(config);
- if (!isDefaultDisplay) {
- // Get new DisplayMetrics based on the DisplayAdjustments given
- // to the ResourcesImpl. Udate a copy if the CompatibilityInfo
- // changed, because the ResourcesImpl object will handle the
- // update internally.
- DisplayAdjustments daj = r.getDisplayAdjustments();
- if (compat != null) {
- daj = new DisplayAdjustments(daj);
- daj.setCompatibilityInfo(compat);
- }
- dm = getDisplayMetrics(displayId, daj);
- applyNonDefaultDisplayMetricsToConfiguration(dm, tmpConfig);
+
+ // Get new DisplayMetrics based on the DisplayAdjustments given
+ // to the ResourcesImpl. Update a copy if the CompatibilityInfo
+ // changed, because the ResourcesImpl object will handle the
+ // update internally.
+ DisplayAdjustments daj = r.getDisplayAdjustments();
+ if (compat != null) {
+ daj = new DisplayAdjustments(daj);
+ daj.setCompatibilityInfo(compat);
}
+ dm = getDisplayMetrics(displayId, daj);
+ applyNonDefaultDisplayMetricsToConfiguration(dm, tmpConfig);
+
if (hasOverrideConfiguration) {
tmpConfig.updateFrom(key.mOverrideConfiguration);
}
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index f4db4d6..b7099b6 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -268,6 +268,10 @@
}
public void setTo(DisplayMetrics o) {
+ if (this == o) {
+ return;
+ }
+
widthPixels = o.widthPixels;
heightPixels = o.heightPixels;
density = o.density;
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index 644c7e9..4f7b106 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -580,7 +580,13 @@
return;
}
if (grantUriPermission) {
- inputContentInfo.requestPermission();
+ try {
+ inputContentInfo.requestPermission();
+ } catch (Exception e) {
+ Log.e(TAG, "InputConnectionInfo.requestPermission() failed", e);
+ args.callback.setCommitContentResult(false, args.seq);
+ return;
+ }
}
final boolean result =
ic.commitContent(inputContentInfo, flags, (Bundle) args.arg2);
diff --git a/docs/html/about/versions/nougat/android-7.0-samples.jd b/docs/html/about/versions/nougat/android-7.0-samples.jd
index e283a7a..ff63bef 100644
--- a/docs/html/about/versions/nougat/android-7.0-samples.jd
+++ b/docs/html/about/versions/nougat/android-7.0-samples.jd
@@ -6,7 +6,7 @@
<p>
Use the code samples below to learn about Android 7.0 capabilities and APIs. To
- download the samples in Android Studio, select the <b>File > Import
+ download the samples in Android Studio, select the <b>File > New > Import
Samples</b> menu option.
</p>
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index 935fa13..a1e3d62 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -321,7 +321,6 @@
mLightSensorEnabled = false;
mRecentLightSamples = 0;
mHandler.removeMessages(MSG_UPDATE_AMBIENT_LUX);
- Slog.d(TAG, "disabling light sensor");
mSensorManager.unregisterListener(mLightSensorListener);
}
}
@@ -349,7 +348,6 @@
}
mAmbientLightRingBuffer.prune(time - mAmbientLightHorizon);
mAmbientLightRingBuffer.push(time, lux);
- Slog.d(TAG, "pushing lux: " + lux);
// Remember this sample value.
mLastObservedLux = lux;
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index 5dc9d02..72ee218 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -2011,6 +2011,9 @@
@ServiceThreadOnly
void standby() {
assertRunOnServiceThread();
+ if (!canGoToStandby()) {
+ return;
+ }
mStandbyMessageReceived = true;
mPowerManager.goToSleep(SystemClock.uptimeMillis(), PowerManager.GO_TO_SLEEP_REASON_HDMI, 0);
// PowerManger will send the broadcast Intent.ACTION_SCREEN_OFF and after this gets
@@ -2038,10 +2041,13 @@
@ServiceThreadOnly
private void onStandby(final int standbyAction) {
assertRunOnServiceThread();
- if (!canGoToStandby()) return;
mPowerStatus = HdmiControlManager.POWER_STATUS_TRANSIENT_TO_STANDBY;
invokeVendorCommandListenersOnControlStateChanged(false,
HdmiControlManager.CONTROL_STATE_CHANGED_REASON_STANDBY);
+ if (!canGoToStandby()) {
+ mPowerStatus = HdmiControlManager.POWER_STATUS_STANDBY;
+ return;
+ }
final List<HdmiCecLocalDevice> devices = getAllLocalDevices();
disableDevices(new PendingActionClearedCallback() {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 56a0173..f1bdde0 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -464,8 +464,8 @@
private static final String VENDOR_OVERLAY_DIR = "/vendor/overlay";
/**
- * If VENDOR_OVERLAY_SKU_PROPERTY is set, search for runtime resource overlay APKs in
- * VENDOR_OVERLAY_DIR/<value of VENDOR_OVERLAY_SKU_PROPERTY> rather than in
+ * If VENDOR_OVERLAY_SKU_PROPERTY is set, search for runtime resource overlay APKs also in
+ * VENDOR_OVERLAY_DIR/<value of VENDOR_OVERLAY_SKU_PROPERTY> in addition to
* VENDOR_OVERLAY_DIR.
*/
private static final String VENDOR_OVERLAY_SKU_PROPERTY = "ro.boot.vendor.overlay.sku";
@@ -2271,18 +2271,17 @@
}
}
- // Collect vendor overlay packages.
- // (Do this before scanning any apps.)
+ // Collect vendor overlay packages. (Do this before scanning any apps.)
// For security and version matching reason, only consider
// overlay packages if they reside in the right directory.
- File vendorOverlayDir;
String overlaySkuDir = SystemProperties.get(VENDOR_OVERLAY_SKU_PROPERTY);
if (!overlaySkuDir.isEmpty()) {
- vendorOverlayDir = new File(VENDOR_OVERLAY_DIR, overlaySkuDir);
- } else {
- vendorOverlayDir = new File(VENDOR_OVERLAY_DIR);
+ scanDirTracedLI(new File(VENDOR_OVERLAY_DIR, overlaySkuDir), mDefParseFlags
+ | PackageParser.PARSE_IS_SYSTEM
+ | PackageParser.PARSE_IS_SYSTEM_DIR
+ | PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
}
- scanDirTracedLI(vendorOverlayDir, mDefParseFlags
+ scanDirTracedLI(new File(VENDOR_OVERLAY_DIR), mDefParseFlags
| PackageParser.PARSE_IS_SYSTEM
| PackageParser.PARSE_IS_SYSTEM_DIR
| PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 7432de9..4dcc7d5 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -726,6 +726,16 @@
public static final String KEY_CARRIER_ADDITIONAL_CBS_CHANNELS_STRINGS =
"carrier_additional_cbs_channels_strings";
+ /**
+ * Indicates whether STK LAUNCH_BROWSER command is disabled.
+ * If {@code true}, then the browser will not be launched
+ * on UI for the LAUNCH_BROWSER STK command.
+ * @hide
+ */
+ public static final String KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL =
+ "stk_disable_launch_browser_bool";
+
+
// These variables are used by the MMS service and exposed through another API, {@link
// SmsManager}. The variable names and string values are copied from there.
public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
@@ -1194,6 +1204,7 @@
sDefaults.putBoolean(KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL, false);
sDefaults.putStringArray(FILTERED_CNAP_NAMES_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false);
+ sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false);
}
/**