Loading services/core/java/com/android/server/GraphicsStatsService.java +12 −7 Original line number Diff line number Diff line Loading @@ -137,10 +137,16 @@ public class GraphicsStatsService extends IGraphicsStats.Stub { } private void onAlarm() { // We need to make a copy since some of the callbacks won't be proxy and thus // can result in a re-entrant acquisition of mLock that would result in a modification // of mActive during iteration. ActiveBuffer[] activeCopy; synchronized (mLock) { mRotateIsScheduled = false; scheduleRotateLocked(); for (ActiveBuffer active : mActive) { activeCopy = mActive.toArray(new ActiveBuffer[0]); } for (ActiveBuffer active : activeCopy) { try { active.mCallback.onRotateGraphicsStatsBuffer(); } catch (RemoteException e) { Loading @@ -148,7 +154,6 @@ public class GraphicsStatsService extends IGraphicsStats.Stub { active.mInfo.packageName, active.mPid), e); } } } // Give a few seconds for everyone to rotate before doing the cleanup mWriteOutHandler.sendEmptyMessageDelayed(DELETE_OLD, 10000); } Loading Loading
services/core/java/com/android/server/GraphicsStatsService.java +12 −7 Original line number Diff line number Diff line Loading @@ -137,10 +137,16 @@ public class GraphicsStatsService extends IGraphicsStats.Stub { } private void onAlarm() { // We need to make a copy since some of the callbacks won't be proxy and thus // can result in a re-entrant acquisition of mLock that would result in a modification // of mActive during iteration. ActiveBuffer[] activeCopy; synchronized (mLock) { mRotateIsScheduled = false; scheduleRotateLocked(); for (ActiveBuffer active : mActive) { activeCopy = mActive.toArray(new ActiveBuffer[0]); } for (ActiveBuffer active : activeCopy) { try { active.mCallback.onRotateGraphicsStatsBuffer(); } catch (RemoteException e) { Loading @@ -148,7 +154,6 @@ public class GraphicsStatsService extends IGraphicsStats.Stub { active.mInfo.packageName, active.mPid), e); } } } // Give a few seconds for everyone to rotate before doing the cleanup mWriteOutHandler.sendEmptyMessageDelayed(DELETE_OLD, 10000); } Loading