Loading core/java/android/app/admin/DevicePolicyManager.java +30 −10 Original line number Diff line number Diff line Loading @@ -1605,20 +1605,29 @@ public class DevicePolicyManager { "android.app.extra.PASSWORD_COMPLEXITY"; /** * Constant for {@link #getPasswordComplexity()}: no password. * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}: no password. * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. */ public static final int PASSWORD_COMPLEXITY_NONE = 0; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the low password complexity band as: * <ul> * <li>pattern * <li>PIN with repeating (4444) or ordered (1234, 4321, 2468) sequences * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_SOMETHING * @see #PASSWORD_QUALITY_NUMERIC Loading @@ -1626,7 +1635,9 @@ public class DevicePolicyManager { public static final int PASSWORD_COMPLEXITY_LOW = 0x10000; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the medium password complexity band as: * <ul> * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * least 4 Loading @@ -1634,7 +1645,10 @@ public class DevicePolicyManager { * <li>alphanumeric, length at least 4 * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_ALPHABETIC Loading @@ -1643,7 +1657,9 @@ public class DevicePolicyManager { public static final int PASSWORD_COMPLEXITY_MEDIUM = 0x30000; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the high password complexity band as: * <ul> * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * least 8 Loading @@ -1651,7 +1667,10 @@ public class DevicePolicyManager { * <li>alphanumeric, length at least 6 * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_ALPHABETIC Loading Loading @@ -4455,8 +4474,9 @@ public class DevicePolicyManager { } /** * Sets a password complexity requirement for the user's screen lock. * The complexity level is one of the pre-defined levels. * Sets a minimum password complexity requirement for the user's screen lock. * The complexity level is one of the pre-defined levels, and the user is unable to set a * password with a lower complexity level. * * <p>Note that when called on a profile which uses an unified challenge with its parent, the * complexity would apply to the unified challenge. Loading core/java/android/window/SplashScreenView.java +18 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,8 @@ public final class SplashScreenView extends FrameLayout { private @ColorInt int mIconBackground; private Bitmap mParceledIconBitmap; private Drawable mIconDrawable; // It is only set for legacy splash screen which won't be sent across processes. private Drawable mOverlayDrawable; private SurfaceControlViewHost.SurfacePackage mSurfacePackage; private RemoteCallback mClientCallback; private int mBrandingImageWidth; Loading Loading @@ -192,6 +194,14 @@ public final class SplashScreenView extends FrameLayout { return this; } /** * Set the Drawable object to fill entire view */ public Builder setOverlayDrawable(@Nullable Drawable drawable) { mOverlayDrawable = drawable; return this; } /** * Set the Drawable object to fill the center view. */ Loading Loading @@ -236,7 +246,11 @@ public final class SplashScreenView extends FrameLayout { layoutInflater.inflate(R.layout.splash_screen_view, null, false); view.mInitBackgroundColor = mBackgroundColor; view.mInitIconBackgroundColor = mIconBackground; if (mOverlayDrawable != null) { view.setBackground(mOverlayDrawable); } else { view.setBackgroundColor(mBackgroundColor); } view.mClientCallback = mClientCallback; view.mBrandingImageView = view.findViewById(R.id.splashscreen_branding_view); Loading @@ -261,6 +275,9 @@ public final class SplashScreenView extends FrameLayout { } } } if (mOverlayDrawable != null || mIconDrawable == null) { view.setNotCopyable(); } if (mParceledIconBitmap != null) { view.mParceledIconBitmap = mParceledIconBitmap; Loading core/java/android/window/StartingWindowInfo.java +12 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,9 @@ public final class StartingWindowInfo implements Parcelable { */ public static final int STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN = 3; /** @hide **/ public static final int STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN = 4; /** * @hide */ Loading @@ -62,7 +65,8 @@ public final class StartingWindowInfo implements Parcelable { STARTING_WINDOW_TYPE_NONE, STARTING_WINDOW_TYPE_SPLASH_SCREEN, STARTING_WINDOW_TYPE_SNAPSHOT, STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN, STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN }) public @interface StartingWindowType {} Loading Loading @@ -103,7 +107,8 @@ public final class StartingWindowInfo implements Parcelable { TYPE_PARAMETER_PROCESS_RUNNING, TYPE_PARAMETER_ALLOW_TASK_SNAPSHOT, TYPE_PARAMETER_ACTIVITY_CREATED, TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN, TYPE_PARAMETER_LEGACY_SPLASH_SCREEN }) public @interface StartingTypeParams {} Loading @@ -122,6 +127,11 @@ public final class StartingWindowInfo implements Parcelable { public static final int TYPE_PARAMETER_ACTIVITY_CREATED = 0x00000010; /** @hide */ public static final int TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN = 0x00000020; /** * Application is allowed to use the legacy splash screen * @hide */ public static final int TYPE_PARAMETER_LEGACY_SPLASH_SCREEN = 0x80000000; /** * The parameters which effect the starting window type. Loading core/java/com/android/internal/display/BrightnessSynchronizer.java +10 −0 Original line number Diff line number Diff line Loading @@ -154,10 +154,20 @@ public class BrightnessSynchronizer { } } /** * Gets the stored screen brightness float value from the display brightness setting. * @return brightness */ private float getScreenBrightnessFloat() { return mDisplayManager.getBrightness(Display.DEFAULT_DISPLAY); } /** * Gets the stored screen brightness int from the system settings. * @param context for accessing settings * * @return brightness */ private static int getScreenBrightnessInt(Context context) { return Settings.System.getIntForUser(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, PowerManager.BRIGHTNESS_INVALID, Loading core/jni/AndroidRuntime.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -690,6 +690,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p char methodTraceFileBuf[sizeof("-Xmethod-trace-file:") + PROPERTY_VALUE_MAX]; char methodTraceFileSizeBuf[sizeof("-Xmethod-trace-file-size:") + PROPERTY_VALUE_MAX]; std::string fingerprintBuf; char javaZygoteForkLoopBuf[sizeof("-XX:ForceJavaZygoteForkLoop=") + PROPERTY_VALUE_MAX]; char jdwpProviderBuf[sizeof("-XjdwpProvider:") - 1 + PROPERTY_VALUE_MAX]; char opaqueJniIds[sizeof("-Xopaque-jni-ids:") - 1 + PROPERTY_VALUE_MAX]; char bootImageBuf[sizeof("-Ximage:") - 1 + PROPERTY_VALUE_MAX]; Loading Loading @@ -912,6 +913,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p parseRuntimeOption("dalvik.vm.backgroundgctype", backgroundgcOptsBuf, "-XX:BackgroundGC="); /* * Enable/disable zygote native fork loop. */ parseRuntimeOption("dalvik.vm.force-java-zygote-fork-loop", javaZygoteForkLoopBuf, "-XX:ForceJavaZygoteForkLoop="); /* * Enable debugging only for apps forked from zygote. */ Loading Loading
core/java/android/app/admin/DevicePolicyManager.java +30 −10 Original line number Diff line number Diff line Loading @@ -1605,20 +1605,29 @@ public class DevicePolicyManager { "android.app.extra.PASSWORD_COMPLEXITY"; /** * Constant for {@link #getPasswordComplexity()}: no password. * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}: no password. * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. */ public static final int PASSWORD_COMPLEXITY_NONE = 0; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the low password complexity band as: * <ul> * <li>pattern * <li>PIN with repeating (4444) or ordered (1234, 4321, 2468) sequences * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_SOMETHING * @see #PASSWORD_QUALITY_NUMERIC Loading @@ -1626,7 +1635,9 @@ public class DevicePolicyManager { public static final int PASSWORD_COMPLEXITY_LOW = 0x10000; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the medium password complexity band as: * <ul> * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * least 4 Loading @@ -1634,7 +1645,10 @@ public class DevicePolicyManager { * <li>alphanumeric, length at least 4 * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_ALPHABETIC Loading @@ -1643,7 +1657,9 @@ public class DevicePolicyManager { public static final int PASSWORD_COMPLEXITY_MEDIUM = 0x30000; /** * Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and * {@link #setRequiredPasswordComplexity(int)}. * Define the high password complexity band as: * <ul> * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * least 8 Loading @@ -1651,7 +1667,10 @@ public class DevicePolicyManager { * <li>alphanumeric, length at least 6 * </ul> * * <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents * the exact complexity band the password is in. * When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity * band which the password must meet. * * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_ALPHABETIC Loading Loading @@ -4455,8 +4474,9 @@ public class DevicePolicyManager { } /** * Sets a password complexity requirement for the user's screen lock. * The complexity level is one of the pre-defined levels. * Sets a minimum password complexity requirement for the user's screen lock. * The complexity level is one of the pre-defined levels, and the user is unable to set a * password with a lower complexity level. * * <p>Note that when called on a profile which uses an unified challenge with its parent, the * complexity would apply to the unified challenge. Loading
core/java/android/window/SplashScreenView.java +18 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,8 @@ public final class SplashScreenView extends FrameLayout { private @ColorInt int mIconBackground; private Bitmap mParceledIconBitmap; private Drawable mIconDrawable; // It is only set for legacy splash screen which won't be sent across processes. private Drawable mOverlayDrawable; private SurfaceControlViewHost.SurfacePackage mSurfacePackage; private RemoteCallback mClientCallback; private int mBrandingImageWidth; Loading Loading @@ -192,6 +194,14 @@ public final class SplashScreenView extends FrameLayout { return this; } /** * Set the Drawable object to fill entire view */ public Builder setOverlayDrawable(@Nullable Drawable drawable) { mOverlayDrawable = drawable; return this; } /** * Set the Drawable object to fill the center view. */ Loading Loading @@ -236,7 +246,11 @@ public final class SplashScreenView extends FrameLayout { layoutInflater.inflate(R.layout.splash_screen_view, null, false); view.mInitBackgroundColor = mBackgroundColor; view.mInitIconBackgroundColor = mIconBackground; if (mOverlayDrawable != null) { view.setBackground(mOverlayDrawable); } else { view.setBackgroundColor(mBackgroundColor); } view.mClientCallback = mClientCallback; view.mBrandingImageView = view.findViewById(R.id.splashscreen_branding_view); Loading @@ -261,6 +275,9 @@ public final class SplashScreenView extends FrameLayout { } } } if (mOverlayDrawable != null || mIconDrawable == null) { view.setNotCopyable(); } if (mParceledIconBitmap != null) { view.mParceledIconBitmap = mParceledIconBitmap; Loading
core/java/android/window/StartingWindowInfo.java +12 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,9 @@ public final class StartingWindowInfo implements Parcelable { */ public static final int STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN = 3; /** @hide **/ public static final int STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN = 4; /** * @hide */ Loading @@ -62,7 +65,8 @@ public final class StartingWindowInfo implements Parcelable { STARTING_WINDOW_TYPE_NONE, STARTING_WINDOW_TYPE_SPLASH_SCREEN, STARTING_WINDOW_TYPE_SNAPSHOT, STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN STARTING_WINDOW_TYPE_EMPTY_SPLASH_SCREEN, STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN }) public @interface StartingWindowType {} Loading Loading @@ -103,7 +107,8 @@ public final class StartingWindowInfo implements Parcelable { TYPE_PARAMETER_PROCESS_RUNNING, TYPE_PARAMETER_ALLOW_TASK_SNAPSHOT, TYPE_PARAMETER_ACTIVITY_CREATED, TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN, TYPE_PARAMETER_LEGACY_SPLASH_SCREEN }) public @interface StartingTypeParams {} Loading @@ -122,6 +127,11 @@ public final class StartingWindowInfo implements Parcelable { public static final int TYPE_PARAMETER_ACTIVITY_CREATED = 0x00000010; /** @hide */ public static final int TYPE_PARAMETER_USE_EMPTY_SPLASH_SCREEN = 0x00000020; /** * Application is allowed to use the legacy splash screen * @hide */ public static final int TYPE_PARAMETER_LEGACY_SPLASH_SCREEN = 0x80000000; /** * The parameters which effect the starting window type. Loading
core/java/com/android/internal/display/BrightnessSynchronizer.java +10 −0 Original line number Diff line number Diff line Loading @@ -154,10 +154,20 @@ public class BrightnessSynchronizer { } } /** * Gets the stored screen brightness float value from the display brightness setting. * @return brightness */ private float getScreenBrightnessFloat() { return mDisplayManager.getBrightness(Display.DEFAULT_DISPLAY); } /** * Gets the stored screen brightness int from the system settings. * @param context for accessing settings * * @return brightness */ private static int getScreenBrightnessInt(Context context) { return Settings.System.getIntForUser(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, PowerManager.BRIGHTNESS_INVALID, Loading
core/jni/AndroidRuntime.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -690,6 +690,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p char methodTraceFileBuf[sizeof("-Xmethod-trace-file:") + PROPERTY_VALUE_MAX]; char methodTraceFileSizeBuf[sizeof("-Xmethod-trace-file-size:") + PROPERTY_VALUE_MAX]; std::string fingerprintBuf; char javaZygoteForkLoopBuf[sizeof("-XX:ForceJavaZygoteForkLoop=") + PROPERTY_VALUE_MAX]; char jdwpProviderBuf[sizeof("-XjdwpProvider:") - 1 + PROPERTY_VALUE_MAX]; char opaqueJniIds[sizeof("-Xopaque-jni-ids:") - 1 + PROPERTY_VALUE_MAX]; char bootImageBuf[sizeof("-Ximage:") - 1 + PROPERTY_VALUE_MAX]; Loading Loading @@ -912,6 +913,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p parseRuntimeOption("dalvik.vm.backgroundgctype", backgroundgcOptsBuf, "-XX:BackgroundGC="); /* * Enable/disable zygote native fork loop. */ parseRuntimeOption("dalvik.vm.force-java-zygote-fork-loop", javaZygoteForkLoopBuf, "-XX:ForceJavaZygoteForkLoop="); /* * Enable debugging only for apps forked from zygote. */ Loading