am c79f3d69: Merge "cherrypick from klp-modular-dev docs: Fix issue with CardView preview docs Bug: 16277161 Change-Id: Iea8cbff81fbf3ac50c9009fbf21dc65c625e71ee" into klp-modular-docs
* commit 'c79f3d696a24ade6017b0e91d92898190c204dd2':
cherrypick from klp-modular-dev docs: Fix issue with CardView preview docs Bug: 16277161 Change-Id: Iea8cbff81fbf3ac50c9009fbf21dc65c625e71ee
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f239cc5..199e5b1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1487,6 +1487,9 @@
<!-- default window inset isRound property -->
<bool name="config_windowIsRound">false</bool>
+ <!-- default device has recents property -->
+ <bool name="config_hasRecents">true</bool>
+
<!-- Defines the default set of global actions. Actions may still be disabled or hidden based
on the current state of the device.
Each item must be one of the following strings:
@@ -1505,4 +1508,6 @@
<item>users</item>
</string-array>
+ <bool name="config_networkSamplingWakesDevice">true</bool>
+
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index c5b8a5a..79dcde9 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -258,6 +258,7 @@
<java-symbol type="bool" name="config_enable_emergency_call_while_sim_locked" />
<java-symbol type="bool" name="config_enable_puk_unlock_screen" />
<java-symbol type="bool" name="config_mms_content_disposition_support" />
+ <java-symbol type="bool" name="config_networkSamplingWakesDevice" />
<java-symbol type="bool" name="config_showMenuShortcutsWhenKeyboardPresent" />
<java-symbol type="bool" name="config_sip_wifi_only" />
<java-symbol type="bool" name="config_sms_capable" />
@@ -290,6 +291,7 @@
<java-symbol type="bool" name="config_forceDefaultOrientation" />
<java-symbol type="bool" name="config_wifi_batched_scan_supported" />
<java-symbol type="bool" name="config_windowIsRound" />
+ <java-symbol type="bool" name="config_hasRecents" />
<java-symbol type="integer" name="config_cursorWindowSize" />
<java-symbol type="integer" name="config_extraFreeKbytesAdjust" />
diff --git a/docs/html/images/ui/sample-linearlayout.png b/docs/html/images/ui/sample-linearlayout.png
index c4beb93a..04c9259 100644
--- a/docs/html/images/ui/sample-linearlayout.png
+++ b/docs/html/images/ui/sample-linearlayout.png
Binary files differ
diff --git a/docs/html/tools/publishing/preparing.jd b/docs/html/tools/publishing/preparing.jd
index 7192aa8..5265fce 100644
--- a/docs/html/tools/publishing/preparing.jd
+++ b/docs/html/tools/publishing/preparing.jd
@@ -191,6 +191,13 @@
added to your code, such as {@link android.os.Debug#startMethodTracing()} and
{@link android.os.Debug#stopMethodTracing()} method calls.</p>
+<p class="caution"><strong>Important:</strong> Ensure that you disable debugging for
+your app if using {@link android.webkit.WebView} to display paid for content or if using JavaScript
+interfaces, since debugging allows users to inject scripts and extract content using Chrome
+DevTools. To disable debugging, use the
+{@link android.webkit.WebView#setWebContentsDebuggingEnabled(boolean) WebView.setWebContentsDebuggingEnabled()}
+method.</p>
+
<h4>Clean up your project directories</h4>
<p>Clean up your project and make sure it conforms to the directory structure described in <a
diff --git a/packages/Shell/res/values/strings.xml b/packages/Shell/res/values/strings.xml
index e5606c7..51e2c95 100644
--- a/packages/Shell/res/values/strings.xml
+++ b/packages/Shell/res/values/strings.xml
@@ -19,8 +19,12 @@
<!-- Title of notification indicating a bugreport has been successfully captured. [CHAR LIMIT=50] -->
<string name="bugreport_finished_title">Bug report captured</string>
+
+ <!-- Text of notification indicating that swipe left will share the captured bugreport. [CHAR LIMIT=100] -->
+ <string name="bugreport_finished_text" product="watch">Swipe left to share your bug report</string>
<!-- Text of notification indicating that touching will share the captured bugreport. [CHAR LIMIT=100] -->
- <string name="bugreport_finished_text">Touch to share your bug report</string>
+ <string name="bugreport_finished_text" product="default">Touch to share your bug report</string>
+
<!-- Body of dialog informing user about contents of a bugreport. [CHAR LIMIT=NONE] -->
<string name="bugreport_confirm">Bug reports contain data from the system\'s various log files, including personal and private information. Only share bug reports with apps and people you trust.</string>
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 8e08583..aa14da1 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -5038,8 +5038,18 @@
setAlarm(samplingIntervalInSeconds * 1000, mSampleIntervalElapsedIntent);
}
+ /**
+ * Sets a network sampling alarm.
+ */
void setAlarm(int timeoutInMilliseconds, PendingIntent intent) {
long wakeupTime = SystemClock.elapsedRealtime() + timeoutInMilliseconds;
- mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, wakeupTime, intent);
+ int alarmType;
+ if (Resources.getSystem().getBoolean(
+ R.bool.config_networkSamplingWakesDevice)) {
+ alarmType = AlarmManager.ELAPSED_REALTIME_WAKEUP;
+ } else {
+ alarmType = AlarmManager.ELAPSED_REALTIME;
+ }
+ mAlarmManager.set(alarmType, wakeupTime, intent);
}
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index d09ee96..b68089c 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -1074,6 +1074,9 @@
*/
private boolean mUserIsMonkey;
+ /** Flag whether the device has a recents UI */
+ final boolean mHasRecents;
+
final ServiceThread mHandlerThread;
final MainHandler mHandler;
@@ -1941,6 +1944,9 @@
mConfigurationSeq = mConfiguration.seq = 1;
mProcessCpuTracker.init();
+ mHasRecents = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_hasRecents);
+
mCompatModePackages = new CompatModePackages(this, systemDir, mHandler);
mIntentFirewall = new IntentFirewall(new IntentFirewallInterface(), mHandler);
mStackSupervisor = new ActivityStackSupervisor(this);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index d894e4e..1038ac0 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -754,7 +754,7 @@
prev.task.touchActiveTime();
clearLaunchTime(prev);
final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
- if (next == null || next.task != prev.task) {
+ if (mService.mHasRecents && (next == null || next.task != prev.task)) {
prev.updateThumbnail(screenshotActivities(prev), null);
}
stopFullyDrawnTraceIfNeeded();