From 0795272aa226f4e965968a03daddc53ce30b7cda Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 19 May 2009 19:08:10 -0700 Subject: move libbinder's header files under includes/binder --- libs/surfaceflinger/SurfaceFlinger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp') diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index 54b33ce..37d1ded 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -31,10 +31,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -- cgit v1.1 From 627e7b50be41e4fdee758a1bfad3a55de56b4e27 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 21 May 2009 19:21:59 -0700 Subject: split boot animation out of SurfaceFlinger Conflicts: data/etc/platform.xml --- libs/surfaceflinger/SurfaceFlinger.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp') diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index 167a59b..0e998bf 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -61,6 +61,13 @@ #include "GPUHardware/GPUHardware.h" +/* ideally AID_GRAPHICS would be in a semi-public header + * or there would be a way to map a user/group name to its id + */ +#ifndef AID_GRAPHICS +#define AID_GRAPHICS 1003 +#endif + #define DISPLAY_COUNT 1 namespace android { @@ -184,7 +191,6 @@ SurfaceFlinger::SurfaceFlinger() mDebugCpu(0), mDebugFps(0), mDebugBackground(0), - mDebugNoBootAnimation(0), mSyncObject(), mDeplayedTransactionPending(0), mConsoleSignals(0), @@ -207,14 +213,11 @@ void SurfaceFlinger::init() mDebugBackground = atoi(value); property_get("debug.sf.showfps", value, "0"); mDebugFps = atoi(value); - property_get("debug.sf.nobootanimation", value, "0"); - mDebugNoBootAnimation = atoi(value); LOGI_IF(mDebugRegion, "showupdates enabled"); LOGI_IF(mDebugCpu, "showcpu enabled"); LOGI_IF(mDebugBackground, "showbackground enabled"); LOGI_IF(mDebugFps, "showfps enabled"); - LOGI_IF(mDebugNoBootAnimation, "boot animation disabled"); } SurfaceFlinger::~SurfaceFlinger() @@ -324,11 +327,8 @@ void SurfaceFlinger::bootFinished() { const nsecs_t now = systemTime(); const nsecs_t duration = now - mBootTime; - LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) ); - if (mBootAnimation != 0) { - mBootAnimation->requestExit(); - mBootAnimation.clear(); - } + LOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) ); + property_set("ctl.stop", "bootanim"); } void SurfaceFlinger::onFirstRef() @@ -456,10 +456,10 @@ status_t SurfaceFlinger::readyToRun() if (mDebugCpu) mCpuGauge = new CPUGauge(this, ms2ns(500)); - // the boot animation! - if (mDebugNoBootAnimation == false) - mBootAnimation = new BootAnimation(this); - + + // start boot animation + property_set("ctl.start", "bootanim"); + return NO_ERROR; } @@ -1543,13 +1543,13 @@ status_t SurfaceFlinger::onTransact( // codes that require permission check IPCThreadState* ipc = IPCThreadState::self(); const int pid = ipc->getCallingPid(); + const int uid = ipc->getCallingUid(); const int self_pid = getpid(); - if (UNLIKELY(pid != self_pid)) { + if (UNLIKELY(pid != self_pid && uid != AID_GRAPHICS)) { // we're called from a different process, do the real check if (!checkCallingPermission( String16("android.permission.ACCESS_SURFACE_FLINGER"))) { - const int uid = ipc->getCallingUid(); LOGE("Permission Denial: " "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; -- cgit v1.1