Loading services/core/java/com/android/server/utils/TimingsTraceAndSlog.java +10 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,16 @@ public final class TimingsTraceAndSlog extends TimingsTraceLog { * Default constructor using {@code system_server} tags. */ public TimingsTraceAndSlog() { this(SYSTEM_SERVER_TIMING_TAG, Trace.TRACE_TAG_SYSTEM_SERVER); this(SYSTEM_SERVER_TIMING_TAG); } /** * Custom constructor using {@code system_server} trace tag. * * @param tag {@code logcat} tag */ public TimingsTraceAndSlog(@NonNull String tag) { this(tag, Trace.TRACE_TAG_SYSTEM_SERVER); } /** Loading services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +55 −45 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ import com.android.server.EventLogTags; import com.android.server.FgThread; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.utils.TimingsTraceAndSlog; import com.android.server.wm.WindowManagerInternal; import libcore.io.IoUtils; Loading Loading @@ -1785,6 +1786,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub @Override public void onUnlockUser(final int userId) { TimingsTraceAndSlog t = new TimingsTraceAndSlog(TAG); t.traceBegin("on-unlock-user-" + userId); try { synchronized (mLock) { if (mCurrentUserId == userId) { if (mWaitingForUnlock) { Loading @@ -1801,9 +1805,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub // so we do it in the background to avoid holding up the user unlock operation. if (!mUserRestorecon.get(userId)) { mUserRestorecon.put(userId, true); Runnable relabeler = new Runnable() { @Override public void run() { Runnable relabeler = () -> { final File wallpaperDir = getWallpaperDir(userId); for (String filename : sPerUserFiles) { File f = new File(wallpaperDir, filename); Loading @@ -1811,12 +1813,14 @@ public class WallpaperManagerService extends IWallpaperManager.Stub SELinux.restorecon(f); } } } }; BackgroundThread.getHandler().post(relabeler); } } } } finally { t.traceEnd(); } } void onRemoveUser(int userId) { Loading @@ -1833,6 +1837,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub } void switchUser(int userId, IRemoteCallback reply) { TimingsTraceAndSlog t = new TimingsTraceAndSlog(TAG); t.traceBegin("switch-user-" + userId); try { final WallpaperData systemWallpaper; final WallpaperData lockWallpaper; synchronized (mLock) { Loading @@ -1858,6 +1865,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK); notifyWallpaperColorsChanged(mFallbackWallpaper, FLAG_SYSTEM); }); } finally { t.traceEnd(); } } void switchWallpaper(WallpaperData wallpaper, IRemoteCallback reply) { Loading Loading
services/core/java/com/android/server/utils/TimingsTraceAndSlog.java +10 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,16 @@ public final class TimingsTraceAndSlog extends TimingsTraceLog { * Default constructor using {@code system_server} tags. */ public TimingsTraceAndSlog() { this(SYSTEM_SERVER_TIMING_TAG, Trace.TRACE_TAG_SYSTEM_SERVER); this(SYSTEM_SERVER_TIMING_TAG); } /** * Custom constructor using {@code system_server} trace tag. * * @param tag {@code logcat} tag */ public TimingsTraceAndSlog(@NonNull String tag) { this(tag, Trace.TRACE_TAG_SYSTEM_SERVER); } /** Loading
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +55 −45 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ import com.android.server.EventLogTags; import com.android.server.FgThread; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.utils.TimingsTraceAndSlog; import com.android.server.wm.WindowManagerInternal; import libcore.io.IoUtils; Loading Loading @@ -1785,6 +1786,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub @Override public void onUnlockUser(final int userId) { TimingsTraceAndSlog t = new TimingsTraceAndSlog(TAG); t.traceBegin("on-unlock-user-" + userId); try { synchronized (mLock) { if (mCurrentUserId == userId) { if (mWaitingForUnlock) { Loading @@ -1801,9 +1805,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub // so we do it in the background to avoid holding up the user unlock operation. if (!mUserRestorecon.get(userId)) { mUserRestorecon.put(userId, true); Runnable relabeler = new Runnable() { @Override public void run() { Runnable relabeler = () -> { final File wallpaperDir = getWallpaperDir(userId); for (String filename : sPerUserFiles) { File f = new File(wallpaperDir, filename); Loading @@ -1811,12 +1813,14 @@ public class WallpaperManagerService extends IWallpaperManager.Stub SELinux.restorecon(f); } } } }; BackgroundThread.getHandler().post(relabeler); } } } } finally { t.traceEnd(); } } void onRemoveUser(int userId) { Loading @@ -1833,6 +1837,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub } void switchUser(int userId, IRemoteCallback reply) { TimingsTraceAndSlog t = new TimingsTraceAndSlog(TAG); t.traceBegin("switch-user-" + userId); try { final WallpaperData systemWallpaper; final WallpaperData lockWallpaper; synchronized (mLock) { Loading @@ -1858,6 +1865,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK); notifyWallpaperColorsChanged(mFallbackWallpaper, FLAG_SYSTEM); }); } finally { t.traceEnd(); } } void switchWallpaper(WallpaperData wallpaper, IRemoteCallback reply) { Loading