Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +16 −9 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class StartingSurfaceDrawer { labelRes = app.labelRes; } final int taskId = taskInfo.taskId; Context context = mContext; // replace with the default theme if the application didn't set final int theme = windowInfo.splashScreenThemeResId != 0 Loading Loading @@ -153,6 +154,7 @@ public class StartingSurfaceDrawer { } catch (PackageManager.NameNotFoundException e) { Slog.w(TAG, "Failed creating package context with package name " + activityInfo.packageName + " for user " + taskInfo.userId, e); return; } } Loading @@ -167,6 +169,7 @@ public class StartingSurfaceDrawer { final TypedArray typedArray = overrideContext.obtainStyledAttributes( com.android.internal.R.styleable.Window); final int resId = typedArray.getResourceId(R.styleable.Window_windowBackground, 0); try { if (resId != 0 && overrideContext.getDrawable(resId) != null) { // We want to use the windowBackground for the override context if it is // available, otherwise we use the default one to make sure a themed starting Loading @@ -177,6 +180,11 @@ public class StartingSurfaceDrawer { } context = overrideContext; } } catch (Resources.NotFoundException e) { Slog.w(TAG, "failed creating starting window for overrideConfig at taskId: " + taskId, e); return; } typedArray.recycle(); } Loading Loading @@ -258,7 +266,6 @@ public class StartingSurfaceDrawer { params.setTitle("Splash Screen " + activityInfo.packageName); // TODO(b/173975965) tracking performance final int taskId = taskInfo.taskId; SplashScreenView sView = null; try { final View view = win.getDecorView(); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawerTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,8 @@ public class StartingSurfaceDrawerTests { spyOn(context); spyOn(realWindowManager); try { doReturn(context).when(context).createPackageContext(anyString(), anyInt()); doReturn(context).when(context) .createPackageContextAsUser(anyString(), anyInt(), any()); } catch (PackageManager.NameNotFoundException e) { // } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +16 −9 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class StartingSurfaceDrawer { labelRes = app.labelRes; } final int taskId = taskInfo.taskId; Context context = mContext; // replace with the default theme if the application didn't set final int theme = windowInfo.splashScreenThemeResId != 0 Loading Loading @@ -153,6 +154,7 @@ public class StartingSurfaceDrawer { } catch (PackageManager.NameNotFoundException e) { Slog.w(TAG, "Failed creating package context with package name " + activityInfo.packageName + " for user " + taskInfo.userId, e); return; } } Loading @@ -167,6 +169,7 @@ public class StartingSurfaceDrawer { final TypedArray typedArray = overrideContext.obtainStyledAttributes( com.android.internal.R.styleable.Window); final int resId = typedArray.getResourceId(R.styleable.Window_windowBackground, 0); try { if (resId != 0 && overrideContext.getDrawable(resId) != null) { // We want to use the windowBackground for the override context if it is // available, otherwise we use the default one to make sure a themed starting Loading @@ -177,6 +180,11 @@ public class StartingSurfaceDrawer { } context = overrideContext; } } catch (Resources.NotFoundException e) { Slog.w(TAG, "failed creating starting window for overrideConfig at taskId: " + taskId, e); return; } typedArray.recycle(); } Loading Loading @@ -258,7 +266,6 @@ public class StartingSurfaceDrawer { params.setTitle("Splash Screen " + activityInfo.packageName); // TODO(b/173975965) tracking performance final int taskId = taskInfo.taskId; SplashScreenView sView = null; try { final View view = win.getDecorView(); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawerTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,8 @@ public class StartingSurfaceDrawerTests { spyOn(context); spyOn(realWindowManager); try { doReturn(context).when(context).createPackageContext(anyString(), anyInt()); doReturn(context).when(context) .createPackageContextAsUser(anyString(), anyInt(), any()); } catch (PackageManager.NameNotFoundException e) { // } Loading