summaryrefslogtreecommitdiff
path: root/cmds
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-04-25 19:53:32 +0000
committerDaniel Norman <danielnorman@google.com>2021-04-29 09:44:07 -0700
commit2051462f672b5986ef321bf1de3657e7653864e8 (patch)
tree1dee6334f2b0a68d3cc2e532e6f89bb16149aa7d /cmds
parentb22baa1593b2ee33200d009f7f56d1c44a75ac6d (diff)
parentab6136865a519a27d731b4caa3e782bdf02cfd91 (diff)
Merge SP1A.210425.001
Change-Id: I8d45e47c131320cac5e794fd629fdef84dd3bcfc
Diffstat (limited to 'cmds')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp15
-rw-r--r--cmds/bootanimation/BootAnimation.h3
-rw-r--r--cmds/locksettings/TEST_MAPPING2
-rw-r--r--cmds/uiautomator/library/Android.bp2
4 files changed, 15 insertions, 7 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index b73e6bf55ebc..25a8e482fd00 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -1223,9 +1223,12 @@ bool BootAnimation::movie() {
return false;
}
-bool BootAnimation::shouldStopPlayingPart(const Animation::Part& part, const int fadedFramesCount) {
+bool BootAnimation::shouldStopPlayingPart(const Animation::Part& part,
+ const int fadedFramesCount,
+ const int lastDisplayedProgress) {
// stop playing only if it is time to exit and it's a partial part which has been faded out
- return exitPending() && !part.playUntilComplete && fadedFramesCount >= part.framesToFadeCount;
+ return exitPending() && !part.playUntilComplete && fadedFramesCount >= part.framesToFadeCount &&
+ (lastDisplayedProgress == 0 || lastDisplayedProgress == 100);
}
bool BootAnimation::playAnimation(const Animation& animation) {
@@ -1252,7 +1255,7 @@ bool BootAnimation::playAnimation(const Animation& animation) {
// process the part not only while the count allows but also if already fading
for (int r=0 ; !part.count || r<part.count || fadedFramesCount > 0 ; r++) {
- if (shouldStopPlayingPart(part, fadedFramesCount)) break;
+ if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break;
mCallbacks->playPart(i, part, r);
@@ -1269,7 +1272,7 @@ bool BootAnimation::playAnimation(const Animation& animation) {
(i == (pcount -1)) && currentProgress != 0;
for (size_t j=0 ; j<fcount ; j++) {
- if (shouldStopPlayingPart(part, fadedFramesCount)) break;
+ if (shouldStopPlayingPart(part, fadedFramesCount, lastDisplayedProgress)) break;
processDisplayEvents();
@@ -1368,6 +1371,10 @@ bool BootAnimation::playAnimation(const Animation& animation) {
if (exitPending() && !part.count && mCurrentInset >= mTargetInset &&
!part.hasFadingPhase()) {
+ if (lastDisplayedProgress != 0 && lastDisplayedProgress != 100) {
+ android::base::SetProperty(PROGRESS_PROP_NAME, "100");
+ continue;
+ }
break; // exit the infinite non-fading part when it has been played at least once
}
}
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 07432a2168b1..f8a31c6d8790 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -187,7 +187,8 @@ private:
void resizeSurface(int newWidth, int newHeight);
void projectSceneToWindow();
- bool shouldStopPlayingPart(const Animation::Part& part, int fadedFramesCount);
+ bool shouldStopPlayingPart(const Animation::Part& part, int fadedFramesCount,
+ int lastDisplayedProgress);
void checkExit();
void handleViewport(nsecs_t timestep);
diff --git a/cmds/locksettings/TEST_MAPPING b/cmds/locksettings/TEST_MAPPING
index c1cba5f7f22d..7a449effdf76 100644
--- a/cmds/locksettings/TEST_MAPPING
+++ b/cmds/locksettings/TEST_MAPPING
@@ -1,5 +1,5 @@
{
- "presubmit": [
+ "presubmit-large": [
{
"name": "CtsDevicePolicyManagerTestCases",
"options": [
diff --git a/cmds/uiautomator/library/Android.bp b/cmds/uiautomator/library/Android.bp
index 469b45201337..cffc07859998 100644
--- a/cmds/uiautomator/library/Android.bp
+++ b/cmds/uiautomator/library/Android.bp
@@ -59,8 +59,8 @@ droiddoc {
"android.test.runner",
"junit",
"android.test.base",
- "unsupportedappusage",
],
+ sdk_version: "current",
installable: false,
custom_template: "droiddoc-templates-sdk",
}