summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2019-02-19 10:33:50 -0800
committerScott Lobdell <slobdell@google.com>2019-02-19 11:36:09 -0800
commit81b587a542e8381268a9ba8e7461712ef23cd11f (patch)
treebace051dc4f3efad7dcd091ea0481167815bfaa7 /cmds/bootanimation/BootAnimation.cpp
parentbf4a1865530dd9a1e4b203d4e9d67fce0958c3fa (diff)
parent13327cc461d8f54550866bc404a99205f95ab92f (diff)
Merge QP1A.190212.003
Conflicts: core/java/android/view/SurfaceControl.java media/java/android/media/MediaCodecInfo.java packages/SettingsLib/res/values/strings.xml services/core/java/com/android/server/am/ActiveServices.java services/core/java/com/android/server/am/OomAdjuster.java services/core/java/com/android/server/audio/AudioDeviceInventory.java services/core/java/com/android/server/display/LocalDisplayAdapter.java services/core/java/com/android/server/wm/ActivityDisplay.java services/core/java/com/android/server/wm/DisplayPolicy.java Change-Id: Idc7582978996d2f7c44f599f221e8d7cc9eedf43
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 5dcb392b002d..46917e4f6062 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -252,10 +252,12 @@ status_t BootAnimation::initTexture(FileMap* map, int* width, int* height)
status_t BootAnimation::readyToRun() {
mAssets.addDefaultAssets();
- sp<IBinder> dtoken(SurfaceComposerClient::getBuiltInDisplay(
- ISurfaceComposer::eDisplayIdMain));
+ mDisplayToken = SurfaceComposerClient::getInternalDisplayToken();
+ if (mDisplayToken == nullptr)
+ return -1;
+
DisplayInfo dinfo;
- status_t status = SurfaceComposerClient::getDisplayInfo(dtoken, &dinfo);
+ status_t status = SurfaceComposerClient::getDisplayInfo(mDisplayToken, &dinfo);
if (status)
return -1;
@@ -1014,16 +1016,13 @@ void BootAnimation::handleViewport(nsecs_t timestep) {
// At the end of the animation, we switch to the viewport that DisplayManager will apply
// later. This changes the coordinate system, and means we must move the surface up by
// the inset amount.
- sp<IBinder> dtoken(SurfaceComposerClient::getBuiltInDisplay(
- ISurfaceComposer::eDisplayIdMain));
-
Rect layerStackRect(0, 0, mWidth, mHeight - mTargetInset);
Rect displayRect(0, mTargetInset, mWidth, mHeight);
SurfaceComposerClient::Transaction t;
t.setPosition(mFlingerSurfaceControl, 0, -mTargetInset)
.setCrop(mFlingerSurfaceControl, Rect(0, mTargetInset, mWidth, mHeight));
- t.setDisplayProjection(dtoken, 0 /* orientation */, layerStackRect, displayRect);
+ t.setDisplayProjection(mDisplayToken, 0 /* orientation */, layerStackRect, displayRect);
t.apply();
mTargetInset = mCurrentInset = 0;