summaryrefslogtreecommitdiffstats
path: root/cmds/bootanimation/BootAnimation.h
diff options
context:
space:
mode:
authorChiou-Hao Hsu <chsu@codeaurora.org>2014-10-13 17:55:42 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-26 16:09:10 -0700
commitd168891d421662aa2ed561a6657daf762a20fe53 (patch)
tree342363670a2769a9fdacfbd8705e30a1ff8cac0a /cmds/bootanimation/BootAnimation.h
parentdc1604549bb8ab3a3e35dd48c4d6eae99e75503a (diff)
downloadframeworks_base-d168891d421662aa2ed561a6657daf762a20fe53.zip
frameworks_base-d168891d421662aa2ed561a6657daf762a20fe53.tar.gz
frameworks_base-d168891d421662aa2ed561a6657daf762a20fe53.tar.bz2
BootAnimation: Play boot/shutdown animation and music
Add support to show customized boot and shut down animation, as well as music. Change-Id: I69c87640175a96a18833a763a34afd362bbfb487 Conflicts: cmds/bootanimation/Android.mk cmds/bootanimation/BootAnimation.cpp Bootanimation: Fix the low memory device oom when run boot animation Low memory device is easily to be oom when run boot animation. Here we do optimize the boot animation GL Texture only one frame needed. That is free timely and re-init it again. When in boot animation, the fps=15, so it is ok to do the delete and re-init. CRs-Fixed: 572325 Change-Id: I1e81c3d0f3600ac895f9bd7bd00a284f3d4b7d4c bootanimtion: fix no boot sound due to error file descriptor -wrong file descriptor passed to setDataSource(fd, offset, length) API and causes no sound -use the default setDataSource(httpService,url,header) to parse the file of boot sound CRs-Fixed: 731547 Change-Id: I437e7d797cd13b7f8f8e0fbf81d5de99c55c27d1
Diffstat (limited to 'cmds/bootanimation/BootAnimation.h')
-rw-r--r--cmds/bootanimation/BootAnimation.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index f968b25..758f7f7 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -87,12 +87,18 @@ private:
bool readFile(const char* name, String8& outString);
bool movie();
+ enum ImageID { IMG_DATA = 0, IMG_SYS = 1, IMG_ENC = 2 };
+ char *getAnimationFileName(ImageID image);
+ char *getBootRingtoneFileName(ImageID image);
+ void playBackgroundMusic();
+ bool checkBootState();
void checkExit();
+ void checkShowAndroid();
sp<SurfaceComposerClient> mSession;
sp<AudioPlayer> mAudioPlayer;
AssetManager mAssets;
- Texture mAndroid[2];
+ Texture mAndroid[3];
int mWidth;
int mHeight;
EGLDisplay mDisplay;
@@ -103,6 +109,7 @@ private:
ZipFileRO *mZip;
};
+static void* playMusic(void* arg);
// ---------------------------------------------------------------------------
}; // namespace android