notifyActivityDrawn
3078 @Override 3079 public void notifyActivityDrawn(IBinder token) { 3080 if (DEBUG_VISIBILITY) Slog.d(TAG_VISIBILITY, "notifyActivityDrawn: token=" + token); 3081 synchronized (this) { 3082 ActivityRecord r = mStackSupervisor.isInAnyStackLocked(token); 3083 if (r != null) { 3084 r.task.stack.notifyActivityDrawnLocked(r); 3085 } 3086 } 3087 }
Cross Reference: /frameworks/base/services/core/java/com/android/server/am/ActivityStack.java
2009 /** 2010 * Called as activities below the top translucent activity are redrawn. When the last one is 2011 * redrawn notify the top activity by calling 2012 * {@link Activity#onTranslucentConversionComplete}. 2013 * 2014 * @param r The most recent background activity to be drawn. Or, if r is null then a timeout 2015 * occurred and the activity will be notified immediately. 2016 */ 2017 void notifyActivityDrawnLocked(ActivityRecord r) { 2018 mActivityContainer.setDrawn(); 2019 if ((r == null) 2020 || (mUndrawnActivitiesBelowTopTranslucent.remove(r) && 2021 mUndrawnActivitiesBelowTopTranslucent.isEmpty())) { 2022 // The last undrawn activity below the top has just been drawn. If there is an 2023 // opaque activity at the top, notify it that it can become translucent safely now. 2024 final ActivityRecord waitingActivity = mTranslucentActivityWaiting; 2025 mTranslucentActivityWaiting = null; 2026 mUndrawnActivitiesBelowTopTranslucent.clear(); 2027 mHandler.removeMessages(TRANSLUCENT_TIMEOUT_MSG); 2028 2029 if (waitingActivity != null) { 2030 mWindowManager.setWindowOpaque(waitingActivity.appToken, false); 2031 if (waitingActivity.app != null && waitingActivity.app.thread != null) { 2032 try { 2033 waitingActivity.app.thread.scheduleTranslucentConversionComplete( 2034 waitingActivity.appToken, r != null); 2035 } catch (RemoteException e) { 2036 } 2037 } 2038 } 2039 }