am 0cb38d2e: Merge "Add configuration for activity thumbnails" into klp-modular-dev

* commit '0cb38d2e5ab32fd34c8129f3c2d1c158bad9abc3':
  Add configuration for activity thumbnails
This commit is contained in:
Michael Kolb
2014-07-11 01:46:12 +00:00
committed by Android Git Automerger
4 changed files with 11 additions and 1 deletions

View File

@@ -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:

View File

@@ -291,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" />

View File

@@ -1080,6 +1080,9 @@ public final class ActivityManagerService extends ActivityManagerNative
*/
private boolean mUserIsMonkey;
/** Flag whether the device has a recents UI */
final boolean mHasRecents;
final ServiceThread mHandlerThread;
final MainHandler mHandler;
@@ -1963,6 +1966,9 @@ public final class ActivityManagerService extends ActivityManagerNative
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);

View File

@@ -754,7 +754,7 @@ final class ActivityStack {
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();