Merge "Add NPVC.mIsPanelExpanded replacement" into main
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index 2623702..599e5cf 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -12,31 +12,37 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+aconfig_srcjars = [
+ ":android.app.usage.flags-aconfig-java{.generated_srcjars}",
+ ":android.content.pm.flags-aconfig-java{.generated_srcjars}",
+ ":android.os.flags-aconfig-java{.generated_srcjars}",
+ ":android.os.vibrator.flags-aconfig-java{.generated_srcjars}",
+ ":android.security.flags-aconfig-java{.generated_srcjars}",
+ ":android.view.flags-aconfig-java{.generated_srcjars}",
+ ":camera_platform_flags_core_java_lib{.generated_srcjars}",
+ ":com.android.window.flags.window-aconfig-java{.generated_srcjars}",
+ ":com.android.hardware.input-aconfig-java{.generated_srcjars}",
+ ":com.android.text.flags-aconfig-java{.generated_srcjars}",
+ ":telecom_flags_core_java_lib{.generated_srcjars}",
+ ":telephony_flags_core_java_lib{.generated_srcjars}",
+ ":android.companion.virtual.flags-aconfig-java{.generated_srcjars}",
+ ":android.view.inputmethod.flags-aconfig-java{.generated_srcjars}",
+ ":android.widget.flags-aconfig-java{.generated_srcjars}",
+ ":com.android.media.flags.bettertogether-aconfig-java{.generated_srcjars}",
+ ":sdk_sandbox_flags_lib{.generated_srcjars}",
+ ":android.permission.flags-aconfig-java{.generated_srcjars}",
+]
+
+filegroup {
+ name: "framework-minus-apex-aconfig-srcjars",
+ srcs: aconfig_srcjars,
+}
+
// Aconfig declarations and libraries for the core framework
java_defaults {
name: "framework-minus-apex-aconfig-libraries",
-
// Add java_aconfig_libraries to here to add them to the core framework
- srcs: [
- ":android.app.usage.flags-aconfig-java{.generated_srcjars}",
- ":android.content.pm.flags-aconfig-java{.generated_srcjars}",
- ":android.os.flags-aconfig-java{.generated_srcjars}",
- ":android.os.vibrator.flags-aconfig-java{.generated_srcjars}",
- ":android.security.flags-aconfig-java{.generated_srcjars}",
- ":android.view.flags-aconfig-java{.generated_srcjars}",
- ":camera_platform_flags_core_java_lib{.generated_srcjars}",
- ":com.android.window.flags.window-aconfig-java{.generated_srcjars}",
- ":com.android.hardware.input-aconfig-java{.generated_srcjars}",
- ":com.android.text.flags-aconfig-java{.generated_srcjars}",
- ":telecom_flags_core_java_lib{.generated_srcjars}",
- ":telephony_flags_core_java_lib{.generated_srcjars}",
- ":android.companion.virtual.flags-aconfig-java{.generated_srcjars}",
- ":android.view.inputmethod.flags-aconfig-java{.generated_srcjars}",
- ":android.widget.flags-aconfig-java{.generated_srcjars}",
- ":com.android.media.flags.bettertogether-aconfig-java{.generated_srcjars}",
- ":sdk_sandbox_flags_lib{.generated_srcjars}",
- ":android.permission.flags-aconfig-java{.generated_srcjars}",
- ],
+ srcs: aconfig_srcjars,
// Add aconfig-annotations-lib as a dependency for the optimization
libs: ["aconfig-annotations-lib"],
}
diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
index 1eaabf5..f252a0b 100644
--- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
+++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
@@ -5318,7 +5318,7 @@
if (mConstants.USE_MODE_MANAGER) {
pw.print(" mModeManagerRequestedQuickDoze=");
pw.println(mModeManagerRequestedQuickDoze);
- pw.print(" mIsOffBody");
+ pw.print(" mIsOffBody=");
pw.println(mIsOffBody);
}
}
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp
index e45ab89..8989b10 100644
--- a/api/StubLibraries.bp
+++ b/api/StubLibraries.bp
@@ -29,6 +29,9 @@
droidstubs {
name: "api-stubs-docs-non-updatable",
+ srcs: [
+ ":framework-minus-apex-aconfig-srcjars",
+ ],
defaults: [
"android-non-updatable-stubs-defaults",
"module-classpath-stubs-defaults",
diff --git a/api/api.go b/api/api.go
index 6095a9a..83804c6 100644
--- a/api/api.go
+++ b/api/api.go
@@ -433,7 +433,7 @@
}
// combined_apis bp2build converter
-func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
+func (a *CombinedApis) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
basePrefix := "non-updatable"
scopeToSuffix := map[string]string{
"public": "-current.txt",
diff --git a/core/api/current.txt b/core/api/current.txt
index a5784a0..d48685b 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -9681,22 +9681,22 @@
public final class VirtualDevice implements android.os.Parcelable {
method public int describeContents();
method public int getDeviceId();
- method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) @NonNull public int[] getDisplayIds();
+ method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") @NonNull public int[] getDisplayIds();
method @Nullable public String getName();
method @Nullable public String getPersistentDeviceId();
- method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public boolean hasCustomSensorSupport();
+ method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public boolean hasCustomSensorSupport();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.companion.virtual.VirtualDevice> CREATOR;
}
public final class VirtualDeviceManager {
- method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) @Nullable public android.companion.virtual.VirtualDevice getVirtualDevice(int);
+ method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") @Nullable public android.companion.virtual.VirtualDevice getVirtualDevice(int);
method @NonNull public java.util.List<android.companion.virtual.VirtualDevice> getVirtualDevices();
- method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public void registerVirtualDeviceListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
- method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public void unregisterVirtualDeviceListener(@NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
+ method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public void registerVirtualDeviceListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
+ method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public void unregisterVirtualDeviceListener(@NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
}
- @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public static interface VirtualDeviceManager.VirtualDeviceListener {
+ @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public static interface VirtualDeviceManager.VirtualDeviceListener {
method public default void onVirtualDeviceClosed(int);
method public default void onVirtualDeviceCreated(int);
}
@@ -17653,13 +17653,13 @@
package android.graphics.text {
public final class LineBreakConfig {
- method @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public int getHyphenation();
+ method @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public int getHyphenation();
method public int getLineBreakStyle();
method public int getLineBreakWordStyle();
method @NonNull public android.graphics.text.LineBreakConfig merge(@NonNull android.graphics.text.LineBreakConfig);
- field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_DISABLED = 0; // 0x0
- field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_ENABLED = 1; // 0x1
- field @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final int HYPHENATION_UNSPECIFIED = -1; // 0xffffffff
+ field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_DISABLED = 0; // 0x0
+ field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_ENABLED = 1; // 0x1
+ field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_UNSPECIFIED = -1; // 0xffffffff
field public static final int LINE_BREAK_STYLE_LOOSE = 1; // 0x1
field public static final int LINE_BREAK_STYLE_NONE = 0; // 0x0
field public static final int LINE_BREAK_STYLE_NORMAL = 2; // 0x2
@@ -17674,7 +17674,7 @@
ctor public LineBreakConfig.Builder();
method @NonNull public android.graphics.text.LineBreakConfig build();
method @NonNull public android.graphics.text.LineBreakConfig.Builder merge(@NonNull android.graphics.text.LineBreakConfig);
- method @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) @NonNull public android.graphics.text.LineBreakConfig.Builder setHyphenation(int);
+ method @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") @NonNull public android.graphics.text.LineBreakConfig.Builder setHyphenation(int);
method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakStyle(int);
method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakWordStyle(int);
}
@@ -23951,12 +23951,12 @@
method @Nullable public android.media.MediaRouter2.RoutingController getController(@NonNull String);
method @NonNull public java.util.List<android.media.MediaRouter2.RoutingController> getControllers();
method @NonNull public static android.media.MediaRouter2 getInstance(@NonNull android.content.Context);
- method @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) @Nullable public android.media.RouteListingPreference getRouteListingPreference();
+ method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") @Nullable public android.media.RouteListingPreference getRouteListingPreference();
method @NonNull public java.util.List<android.media.MediaRoute2Info> getRoutes();
method @NonNull public android.media.MediaRouter2.RoutingController getSystemController();
method public void registerControllerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.ControllerCallback);
method public void registerRouteCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.RouteCallback, @NonNull android.media.RouteDiscoveryPreference);
- method @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) public void registerRouteListingPreferenceCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
+ method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void registerRouteListingPreferenceCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
method public void registerTransferCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.TransferCallback);
method public void setOnGetControllerHintsListener(@Nullable android.media.MediaRouter2.OnGetControllerHintsListener);
method public void setRouteListingPreference(@Nullable android.media.RouteListingPreference);
@@ -23965,7 +23965,7 @@
method public void transferTo(@NonNull android.media.MediaRoute2Info);
method public void unregisterControllerCallback(@NonNull android.media.MediaRouter2.ControllerCallback);
method public void unregisterRouteCallback(@NonNull android.media.MediaRouter2.RouteCallback);
- method @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) public void unregisterRouteListingPreferenceCallback(@NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
+ method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void unregisterRouteListingPreferenceCallback(@NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
method public void unregisterTransferCallback(@NonNull android.media.MediaRouter2.TransferCallback);
}
@@ -23986,9 +23986,9 @@
method public void onRoutesUpdated(@NonNull java.util.List<android.media.MediaRoute2Info>);
}
- @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) public abstract static class MediaRouter2.RouteListingPreferenceCallback {
- ctor @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) public MediaRouter2.RouteListingPreferenceCallback();
- method @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2) public void onRouteListingPreferenceChanged(@Nullable android.media.RouteListingPreference);
+ @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public abstract static class MediaRouter2.RouteListingPreferenceCallback {
+ ctor @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public MediaRouter2.RouteListingPreferenceCallback();
+ method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void onRouteListingPreferenceChanged(@Nullable android.media.RouteListingPreference);
}
public class MediaRouter2.RoutingController {
@@ -32285,7 +32285,7 @@
method public static long getNativeHeapFreeSize();
method public static long getNativeHeapSize();
method public static long getPss();
- method @FlaggedApi(Flags.FLAG_REMOVE_APP_PROFILER_PSS_COLLECTION) public static long getRss();
+ method @FlaggedApi("android.os.remove_app_profiler_pss_collection") public static long getRss();
method public static String getRuntimeStat(String);
method public static java.util.Map<java.lang.String,java.lang.String> getRuntimeStats();
method @Deprecated public static int getThreadAllocCount();
@@ -38657,10 +38657,10 @@
}
public final class FileIntegrityManager {
- method @FlaggedApi(Flags.FLAG_FSVERITY_API) @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
+ method @FlaggedApi("android.security.fsverity_api") @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
method public boolean isApkVeritySupported();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
- method @FlaggedApi(Flags.FLAG_FSVERITY_API) public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
+ method @FlaggedApi("android.security.fsverity_api") public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
}
public final class KeyChain {
@@ -41579,7 +41579,7 @@
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_IS_ADHOC_CONFERENCE = 8192; // 0x2000
field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
- field @FlaggedApi(Flags.FLAG_VOIP_APP_ACTIONS_SUPPORT) public static final int PROPERTY_IS_TRANSACTIONAL = 32768; // 0x8000
+ field @FlaggedApi("com.android.server.telecom.flags.voip_app_actions_support") public static final int PROPERTY_IS_TRANSACTIONAL = 32768; // 0x8000
field public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 2048; // 0x800
field public static final int PROPERTY_RTT = 1024; // 0x400
field public static final int PROPERTY_SELF_MANAGED = 256; // 0x100
@@ -46615,7 +46615,7 @@
public static class BoringLayout.Metrics extends android.graphics.Paint.FontMetricsInt {
ctor public BoringLayout.Metrics();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.RectF getDrawingBoundingBox();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.RectF getDrawingBoundingBox();
field public int width;
}
@@ -46800,7 +46800,7 @@
public abstract class Layout {
ctor protected Layout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.RectF computeDrawingBoundingBox();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.RectF computeDrawingBoundingBox();
method public void draw(android.graphics.Canvas);
method public void draw(android.graphics.Canvas, android.graphics.Path, android.graphics.Paint, int);
method public void draw(@NonNull android.graphics.Canvas, @Nullable java.util.List<android.graphics.Path>, @Nullable java.util.List<android.graphics.Paint>, @Nullable android.graphics.Path, @Nullable android.graphics.Paint, int);
@@ -46809,24 +46809,24 @@
method public void fillCharacterBounds(@IntRange(from=0) int, @IntRange(from=0) int, @NonNull float[], @IntRange(from=0) int);
method @NonNull public final android.text.Layout.Alignment getAlignment();
method public abstract int getBottomPadding();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getBreakStrategy();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getBreakStrategy();
method public void getCursorPath(int, android.graphics.Path, CharSequence);
method public static float getDesiredWidth(CharSequence, android.text.TextPaint);
method public static float getDesiredWidth(CharSequence, int, int, android.text.TextPaint);
method public abstract int getEllipsisCount(int);
method public abstract int getEllipsisStart(int);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
method @IntRange(from=0) public int getEllipsizedWidth();
method public int getHeight();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getHyphenationFrequency();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final int getJustificationMode();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final int[] getLeftIndents();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getHyphenationFrequency();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getJustificationMode();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final int[] getLeftIndents();
method public final int getLineAscent(int);
method public final int getLineBaseline(int);
method public final int getLineBottom(int);
method public int getLineBottom(int, boolean);
method public int getLineBounds(int, android.graphics.Rect);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
method public abstract boolean getLineContainsTab(int);
method public abstract int getLineCount();
method public abstract int getLineDescent(int);
@@ -46837,13 +46837,13 @@
method public float getLineLeft(int);
method public float getLineMax(int);
method public float getLineRight(int);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final float getLineSpacingAmount();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final float getLineSpacingMultiplier();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final float getLineSpacingAmount();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final float getLineSpacingMultiplier();
method public abstract int getLineStart(int);
method public abstract int getLineTop(int);
method public int getLineVisibleEnd(int);
method public float getLineWidth(int);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @IntRange(from=1) public final int getMaxLines();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @IntRange(from=1) public final int getMaxLines();
method public int getOffsetForHorizontal(int, float);
method public int getOffsetToLeftOf(int);
method public int getOffsetToRightOf(int);
@@ -46854,19 +46854,19 @@
method public final int getParagraphRight(int);
method public float getPrimaryHorizontal(int);
method @Nullable public int[] getRangeForRect(@NonNull android.graphics.RectF, @NonNull android.text.SegmentFinder, @NonNull android.text.Layout.TextInclusionStrategy);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @Nullable public final int[] getRightIndents();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final int[] getRightIndents();
method public float getSecondaryHorizontal(int);
method public void getSelectionPath(int, int, android.graphics.Path);
method public final float getSpacingAdd();
method public final float getSpacingMultiplier();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public final CharSequence getText();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public final CharSequence getText();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
method public abstract int getTopPadding();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public boolean getUseBoundsForWidth();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public boolean getUseBoundsForWidth();
method @IntRange(from=0) public final int getWidth();
method public final void increaseWidthTo(int);
method public boolean isFallbackLineSpacingEnabled();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public final boolean isFontPaddingIncluded();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final boolean isFontPaddingIncluded();
method public boolean isRtlCharAt(int);
method protected final boolean isSpanned();
field public static final int BREAK_STRATEGY_BALANCED = 2; // 0x2
@@ -46894,7 +46894,7 @@
enum_constant public static final android.text.Layout.Alignment ALIGN_OPPOSITE;
}
- @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public static final class Layout.Builder {
+ @FlaggedApi("com.android.text.flags.use_bounds_for_width") public static final class Layout.Builder {
ctor public Layout.Builder(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @NonNull android.text.TextPaint, @IntRange(from=0) int);
method @NonNull public android.text.Layout build();
method @NonNull public android.text.Layout.Builder setAlignment(@NonNull android.text.Layout.Alignment);
@@ -46912,7 +46912,7 @@
method @NonNull public android.text.Layout.Builder setMaxLines(@IntRange(from=1) int);
method @NonNull public android.text.Layout.Builder setRightIndents(@Nullable int[]);
method @NonNull public android.text.Layout.Builder setTextDirectionHeuristic(@NonNull android.text.TextDirectionHeuristic);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
}
public static class Layout.Directions {
@@ -47889,13 +47889,13 @@
method public void writeToParcel(@NonNull android.os.Parcel, int);
}
- @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public class LineBreakConfigSpan {
+ @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public class LineBreakConfigSpan {
ctor public LineBreakConfigSpan(@NonNull android.graphics.text.LineBreakConfig);
method @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
}
- @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public static final class LineBreakConfigSpan.NoHyphenationSpan extends android.text.style.LineBreakConfigSpan {
- ctor @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN) public LineBreakConfigSpan.NoHyphenationSpan();
+ @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final class LineBreakConfigSpan.NoHyphenationSpan extends android.text.style.LineBreakConfigSpan {
+ ctor @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public LineBreakConfigSpan.NoHyphenationSpan();
}
public interface LineHeightSpan extends android.text.style.ParagraphStyle android.text.style.WrapTogetherSpan {
@@ -50058,7 +50058,7 @@
field public static final int VIRTUAL_KEY_RELEASE = 8; // 0x8
}
- @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public class HapticScrollFeedbackProvider implements android.view.ScrollFeedbackProvider {
+ @FlaggedApi("android.view.flags.scroll_feedback_api") public class HapticScrollFeedbackProvider implements android.view.ScrollFeedbackProvider {
ctor public HapticScrollFeedbackProvider(@NonNull android.view.View);
method public void onScrollLimit(int, int, int, boolean);
method public void onScrollProgress(int, int, int, int);
@@ -51230,7 +51230,7 @@
method @UiThread public void updatePositionInWindow();
}
- @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public interface ScrollFeedbackProvider {
+ @FlaggedApi("android.view.flags.scroll_feedback_api") public interface ScrollFeedbackProvider {
method public void onScrollLimit(int, int, int, boolean);
method public void onScrollProgress(int, int, int, int);
method public void onSnapToItem(int, int, int);
@@ -52513,7 +52513,7 @@
method @Deprecated public static int getEdgeSlop();
method @Deprecated public static int getFadingEdgeLength();
method @Deprecated public static long getGlobalActionKeyTimeout();
- method @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public int getHapticScrollFeedbackTickInterval(int, int, int);
+ method @FlaggedApi("android.view.flags.scroll_feedback_api") public int getHapticScrollFeedbackTickInterval(int, int, int);
method public static int getJumpTapTimeout();
method public static int getKeyRepeatDelay();
method public static int getKeyRepeatTimeout();
@@ -52553,7 +52553,7 @@
method @Deprecated public static int getWindowTouchSlop();
method public static long getZoomControlsTimeout();
method public boolean hasPermanentMenuKey();
- method @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public boolean isHapticScrollFeedbackEnabled(int, int, int);
+ method @FlaggedApi("android.view.flags.scroll_feedback_api") public boolean isHapticScrollFeedbackEnabled(int, int, int);
method public boolean shouldShowMenuShortcutsWhenKeyboardPresent();
}
@@ -59886,7 +59886,7 @@
method public final android.text.method.TransformationMethod getTransformationMethod();
method public android.graphics.Typeface getTypeface();
method public android.text.style.URLSpan[] getUrls();
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public boolean getUseBoundsForWidth();
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public boolean getUseBoundsForWidth();
method public boolean hasSelection();
method public boolean isAllCaps();
method public boolean isCursorVisible();
@@ -60029,7 +60029,7 @@
method public final void setTransformationMethod(android.text.method.TransformationMethod);
method public void setTypeface(@Nullable android.graphics.Typeface, int);
method public void setTypeface(@Nullable android.graphics.Typeface);
- method @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH) public void setUseBoundsForWidth(boolean);
+ method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public void setUseBoundsForWidth(boolean);
method public void setWidth(int);
field public static final int AUTO_SIZE_TEXT_TYPE_NONE = 0; // 0x0
field public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM = 1; // 0x1
diff --git a/core/api/lint-baseline.txt b/core/api/lint-baseline.txt
index 6b7910a..afb10f5 100644
--- a/core/api/lint-baseline.txt
+++ b/core/api/lint-baseline.txt
@@ -265,8 +265,6 @@
New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.reset()
UnflaggedApi: android.database.sqlite.SQLiteRawStatement#step():
New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.step()
-UnflaggedApi: android.database.sqlite.SQLiteRawStatement#toString():
- New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.toString()
UnflaggedApi: android.graphics.Gainmap#Gainmap(android.graphics.Gainmap, android.graphics.Bitmap):
New API must be flagged with @FlaggedApi: constructor android.graphics.Gainmap(android.graphics.Gainmap,android.graphics.Bitmap)
UnflaggedApi: android.graphics.Path#computeBounds(android.graphics.RectF):
@@ -321,8 +319,6 @@
New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onBind(android.content.Intent)
UnflaggedApi: android.media.midi.MidiUmpDeviceService#onClose():
New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onClose()
-UnflaggedApi: android.media.midi.MidiUmpDeviceService#onCreate():
- New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onCreate()
UnflaggedApi: android.media.midi.MidiUmpDeviceService#onDeviceStatusChanged(android.media.midi.MidiDeviceStatus):
New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onDeviceStatusChanged(android.media.midi.MidiDeviceStatus)
UnflaggedApi: android.media.midi.MidiUmpDeviceService#onGetInputPortReceivers():
@@ -335,8 +331,6 @@
New API must be flagged with @FlaggedApi: field android.os.UserManager.DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO
UnflaggedApi: android.provider.Settings#ACTION_CREDENTIAL_PROVIDER:
New API must be flagged with @FlaggedApi: field android.provider.Settings.ACTION_CREDENTIAL_PROVIDER
-UnflaggedApi: android.telecom.Call.Details#PROPERTY_IS_TRANSACTIONAL:
- New API must be flagged with @FlaggedApi: field android.telecom.Call.Details.PROPERTY_IS_TRANSACTIONAL
UnflaggedApi: android.telecom.Call.Details#getId():
New API must be flagged with @FlaggedApi: method android.telecom.Call.Details.getId()
UnflaggedApi: android.telephony.CarrierConfigManager#KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE:
@@ -355,46 +349,10 @@
New API must be flagged with @FlaggedApi: field android.telephony.TelephonyManager.EVENT_DISPLAY_SOS_MESSAGE
UnflaggedApi: android.telephony.TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED:
New API must be flagged with @FlaggedApi: field android.telephony.TelephonyManager.PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED
-UnflaggedApi: android.text.BoringLayout#computeDrawingBoundingBox():
- New API must be flagged with @FlaggedApi: method android.text.BoringLayout.computeDrawingBoundingBox()
-UnflaggedApi: android.text.BoringLayout.Metrics#getDrawingBoundingBox():
- New API must be flagged with @FlaggedApi: method android.text.BoringLayout.Metrics.getDrawingBoundingBox()
-UnflaggedApi: android.text.DynamicLayout#getLineBreakConfig():
- New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.getLineBreakConfig()
UnflaggedApi: android.text.DynamicLayout.Builder#setLineBreakConfig(android.graphics.text.LineBreakConfig):
New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.Builder.setLineBreakConfig(android.graphics.text.LineBreakConfig)
UnflaggedApi: android.text.DynamicLayout.Builder#setUseBoundsForWidth(boolean):
New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.Builder.setUseBoundsForWidth(boolean)
-UnflaggedApi: android.text.Layout#computeDrawingBoundingBox():
- New API must be flagged with @FlaggedApi: method android.text.Layout.computeDrawingBoundingBox()
-UnflaggedApi: android.text.Layout#getBreakStrategy():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getBreakStrategy()
-UnflaggedApi: android.text.Layout#getEllipsize():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getEllipsize()
-UnflaggedApi: android.text.Layout#getHyphenationFrequency():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getHyphenationFrequency()
-UnflaggedApi: android.text.Layout#getJustificationMode():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getJustificationMode()
-UnflaggedApi: android.text.Layout#getLeftIndents():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getLeftIndents()
-UnflaggedApi: android.text.Layout#getLineBreakConfig():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getLineBreakConfig()
-UnflaggedApi: android.text.Layout#getLineSpacingAmount():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getLineSpacingAmount()
-UnflaggedApi: android.text.Layout#getLineSpacingMultiplier():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getLineSpacingMultiplier()
-UnflaggedApi: android.text.Layout#getMaxLines():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getMaxLines()
-UnflaggedApi: android.text.Layout#getRightIndents():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getRightIndents()
-UnflaggedApi: android.text.Layout#getTextDirectionHeuristic():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getTextDirectionHeuristic()
-UnflaggedApi: android.text.Layout#getUseBoundsForWidth():
- New API must be flagged with @FlaggedApi: method android.text.Layout.getUseBoundsForWidth()
-UnflaggedApi: android.text.Layout#isFontPaddingIncluded():
- New API must be flagged with @FlaggedApi: method android.text.Layout.isFontPaddingIncluded()
-UnflaggedApi: android.text.Layout.Builder:
- New API must be flagged with @FlaggedApi: class android.text.Layout.Builder
UnflaggedApi: android.text.Layout.Builder#Builder(CharSequence, int, int, android.text.TextPaint, int):
New API must be flagged with @FlaggedApi: constructor android.text.Layout.Builder(CharSequence,int,int,android.text.TextPaint,int)
UnflaggedApi: android.text.Layout.Builder#build():
@@ -429,24 +387,12 @@
New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setRightIndents(int[])
UnflaggedApi: android.text.Layout.Builder#setTextDirectionHeuristic(android.text.TextDirectionHeuristic):
New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setTextDirectionHeuristic(android.text.TextDirectionHeuristic)
-UnflaggedApi: android.text.Layout.Builder#setUseBoundsForWidth(boolean):
- New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setUseBoundsForWidth(boolean)
-UnflaggedApi: android.text.StaticLayout#computeDrawingBoundingBox():
- New API must be flagged with @FlaggedApi: method android.text.StaticLayout.computeDrawingBoundingBox()
UnflaggedApi: android.text.StaticLayout.Builder#setUseBoundsForWidth(boolean):
New API must be flagged with @FlaggedApi: method android.text.StaticLayout.Builder.setUseBoundsForWidth(boolean)
-UnflaggedApi: android.text.style.LineBreakConfigSpan:
- New API must be flagged with @FlaggedApi: class android.text.style.LineBreakConfigSpan
UnflaggedApi: android.text.style.LineBreakConfigSpan#LineBreakConfigSpan(android.graphics.text.LineBreakConfig):
New API must be flagged with @FlaggedApi: constructor android.text.style.LineBreakConfigSpan(android.graphics.text.LineBreakConfig)
-UnflaggedApi: android.text.style.LineBreakConfigSpan#equals(Object):
- New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.equals(Object)
UnflaggedApi: android.text.style.LineBreakConfigSpan#getLineBreakConfig():
New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.getLineBreakConfig()
-UnflaggedApi: android.text.style.LineBreakConfigSpan#hashCode():
- New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.hashCode()
-UnflaggedApi: android.text.style.LineBreakConfigSpan#toString():
- New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.toString()
UnflaggedApi: android.view.HapticScrollFeedbackProvider#HapticScrollFeedbackProvider(android.view.View):
New API must be flagged with @FlaggedApi: constructor android.view.HapticScrollFeedbackProvider(android.view.View)
UnflaggedApi: android.view.HapticScrollFeedbackProvider#onScrollLimit(int, int, int, boolean):
@@ -455,16 +401,10 @@
New API must be flagged with @FlaggedApi: method android.view.HapticScrollFeedbackProvider.onScrollProgress(int,int,int,int)
UnflaggedApi: android.view.HapticScrollFeedbackProvider#onSnapToItem(int, int, int):
New API must be flagged with @FlaggedApi: method android.view.HapticScrollFeedbackProvider.onSnapToItem(int,int,int)
-UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollLimit(android.view.MotionEvent, int, boolean):
- New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollLimit(android.view.MotionEvent,int,boolean)
UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollLimit(int, int, int, boolean):
New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollLimit(int,int,int,boolean)
-UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollProgress(android.view.MotionEvent, int, int):
- New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollProgress(android.view.MotionEvent,int,int)
UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollProgress(int, int, int, int):
New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollProgress(int,int,int,int)
-UnflaggedApi: android.view.ScrollFeedbackProvider#onSnapToItem(android.view.MotionEvent, int):
- New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onSnapToItem(android.view.MotionEvent,int)
UnflaggedApi: android.view.ScrollFeedbackProvider#onSnapToItem(int, int, int):
New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onSnapToItem(int,int,int)
UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SCROLL_AMOUNT_FLOAT:
@@ -515,7 +455,3 @@
New API must be flagged with @FlaggedApi: method android.view.inputmethod.InlineSuggestionsRequest.Builder.setClientSupported(boolean)
UnflaggedApi: android.view.inputmethod.InlineSuggestionsRequest.Builder#setServiceSupported(boolean):
New API must be flagged with @FlaggedApi: method android.view.inputmethod.InlineSuggestionsRequest.Builder.setServiceSupported(boolean)
-UnflaggedApi: android.widget.TextView#getUseBoundsForWidth():
- New API must be flagged with @FlaggedApi: method android.widget.TextView.getUseBoundsForWidth()
-UnflaggedApi: android.widget.TextView#setUseBoundsForWidth(boolean):
- New API must be flagged with @FlaggedApi: method android.widget.TextView.setUseBoundsForWidth(boolean)
diff --git a/core/api/module-lib-lint-baseline.txt b/core/api/module-lib-lint-baseline.txt
index a0d3858..1633835 100644
--- a/core/api/module-lib-lint-baseline.txt
+++ b/core/api/module-lib-lint-baseline.txt
@@ -35,26 +35,8 @@
SAM-compatible parameters (such as parameter 1, "listener", in android.media.session.MediaSessionManager.setOnMediaKeyListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.media.session.MediaSessionManager#setOnVolumeKeyLongPressListener(android.media.session.MediaSessionManager.OnVolumeKeyLongPressListener, android.os.Handler):
SAM-compatible parameters (such as parameter 1, "listener", in android.media.session.MediaSessionManager.setOnVolumeKeyLongPressListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.Binder#attachInterface(android.os.IInterface, String):
- SAM-compatible parameters (such as parameter 1, "owner", in android.os.Binder.attachInterface) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.Binder#linkToDeath(android.os.IBinder.DeathRecipient, int):
- SAM-compatible parameters (such as parameter 1, "recipient", in android.os.Binder.linkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.Binder#unlinkToDeath(android.os.IBinder.DeathRecipient, int):
- SAM-compatible parameters (such as parameter 1, "recipient", in android.os.Binder.unlinkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.IBinder#linkToDeath(android.os.IBinder.DeathRecipient, int):
- SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.linkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient, int):
- SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.unlinkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-UnflaggedApi: android.Manifest.permission#BLUETOOTH_STACK:
- New API must be flagged with @FlaggedApi: field android.Manifest.permission.BLUETOOTH_STACK
-UnflaggedApi: android.Manifest.permission#CONTROL_AUTOMOTIVE_GNSS:
- New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_AUTOMOTIVE_GNSS
-UnflaggedApi: android.Manifest.permission#GET_INTENT_SENDER_INTENT:
- New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_INTENT_SENDER_INTENT
-UnflaggedApi: android.Manifest.permission#MAKE_UID_VISIBLE:
- New API must be flagged with @FlaggedApi: field android.Manifest.permission.MAKE_UID_VISIBLE
UnflaggedApi: android.Manifest.permission#MANAGE_REMOTE_AUTH:
New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_REMOTE_AUTH
UnflaggedApi: android.Manifest.permission#USE_COMPANION_TRANSPORTS:
@@ -89,13 +71,7 @@
New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.OnTransportsChangedListener.onTransportsChanged(java.util.List<android.companion.AssociationInfo>)
UnflaggedApi: android.content.Context#REMOTE_AUTH_SERVICE:
New API must be flagged with @FlaggedApi: field android.content.Context.REMOTE_AUTH_SERVICE
-UnflaggedApi: android.content.ContextWrapper#createContextForSdkInSandbox(android.content.pm.ApplicationInfo, int):
- New API must be flagged with @FlaggedApi: method android.content.ContextWrapper.createContextForSdkInSandbox(android.content.pm.ApplicationInfo,int)
-UnflaggedApi: android.media.session.MediaController.PlaybackInfo#PlaybackInfo(int, int, int, int, android.media.AudioAttributes, String):
- New API must be flagged with @FlaggedApi: constructor android.media.session.MediaController.PlaybackInfo(int,int,int,int,android.media.AudioAttributes,String)
UnflaggedApi: android.os.IpcDataCache#MODULE_TELEPHONY:
New API must be flagged with @FlaggedApi: field android.os.IpcDataCache.MODULE_TELEPHONY
-UnflaggedApi: android.provider.ContactsContract.RawContactsEntity#queryRawContactEntity(android.content.ContentResolver, long):
- New API must be flagged with @FlaggedApi: method android.provider.ContactsContract.RawContactsEntity.queryRawContactEntity(android.content.ContentResolver,long)
UnflaggedApi: android.provider.Settings.Config#getAllStrings():
New API must be flagged with @FlaggedApi: method android.provider.Settings.Config.getAllStrings()
diff --git a/core/api/system-lint-baseline.txt b/core/api/system-lint-baseline.txt
index c186cf1..ee031db 100644
--- a/core/api/system-lint-baseline.txt
+++ b/core/api/system-lint-baseline.txt
@@ -21,28 +21,10 @@
Listeners should always be at end of argument list (method `stopSatelliteTransmissionUpdates`)
-MissingGetterMatchingBuilder: android.telecom.CallScreeningService.CallResponse.Builder#setShouldScreenCallViaAudioProcessing(boolean):
- android.telecom.CallScreeningService.CallResponse does not declare a `shouldScreenCallViaAudioProcessing()` method matching method android.telecom.CallScreeningService.CallResponse.Builder.setShouldScreenCallViaAudioProcessing(boolean)
-MissingGetterMatchingBuilder: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String):
- android.telephony.mbms.DownloadRequest does not declare a `getServiceId()` method matching method android.telephony.mbms.DownloadRequest.Builder.setServiceId(String)
-
-
MissingNullability: android.media.soundtrigger.SoundTriggerDetectionService#onUnbind(android.content.Intent) parameter #0:
Missing nullability on parameter `intent` in method `onUnbind`
-MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #0:
- Missing nullability on parameter `inputId` in method `onEvent`
-MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #1:
- Missing nullability on parameter `eventType` in method `onEvent`
-MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #2:
- Missing nullability on parameter `eventArgs` in method `onEvent`
MissingNullability: android.printservice.recommendation.RecommendationService#attachBaseContext(android.content.Context) parameter #0:
Missing nullability on parameter `base` in method `attachBaseContext`
-MissingNullability: android.provider.ContactsContract.MetadataSync#CONTENT_URI:
- Missing nullability on field `CONTENT_URI` in class `class android.provider.ContactsContract.MetadataSync`
-MissingNullability: android.provider.ContactsContract.MetadataSync#METADATA_AUTHORITY_URI:
- Missing nullability on field `METADATA_AUTHORITY_URI` in class `class android.provider.ContactsContract.MetadataSync`
-MissingNullability: android.provider.ContactsContract.MetadataSyncState#CONTENT_URI:
- Missing nullability on field `CONTENT_URI` in class `class android.provider.ContactsContract.MetadataSyncState`
MissingNullability: android.provider.SearchIndexablesProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #0:
Missing nullability on parameter `context` in method `attachInfo`
MissingNullability: android.provider.SearchIndexablesProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #1:
@@ -61,10 +43,6 @@
Missing nullability on parameter `intent` in method `onUnbind`
MissingNullability: android.telephony.data.DataService#onUnbind(android.content.Intent) parameter #0:
Missing nullability on parameter `intent` in method `onUnbind`
-MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String):
- Missing nullability on method `setServiceId` return
-MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String) parameter #0:
- Missing nullability on parameter `serviceId` in method `setServiceId`
ProtectedMember: android.printservice.recommendation.RecommendationService#attachBaseContext(android.content.Context):
@@ -173,12 +151,6 @@
SAM-compatible parameters (such as parameter 2, "callback", in android.nfc.NfcAdapter.enableReaderMode) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.nfc.NfcAdapter#ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler):
SAM-compatible parameters (such as parameter 3, "tagRemovedListener", in android.nfc.NfcAdapter.ignore) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.nfc.NfcAdapter#setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity):
- SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setBeamPushUrisCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.nfc.NfcAdapter#setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...):
- SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setNdefPushMessageCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.nfc.NfcAdapter#setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...):
- SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setOnNdefPushCompleteCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.os.Binder#attachInterface(android.os.IInterface, String):
SAM-compatible parameters (such as parameter 1, "owner", in android.os.Binder.attachInterface) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.os.Binder#linkToDeath(android.os.IBinder.DeathRecipient, int):
diff --git a/core/api/test-lint-baseline.txt b/core/api/test-lint-baseline.txt
index 8286316..107be8b 100644
--- a/core/api/test-lint-baseline.txt
+++ b/core/api/test-lint-baseline.txt
@@ -1,916 +1,24 @@
// Baseline format: 1.0
-AcronymName: android.app.NotificationChannel#isImportanceLockedByOEM():
- Acronyms should not be capitalized in method names: was `isImportanceLockedByOEM`, should this be `isImportanceLockedByOem`?
-AcronymName: android.app.NotificationChannel#setImportanceLockedByOEM(boolean):
- Acronyms should not be capitalized in method names: was `setImportanceLockedByOEM`, should this be `setImportanceLockedByOem`?
-
-
-ArrayReturn: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #10:
- Method parameter should be Collection<Descriptor> (or subclass) instead of raw array; was `android.media.audiofx.AudioEffect.Descriptor[]`
-ArrayReturn: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #11:
- Method parameter should be Collection<Descriptor> (or subclass) instead of raw array; was `android.media.audiofx.AudioEffect.Descriptor[]`
-ArrayReturn: android.view.Display#getSupportedWideColorGamut():
- Method should return Collection<ColorSpace> (or subclass) instead of raw array; was `android.graphics.ColorSpace[]`
-ArrayReturn: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #0:
- Method parameter should be Collection<View> (or subclass) instead of raw array; was `android.view.View[]`
-ArrayReturn: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillOptions(CharSequence[]) parameter #0:
- Method parameter should be Collection<CharSequence> (or subclass) instead of raw array; was `java.lang.CharSequence[]`
-
-
-AutoBoxing: android.os.VintfObject#getTargetFrameworkCompatibilityMatrixVersion():
- Must avoid boxed primitives (`java.lang.Long`)
-
-
-BuilderSetStyle: android.os.StrictMode.ThreadPolicy.Builder#detectExplicitGc():
- Builder methods names should use setFoo() / addFoo() / clearFoo() style: method android.os.StrictMode.ThreadPolicy.Builder.detectExplicitGc()
-BuilderSetStyle: android.os.StrictMode.VmPolicy.Builder#permitIncorrectContextUse():
- Builder methods names should use setFoo() / addFoo() / clearFoo() style: method android.os.StrictMode.VmPolicy.Builder.permitIncorrectContextUse()
-
-
-ConcreteCollection: android.content.AutofillOptions#disabledActivities:
- Field type is concrete collection (`android.util.ArrayMap`); must be higher-level interface
-ConcreteCollection: android.content.AutofillOptions#whitelistedActivitiesForAugmentedAutofill:
- Field type is concrete collection (`android.util.ArraySet`); must be higher-level interface
-ConcreteCollection: android.content.ContentCaptureOptions#ContentCaptureOptions(int, int, int, int, int, android.util.ArraySet<android.content.ComponentName>) parameter #5:
- Parameter type is concrete collection (`android.util.ArraySet`); must be higher-level interface
-ConcreteCollection: android.content.ContentCaptureOptions#whitelistedComponents:
- Field type is concrete collection (`android.util.ArraySet`); must be higher-level interface
-ConcreteCollection: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
- Field type is concrete collection (`java.util.ArrayList`); must be higher-level interface
-ConcreteCollection: android.service.autofill.CompositeUserData#getFieldClassificationAlgorithms():
- Return type is concrete collection (`android.util.ArrayMap`); must be higher-level interface
-ConcreteCollection: android.service.autofill.CompositeUserData#getFieldClassificationArgs():
- Return type is concrete collection (`android.util.ArrayMap`); must be higher-level interface
-ConcreteCollection: android.service.autofill.InternalTransformation#batchApply(android.service.autofill.ValueFinder, android.widget.RemoteViews, java.util.ArrayList<android.util.Pair<java.lang.Integer,android.service.autofill.InternalTransformation>>) parameter #2:
- Parameter type is concrete collection (`java.util.ArrayList`); must be higher-level interface
-ConcreteCollection: android.service.autofill.UserData#getFieldClassificationAlgorithms():
- Return type is concrete collection (`android.util.ArrayMap`); must be higher-level interface
-
-
-ContextFirst: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #1:
- Context is distinct, so it must be the first argument (method `get`)
-
-
-EndsWithImpl: android.view.contentcapture.ViewNode.ViewStructureImpl:
- Don't expose your implementation details: `ViewStructureImpl` ends with `Impl`
-
-
-Enum: android.view.inspector.InspectableProperty.ValueType:
- Enums are discouraged in Android APIs
-
-
-EqualsAndHashCode: android.os.StrictMode.ViolationInfo#hashCode():
- Must override both equals and hashCode; missing one in android.os.StrictMode.ViolationInfo
-
-
-ExecutorRegistration: android.media.audiofx.AudioEffect#setParameterListener(android.media.audiofx.AudioEffect.OnParameterChangeListener):
- Registration methods should have overload that accepts delivery Executor: `setParameterListener`
-ExecutorRegistration: android.permission.PermissionControllerManager#countPermissionApps(java.util.List<java.lang.String>, int, android.permission.PermissionControllerManager.OnCountPermissionAppsResultCallback, android.os.Handler):
- Registration methods should have overload that accepts delivery Executor: `countPermissionApps`
-ExecutorRegistration: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler):
- Registration methods should have overload that accepts delivery Executor: `getAppPermissions`
-ExecutorRegistration: android.service.watchdog.ExplicitHealthCheckService#setCallback(android.os.RemoteCallback):
- Registration methods should have overload that accepts delivery Executor: `setCallback`
-ExecutorRegistration: android.window.WindowOrganizer#applySyncTransaction(android.window.WindowContainerTransaction, android.window.WindowContainerTransactionCallback):
- Registration methods should have overload that accepts delivery Executor: `applySyncTransaction`
-
-
-ForbiddenSuperClass: android.app.AppDetailsActivity:
- AppDetailsActivity should not extend `Activity`. Activity subclasses are impossible to compose. Expose a composable API instead.
-
-
-GenericException: android.service.autofill.CharSequenceTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- Methods must not throw generic exceptions (`java.lang.Exception`)
-GenericException: android.service.autofill.DateTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- Methods must not throw generic exceptions (`java.lang.Exception`)
-GenericException: android.service.autofill.ImageTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- Methods must not throw generic exceptions (`java.lang.Exception`)
-
-
-GetterSetterNames: android.net.NetworkPolicyManager#getRestrictBackground():
- Symmetric method for `setRestrictBackground` must be named `isRestrictBackground`; was `getRestrictBackground`
-
-
-IntentBuilderName: android.hardware.soundtrigger.KeyphraseEnrollmentInfo#getManageKeyphraseIntent(int, String, java.util.Locale):
- Methods creating an Intent should be named `create<Foo>Intent()`, was `getManageKeyphraseIntent`
-
-
-IntentName: android.provider.Settings.Secure#VOICE_INTERACTION_SERVICE:
- Intent action constant name must be ACTION_FOO: VOICE_INTERACTION_SERVICE
-IntentName: android.provider.Telephony.Sms.Intents#SMS_CARRIER_PROVISION_ACTION:
- Intent action constant name must be ACTION_FOO: SMS_CARRIER_PROVISION_ACTION
-
-
KotlinKeyword: android.app.Notification#when:
Avoid field names that are Kotlin hard keywords ("when"); see https://android.github.io/kotlin-guides/interop.html#no-hard-keywords
-KotlinOperator: android.os.PackageTagsList#contains(android.os.PackageTagsList):
- Method can be invoked as a "in" operator from Kotlin: `contains` (this is usually desirable; just make sure it makes sense for this type of object)
-KotlinOperator: android.util.SparseArrayMap#get(int, K):
- Method can be invoked with an indexing operator from Kotlin: `get` (this is usually desirable; just make sure it makes sense for this type of object)
-
-
-ListenerLast: android.permission.PermissionControllerManager#countPermissionApps(java.util.List<java.lang.String>, int, android.permission.PermissionControllerManager.OnCountPermissionAppsResultCallback, android.os.Handler) parameter #3:
- Listeners should always be at end of argument list (method `countPermissionApps`)
-ListenerLast: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler) parameter #2:
- Listeners should always be at end of argument list (method `getAppPermissions`)
-
-
-ManagerConstructor: android.content.pm.ShortcutManager#ShortcutManager(android.content.Context):
- Managers must always be obtained from Context; no direct constructors
-
-
-MinMaxConstant: android.os.UserHandle#MIN_SECONDARY_USER_ID:
- If min/max could change in future, make them dynamic methods: android.os.UserHandle#MIN_SECONDARY_USER_ID
-MinMaxConstant: android.view.autofill.AutofillManager#MAX_TEMP_AUGMENTED_SERVICE_DURATION_MS:
- If min/max could change in future, make them dynamic methods: android.view.autofill.AutofillManager#MAX_TEMP_AUGMENTED_SERVICE_DURATION_MS
-
-
-MissingGetterMatchingBuilder: android.media.VolumeShaper.Configuration.Builder#setOptionFlags(int):
- android.media.VolumeShaper.Configuration does not declare a `getOptionFlags()` method matching method android.media.VolumeShaper.Configuration.Builder.setOptionFlags(int)
-MissingGetterMatchingBuilder: android.media.audiopolicy.AudioPolicy.Builder#setIsTestFocusPolicy(boolean):
- android.media.audiopolicy.AudioPolicy does not declare a `isIsTestFocusPolicy()` method matching method android.media.audiopolicy.AudioPolicy.Builder.setIsTestFocusPolicy(boolean)
-MissingGetterMatchingBuilder: android.security.keystore.KeyGenParameterSpec.Builder#setUniqueIdIncluded(boolean):
- android.security.keystore.KeyGenParameterSpec does not declare a `isUniqueIdIncluded()` method matching method android.security.keystore.KeyGenParameterSpec.Builder.setUniqueIdIncluded(boolean)
-MissingGetterMatchingBuilder: android.telecom.ConnectionRequest.Builder#setIsAdhocConferenceCall(boolean):
- android.telecom.ConnectionRequest does not declare a `isIsAdhocConferenceCall()` method matching method android.telecom.ConnectionRequest.Builder.setIsAdhocConferenceCall(boolean)
-MissingGetterMatchingBuilder: android.telecom.ConnectionRequest.Builder#setRttPipeFromInCall(android.os.ParcelFileDescriptor):
- android.telecom.ConnectionRequest does not declare a `getRttPipeFromInCall()` method matching method android.telecom.ConnectionRequest.Builder.setRttPipeFromInCall(android.os.ParcelFileDescriptor)
-MissingGetterMatchingBuilder: android.telecom.ConnectionRequest.Builder#setRttPipeToInCall(android.os.ParcelFileDescriptor):
- android.telecom.ConnectionRequest does not declare a `getRttPipeToInCall()` method matching method android.telecom.ConnectionRequest.Builder.setRttPipeToInCall(android.os.ParcelFileDescriptor)
-MissingGetterMatchingBuilder: android.telecom.ConnectionRequest.Builder#setShouldShowIncomingCallUi(boolean):
- android.telecom.ConnectionRequest does not declare a `shouldShowIncomingCallUi()` method matching method android.telecom.ConnectionRequest.Builder.setShouldShowIncomingCallUi(boolean)
-MissingGetterMatchingBuilder: android.view.Display.Mode.Builder#setResolution(int, int):
- android.view.Display.Mode does not declare a `getResolution()` method matching method android.view.Display.Mode.Builder.setResolution(int,int)
-
-
-MissingNullability: android.app.Activity#onMovedToDisplay(int, android.content.res.Configuration) parameter #1:
- Missing nullability on parameter `config` in method `onMovedToDisplay`
-MissingNullability: android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning(android.content.ComponentName) parameter #0:
- Missing nullability on parameter `activity` in method `alwaysShowUnsupportedCompileSdkWarning`
-MissingNullability: android.app.ActivityManager#holdLock(android.os.IBinder, int) parameter #0:
- Missing nullability on parameter `token` in method `holdLock`
-MissingNullability: android.app.ActivityManager#scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int) parameter #0:
- Missing nullability on parameter `packages` in method `scheduleApplicationInfoChanged`
-MissingNullability: android.app.ActivityManager.TaskDescription#getIconFilename():
- Missing nullability on method `getIconFilename` return
-MissingNullability: android.app.ActivityTaskManager#clearLaunchParamsForPackages(java.util.List<java.lang.String>) parameter #0:
- Missing nullability on parameter `packageNames` in method `clearLaunchParamsForPackages`
-MissingNullability: android.app.ActivityTaskManager#resizeTask(int, android.graphics.Rect) parameter #1:
- Missing nullability on parameter `bounds` in method `resizeTask`
-MissingNullability: android.app.ActivityTaskManager#supportsMultiWindow(android.content.Context) parameter #0:
- Missing nullability on parameter `context` in method `supportsMultiWindow`
-MissingNullability: android.app.ActivityTaskManager#supportsSplitScreenMultiWindow(android.content.Context) parameter #0:
- Missing nullability on parameter `context` in method `supportsSplitScreenMultiWindow`
MissingNullability: android.app.AppDetailsActivity#onCreate(android.os.Bundle) parameter #0:
Missing nullability on parameter `savedInstanceState` in method `onCreate`
-MissingNullability: android.app.AppOpsManager#isOperationActive(int, int, String) parameter #2:
- Missing nullability on parameter `packageName` in method `isOperationActive`
-MissingNullability: android.app.AppOpsManager#opToPermission(int):
- Missing nullability on method `opToPermission` return
-MissingNullability: android.app.AppOpsManager#permissionToOpCode(String) parameter #0:
- Missing nullability on parameter `permission` in method `permissionToOpCode`
-MissingNullability: android.app.AppOpsManager#setMode(int, int, String, int) parameter #2:
- Missing nullability on parameter `packageName` in method `setMode`
-MissingNullability: android.app.NotificationManager#allowAssistantAdjustment(String) parameter #0:
- Missing nullability on parameter `capability` in method `allowAssistantAdjustment`
-MissingNullability: android.app.NotificationManager#disallowAssistantAdjustment(String) parameter #0:
- Missing nullability on parameter `capability` in method `disallowAssistantAdjustment`
-MissingNullability: android.app.NotificationManager#getEffectsSuppressor():
- Missing nullability on method `getEffectsSuppressor` return
-MissingNullability: android.app.TimePickerDialog#getTimePicker():
- Missing nullability on method `getTimePicker` return
-MissingNullability: android.app.WindowConfiguration#compareTo(android.app.WindowConfiguration) parameter #0:
- Missing nullability on parameter `that` in method `compareTo`
-MissingNullability: android.app.WindowConfiguration#getAppBounds():
- Missing nullability on method `getAppBounds` return
-MissingNullability: android.app.WindowConfiguration#getBounds():
- Missing nullability on method `getBounds` return
-MissingNullability: android.app.WindowConfiguration#setAppBounds(android.graphics.Rect) parameter #0:
- Missing nullability on parameter `rect` in method `setAppBounds`
-MissingNullability: android.app.WindowConfiguration#setBounds(android.graphics.Rect) parameter #0:
- Missing nullability on parameter `rect` in method `setBounds`
-MissingNullability: android.app.WindowConfiguration#setTo(android.app.WindowConfiguration) parameter #0:
- Missing nullability on parameter `other` in method `setTo`
-MissingNullability: android.app.WindowConfiguration#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `dest` in method `writeToParcel`
-MissingNullability: android.app.admin.DevicePolicyManager#getOwnerInstalledCaCerts(android.os.UserHandle):
- Missing nullability on method `getOwnerInstalledCaCerts` return
-MissingNullability: android.app.admin.SecurityLog.SecurityEvent#SecurityEvent(long, byte[]) parameter #1:
- Missing nullability on parameter `data` in method `SecurityEvent`
-MissingNullability: android.app.prediction.AppPredictor#getSessionId():
- Missing nullability on method `getSessionId` return
-MissingNullability: android.content.AutofillOptions#forWhitelistingItself():
- Missing nullability on method `forWhitelistingItself` return
-MissingNullability: android.content.AutofillOptions#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `parcel` in method `writeToParcel`
-MissingNullability: android.content.ContentCaptureOptions#forWhitelistingItself():
- Missing nullability on method `forWhitelistingItself` return
-MissingNullability: android.content.ContentCaptureOptions#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `parcel` in method `writeToParcel`
-MissingNullability: android.content.ContentResolver#getSyncAdapterPackagesForAuthorityAsUser(String, int):
- Missing nullability on method `getSyncAdapterPackagesForAuthorityAsUser` return
-MissingNullability: android.content.ContentResolver#getSyncAdapterPackagesForAuthorityAsUser(String, int) parameter #0:
- Missing nullability on parameter `authority` in method `getSyncAdapterPackagesForAuthorityAsUser`
-MissingNullability: android.content.pm.ActivityInfo#isTranslucentOrFloating(android.content.res.TypedArray) parameter #0:
- Missing nullability on parameter `attributes` in method `isTranslucentOrFloating`
-MissingNullability: android.content.pm.LauncherApps#LauncherApps(android.content.Context) parameter #0:
- Missing nullability on parameter `context` in method `LauncherApps`
-MissingNullability: android.content.pm.PackageManager#getHoldLockToken():
- Missing nullability on method `getHoldLockToken` return
-MissingNullability: android.content.pm.PackageManager#getNamesForUids(int[]) parameter #0:
- Missing nullability on parameter `uids` in method `getNamesForUids`
-MissingNullability: android.content.pm.PackageManager#holdLock(android.os.IBinder, int) parameter #0:
- Missing nullability on parameter `token` in method `holdLock`
-MissingNullability: android.content.pm.ShortcutManager#ShortcutManager(android.content.Context) parameter #0:
- Missing nullability on parameter `context` in method `ShortcutManager`
-MissingNullability: android.content.pm.UserInfo#UserInfo(android.content.pm.UserInfo) parameter #0:
- Missing nullability on parameter `orig` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, String, int) parameter #1:
- Missing nullability on parameter `name` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, String, int) parameter #2:
- Missing nullability on parameter `iconPath` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, String, int, String) parameter #1:
- Missing nullability on parameter `name` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, String, int, String) parameter #2:
- Missing nullability on parameter `iconPath` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, String, int, String) parameter #4:
- Missing nullability on parameter `userType` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#UserInfo(int, String, int) parameter #1:
- Missing nullability on parameter `name` in method `UserInfo`
-MissingNullability: android.content.pm.UserInfo#getUserHandle():
- Missing nullability on method `getUserHandle` return
-MissingNullability: android.content.pm.UserInfo#iconPath:
- Missing nullability on field `iconPath` in class `class android.content.pm.UserInfo`
-MissingNullability: android.content.pm.UserInfo#lastLoggedInFingerprint:
- Missing nullability on field `lastLoggedInFingerprint` in class `class android.content.pm.UserInfo`
-MissingNullability: android.content.pm.UserInfo#name:
- Missing nullability on field `name` in class `class android.content.pm.UserInfo`
-MissingNullability: android.content.pm.UserInfo#userType:
- Missing nullability on field `userType` in class `class android.content.pm.UserInfo`
-MissingNullability: android.content.pm.UserInfo#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `dest` in method `writeToParcel`
-MissingNullability: android.content.res.AssetManager#getOverlayablesToString(String) parameter #0:
- Missing nullability on parameter `packageName` in method `getOverlayablesToString`
-MissingNullability: android.content.res.Configuration#windowConfiguration:
- Missing nullability on field `windowConfiguration` in class `class android.content.res.Configuration`
-MissingNullability: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]) parameter #0:
- Missing nullability on parameter `printer` in method `dump`
-MissingNullability: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]) parameter #1:
- Missing nullability on parameter `args` in method `dump`
-MissingNullability: android.database.sqlite.SQLiteDebug#getDatabaseInfo():
- Missing nullability on method `getDatabaseInfo` return
-MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#DbStats(String, long, long, int, int, int, int) parameter #0:
- Missing nullability on parameter `dbName` in method `DbStats`
-MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#cache:
- Missing nullability on field `cache` in class `class android.database.sqlite.SQLiteDebug.DbStats`
-MissingNullability: android.database.sqlite.SQLiteDebug.DbStats#dbName:
- Missing nullability on field `dbName` in class `class android.database.sqlite.SQLiteDebug.DbStats`
-MissingNullability: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
- Missing nullability on field `dbStats` in class `class android.database.sqlite.SQLiteDebug.PagerStats`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #0:
- Missing nullability on parameter `db` in method `SQLiteDirectCursorDriver`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #1:
- Missing nullability on parameter `sql` in method `SQLiteDirectCursorDriver`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #2:
- Missing nullability on parameter `editTable` in method `SQLiteDirectCursorDriver`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#SQLiteDirectCursorDriver(android.database.sqlite.SQLiteDatabase, String, String, android.os.CancellationSignal) parameter #3:
- Missing nullability on parameter `cancellationSignal` in method `SQLiteDirectCursorDriver`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#cursorRequeried(android.database.Cursor) parameter #0:
- Missing nullability on parameter `cursor` in method `cursorRequeried`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]):
- Missing nullability on method `query` return
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]) parameter #0:
- Missing nullability on parameter `factory` in method `query`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]) parameter #1:
- Missing nullability on parameter `selectionArgs` in method `query`
-MissingNullability: android.database.sqlite.SQLiteDirectCursorDriver#setBindArguments(String[]) parameter #0:
- Missing nullability on parameter `bindArgs` in method `setBindArguments`
-MissingNullability: android.database.sqlite.SQLiteGlobal#getDefaultJournalMode():
- Missing nullability on method `getDefaultJournalMode` return
-MissingNullability: android.database.sqlite.SQLiteGlobal#getDefaultSyncMode():
- Missing nullability on method `getDefaultSyncMode` return
-MissingNullability: android.database.sqlite.SQLiteGlobal#getWALSyncMode():
- Missing nullability on method `getWALSyncMode` return
-MissingNullability: android.graphics.ImageDecoder#createSource(android.content.res.Resources, java.io.InputStream, int) parameter #0:
- Missing nullability on parameter `res` in method `createSource`
-MissingNullability: android.graphics.drawable.AdaptiveIconDrawable#getSafeZone():
- Missing nullability on method `getSafeZone` return
-MissingNullability: android.graphics.drawable.ColorDrawable#getXfermode():
- Missing nullability on method `getXfermode` return
-MissingNullability: android.hardware.camera2.CameraManager#getCameraIdListNoLazy():
- Missing nullability on method `getCameraIdListNoLazy` return
-MissingNullability: android.hardware.display.AmbientDisplayConfiguration#AmbientDisplayConfiguration(android.content.Context) parameter #0:
- Missing nullability on parameter `context` in method `AmbientDisplayConfiguration`
-MissingNullability: android.media.AudioAttributes#getSdkUsages():
- Missing nullability on method `getSdkUsages` return
-MissingNullability: android.media.AudioManager#getPublicStreamTypes():
- Missing nullability on method `getPublicStreamTypes` return
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #3:
- Missing nullability on parameter `clientFormat` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #4:
- Missing nullability on parameter `devFormat` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String) parameter #6:
- Missing nullability on parameter `packageName` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #10:
- Missing nullability on parameter `clientEffects` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #11:
- Missing nullability on parameter `deviceEffects` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #3:
- Missing nullability on parameter `clientFormat` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #4:
- Missing nullability on parameter `devFormat` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.AudioRecordingConfiguration#AudioRecordingConfiguration(int, int, int, android.media.AudioFormat, android.media.AudioFormat, int, String, int, boolean, int, android.media.audiofx.AudioEffect.Descriptor[], android.media.audiofx.AudioEffect.Descriptor[]) parameter #6:
- Missing nullability on parameter `packageName` in method `AudioRecordingConfiguration`
-MissingNullability: android.media.PlaybackParams#setAudioStretchMode(int):
- Missing nullability on method `setAudioStretchMode` return
-MissingNullability: android.media.audiofx.AudioEffect#EFFECT_TYPE_NULL:
- Missing nullability on field `EFFECT_TYPE_NULL` in class `class android.media.audiofx.AudioEffect`
-MissingNullability: android.media.audiofx.AudioEffect#byteArrayToInt(byte[]) parameter #0:
- Missing nullability on parameter `valueBuf` in method `byteArrayToInt`
-MissingNullability: android.media.audiofx.AudioEffect#byteArrayToShort(byte[]) parameter #0:
- Missing nullability on parameter `valueBuf` in method `byteArrayToShort`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(byte[], byte[]) parameter #0:
- Missing nullability on parameter `param` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(byte[], byte[]) parameter #1:
- Missing nullability on parameter `value` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, byte[]) parameter #1:
- Missing nullability on parameter `value` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, int[]) parameter #1:
- Missing nullability on parameter `value` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(int, short[]) parameter #1:
- Missing nullability on parameter `value` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(int[], short[]) parameter #0:
- Missing nullability on parameter `param` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#getParameter(int[], short[]) parameter #1:
- Missing nullability on parameter `value` in method `getParameter`
-MissingNullability: android.media.audiofx.AudioEffect#intToByteArray(int):
- Missing nullability on method `intToByteArray` return
-MissingNullability: android.media.audiofx.AudioEffect#isEffectTypeAvailable(java.util.UUID) parameter #0:
- Missing nullability on parameter `type` in method `isEffectTypeAvailable`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(byte[], byte[]) parameter #0:
- Missing nullability on parameter `param` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(byte[], byte[]) parameter #1:
- Missing nullability on parameter `value` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(int, byte[]) parameter #1:
- Missing nullability on parameter `value` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], byte[]) parameter #0:
- Missing nullability on parameter `param` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], byte[]) parameter #1:
- Missing nullability on parameter `value` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], int[]) parameter #0:
- Missing nullability on parameter `param` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameter(int[], int[]) parameter #1:
- Missing nullability on parameter `value` in method `setParameter`
-MissingNullability: android.media.audiofx.AudioEffect#setParameterListener(android.media.audiofx.AudioEffect.OnParameterChangeListener) parameter #0:
- Missing nullability on parameter `listener` in method `setParameterListener`
-MissingNullability: android.media.audiofx.AudioEffect#shortToByteArray(short):
- Missing nullability on method `shortToByteArray` return
-MissingNullability: android.media.audiofx.AudioEffect.Descriptor#Descriptor(android.os.Parcel) parameter #0:
- Missing nullability on parameter `in` in method `Descriptor`
-MissingNullability: android.media.audiofx.AudioEffect.Descriptor#writeToParcel(android.os.Parcel) parameter #0:
- Missing nullability on parameter `dest` in method `writeToParcel`
-MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #0:
- Missing nullability on parameter `effect` in method `onParameterChange`
-MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #2:
- Missing nullability on parameter `param` in method `onParameterChange`
-MissingNullability: android.media.audiofx.AudioEffect.OnParameterChangeListener#onParameterChange(android.media.audiofx.AudioEffect, int, byte[], byte[]) parameter #3:
- Missing nullability on parameter `value` in method `onParameterChange`
-MissingNullability: android.os.Build#is64BitAbi(String) parameter #0:
- Missing nullability on parameter `abi` in method `is64BitAbi`
-MissingNullability: android.os.Build.VERSION#ACTIVE_CODENAMES:
- Missing nullability on field `ACTIVE_CODENAMES` in class `class android.os.Build.VERSION`
-MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...):
- Missing nullability on method `buildPath` return
-MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...) parameter #0:
- Missing nullability on parameter `base` in method `buildPath`
-MissingNullability: android.os.Environment#buildPath(java.io.File, java.lang.String...) parameter #1:
- Missing nullability on parameter `segments` in method `buildPath`
-MissingNullability: android.os.FileUtils#contains(java.io.File, java.io.File) parameter #0:
- Missing nullability on parameter `dir` in method `contains`
-MissingNullability: android.os.FileUtils#contains(java.io.File, java.io.File) parameter #1:
- Missing nullability on parameter `file` in method `contains`
-MissingNullability: android.os.ParcelFileDescriptor#getFile(java.io.FileDescriptor):
- Missing nullability on method `getFile` return
-MissingNullability: android.os.ParcelFileDescriptor#getFile(java.io.FileDescriptor) parameter #0:
- Missing nullability on parameter `fd` in method `getFile`
-MissingNullability: android.os.StrictMode#setViolationLogger(android.os.StrictMode.ViolationLogger) parameter #0:
- Missing nullability on parameter `listener` in method `setViolationLogger`
-MissingNullability: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel) parameter #0:
- Missing nullability on parameter `in` in method `ViolationInfo`
-MissingNullability: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel, boolean) parameter #0:
- Missing nullability on parameter `in` in method `ViolationInfo`
-MissingNullability: android.os.StrictMode.ViolationInfo#broadcastIntentAction:
- Missing nullability on field `broadcastIntentAction` in class `class android.os.StrictMode.ViolationInfo`
-MissingNullability: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String) parameter #0:
- Missing nullability on parameter `pw` in method `dump`
-MissingNullability: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String) parameter #1:
- Missing nullability on parameter `prefix` in method `dump`
-MissingNullability: android.os.StrictMode.ViolationInfo#getStackTrace():
- Missing nullability on method `getStackTrace` return
-MissingNullability: android.os.StrictMode.ViolationInfo#getViolationClass():
- Missing nullability on method `getViolationClass` return
-MissingNullability: android.os.StrictMode.ViolationInfo#getViolationDetails():
- Missing nullability on method `getViolationDetails` return
-MissingNullability: android.os.StrictMode.ViolationInfo#tags:
- Missing nullability on field `tags` in class `class android.os.StrictMode.ViolationInfo`
-MissingNullability: android.os.StrictMode.ViolationInfo#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `dest` in method `writeToParcel`
-MissingNullability: android.os.StrictMode.ViolationLogger#log(android.os.StrictMode.ViolationInfo) parameter #0:
- Missing nullability on parameter `info` in method `log`
-MissingNullability: android.os.VibrationEffect#RINGTONES:
- Missing nullability on field `RINGTONES` in class `class android.os.VibrationEffect`
-MissingNullability: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #0:
- Missing nullability on parameter `uri` in method `get`
-MissingNullability: android.os.VibrationEffect#get(android.net.Uri, android.content.Context) parameter #1:
- Missing nullability on parameter `context` in method `get`
-MissingNullability: android.os.VibrationEffect#get(int):
- Missing nullability on method `get` return
-MissingNullability: android.os.VibrationEffect#get(int, boolean):
- Missing nullability on method `get` return
-MissingNullability: android.os.VintfObject#getHalNamesAndVersions():
- Missing nullability on method `getHalNamesAndVersions` return
-MissingNullability: android.os.VintfObject#getSepolicyVersion():
- Missing nullability on method `getSepolicyVersion` return
-MissingNullability: android.os.VintfObject#getTargetFrameworkCompatibilityMatrixVersion():
- Missing nullability on method `getTargetFrameworkCompatibilityMatrixVersion` return
-MissingNullability: android.os.VintfObject#getVndkSnapshots():
- Missing nullability on method `getVndkSnapshots` return
-MissingNullability: android.os.VintfObject#report():
- Missing nullability on method `report` return
-MissingNullability: android.os.VintfRuntimeInfo#getCpuInfo():
- Missing nullability on method `getCpuInfo` return
-MissingNullability: android.os.VintfRuntimeInfo#getHardwareId():
- Missing nullability on method `getHardwareId` return
-MissingNullability: android.os.VintfRuntimeInfo#getKernelVersion():
- Missing nullability on method `getKernelVersion` return
-MissingNullability: android.os.VintfRuntimeInfo#getNodeName():
- Missing nullability on method `getNodeName` return
-MissingNullability: android.os.VintfRuntimeInfo#getOsName():
- Missing nullability on method `getOsName` return
-MissingNullability: android.os.VintfRuntimeInfo#getOsRelease():
- Missing nullability on method `getOsRelease` return
-MissingNullability: android.os.VintfRuntimeInfo#getOsVersion():
- Missing nullability on method `getOsVersion` return
-MissingNullability: android.os.WorkSource#add(int, String) parameter #1:
- Missing nullability on parameter `name` in method `add`
-MissingNullability: android.os.health.HealthKeys.Constants#Constants(Class) parameter #0:
- Missing nullability on parameter `clazz` in method `Constants`
-MissingNullability: android.os.health.HealthKeys.Constants#getDataType():
- Missing nullability on method `getDataType` return
-MissingNullability: android.os.health.HealthKeys.Constants#getKeys(int):
- Missing nullability on method `getKeys` return
-MissingNullability: android.os.health.HealthStats#HealthStats(android.os.Parcel) parameter #0:
- Missing nullability on parameter `in` in method `HealthStats`
-MissingNullability: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.Parcel) parameter #0:
- Missing nullability on parameter `in` in method `HealthStatsParceler`
-MissingNullability: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.health.HealthStatsWriter) parameter #0:
- Missing nullability on parameter `writer` in method `HealthStatsParceler`
-MissingNullability: android.os.health.HealthStatsParceler#getHealthStats():
- Missing nullability on method `getHealthStats` return
-MissingNullability: android.os.health.HealthStatsParceler#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `out` in method `writeToParcel`
-MissingNullability: android.os.health.HealthStatsWriter#HealthStatsWriter(android.os.health.HealthKeys.Constants) parameter #0:
- Missing nullability on parameter `constants` in method `HealthStatsWriter`
-MissingNullability: android.os.health.HealthStatsWriter#addMeasurements(int, String, long) parameter #1:
- Missing nullability on parameter `name` in method `addMeasurements`
-MissingNullability: android.os.health.HealthStatsWriter#addStats(int, String, android.os.health.HealthStatsWriter) parameter #1:
- Missing nullability on parameter `name` in method `addStats`
-MissingNullability: android.os.health.HealthStatsWriter#addStats(int, String, android.os.health.HealthStatsWriter) parameter #2:
- Missing nullability on parameter `value` in method `addStats`
-MissingNullability: android.os.health.HealthStatsWriter#addTimers(int, String, android.os.health.TimerStat) parameter #1:
- Missing nullability on parameter `name` in method `addTimers`
-MissingNullability: android.os.health.HealthStatsWriter#addTimers(int, String, android.os.health.TimerStat) parameter #2:
- Missing nullability on parameter `value` in method `addTimers`
-MissingNullability: android.os.health.HealthStatsWriter#flattenToParcel(android.os.Parcel) parameter #0:
- Missing nullability on parameter `out` in method `flattenToParcel`
-MissingNullability: android.os.storage.StorageVolume#getPath():
- Missing nullability on method `getPath` return
-MissingNullability: android.provider.CalendarContract.Calendars#SYNC_WRITABLE_COLUMNS:
- Missing nullability on field `SYNC_WRITABLE_COLUMNS` in class `class android.provider.CalendarContract.Calendars`
-MissingNullability: android.provider.CalendarContract.Events#SYNC_WRITABLE_COLUMNS:
- Missing nullability on field `SYNC_WRITABLE_COLUMNS` in class `class android.provider.CalendarContract.Events`
-MissingNullability: android.provider.ContactsContract.RawContactsEntity#CORP_CONTENT_URI:
- Missing nullability on field `CORP_CONTENT_URI` in class `class android.provider.ContactsContract.RawContactsEntity`
-MissingNullability: android.security.keystore.KeyProtection.Builder#setBoundToSpecificSecureUserId(long):
- Missing nullability on method `setBoundToSpecificSecureUserId` return
-MissingNullability: android.service.autofill.CompositeUserData#getCategoryIds():
- Missing nullability on method `getCategoryIds` return
-MissingNullability: android.service.autofill.CompositeUserData#getDefaultFieldClassificationArgs():
- Missing nullability on method `getDefaultFieldClassificationArgs` return
-MissingNullability: android.service.autofill.CompositeUserData#getFieldClassificationAlgorithms():
- Missing nullability on method `getFieldClassificationAlgorithms` return
-MissingNullability: android.service.autofill.CompositeUserData#getFieldClassificationArgs():
- Missing nullability on method `getFieldClassificationArgs` return
-MissingNullability: android.service.autofill.CompositeUserData#getValues():
- Missing nullability on method `getValues` return
-MissingNullability: android.service.autofill.CompositeUserData#writeToParcel(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `parcel` in method `writeToParcel`
-MissingNullability: android.service.autofill.UserData#getFieldClassificationAlgorithms():
- Missing nullability on method `getFieldClassificationAlgorithms` return
-MissingNullability: android.telecom.Call.Details#getTelecomCallId():
- Missing nullability on method `getTelecomCallId` return
-MissingNullability: android.telephony.ServiceState#addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo) parameter #0:
- Missing nullability on parameter `nri` in method `addNetworkRegistrationInfo`
-MissingNullability: android.telephony.ServiceState#setCellBandwidths(int[]) parameter #0:
- Missing nullability on parameter `bandwidths` in method `setCellBandwidths`
-MissingNullability: android.telephony.SmsManager#checkSmsShortCodeDestination(String, String) parameter #0:
- Missing nullability on parameter `destAddress` in method `checkSmsShortCodeDestination`
-MissingNullability: android.telephony.SmsManager#checkSmsShortCodeDestination(String, String) parameter #1:
- Missing nullability on parameter `countryIso` in method `checkSmsShortCodeDestination`
-MissingNullability: android.telephony.TelephonyManager#HAL_VERSION_UNKNOWN:
- Missing nullability on field `HAL_VERSION_UNKNOWN` in class `class android.telephony.TelephonyManager`
-MissingNullability: android.telephony.TelephonyManager#HAL_VERSION_UNSUPPORTED:
- Missing nullability on field `HAL_VERSION_UNSUPPORTED` in class `class android.telephony.TelephonyManager`
-MissingNullability: android.telephony.TelephonyManager#getLine1AlphaTag():
- Missing nullability on method `getLine1AlphaTag` return
-MissingNullability: android.telephony.TelephonyManager#getRadioHalVersion():
- Missing nullability on method `getRadioHalVersion` return
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #0:
- Missing nullability on parameter `mccmnc` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #1:
- Missing nullability on parameter `imsi` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #2:
- Missing nullability on parameter `iccid` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #3:
- Missing nullability on parameter `gid1` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #4:
- Missing nullability on parameter `gid2` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #5:
- Missing nullability on parameter `plmn` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #6:
- Missing nullability on parameter `spn` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #7:
- Missing nullability on parameter `carrierPriviledgeRules` in method `setCarrierTestOverride`
-MissingNullability: android.telephony.TelephonyManager#setCarrierTestOverride(String, String, String, String, String, String, String, String, String) parameter #8:
- Missing nullability on parameter `apn` in method `setCarrierTestOverride`
-MissingNullability: android.text.Selection.MemoryTextWatcher#afterTextChanged(android.text.Editable) parameter #0:
- Missing nullability on parameter `s` in method `afterTextChanged`
-MissingNullability: android.text.Selection.MemoryTextWatcher#beforeTextChanged(CharSequence, int, int, int) parameter #0:
- Missing nullability on parameter `s` in method `beforeTextChanged`
-MissingNullability: android.text.Selection.MemoryTextWatcher#onTextChanged(CharSequence, int, int, int) parameter #0:
- Missing nullability on parameter `s` in method `onTextChanged`
-MissingNullability: android.transition.TransitionManager#getTransition(android.transition.Scene):
- Missing nullability on method `getTransition` return
-MissingNullability: android.transition.TransitionManager#getTransition(android.transition.Scene) parameter #0:
- Missing nullability on parameter `scene` in method `getTransition`
-MissingNullability: android.util.FeatureFlagUtils#getAllFeatureFlags():
- Missing nullability on method `getAllFeatureFlags` return
-MissingNullability: android.util.FeatureFlagUtils#isEnabled(android.content.Context, String) parameter #0:
- Missing nullability on parameter `context` in method `isEnabled`
-MissingNullability: android.util.FeatureFlagUtils#isEnabled(android.content.Context, String) parameter #1:
- Missing nullability on parameter `feature` in method `isEnabled`
-MissingNullability: android.util.FeatureFlagUtils#setEnabled(android.content.Context, String, boolean) parameter #0:
- Missing nullability on parameter `context` in method `setEnabled`
-MissingNullability: android.util.FeatureFlagUtils#setEnabled(android.content.Context, String, boolean) parameter #1:
- Missing nullability on parameter `feature` in method `setEnabled`
-MissingNullability: android.util.TimeUtils#formatDuration(long):
- Missing nullability on method `formatDuration` return
-MissingNullability: android.util.proto.EncodedBuffer#dumpBuffers(String) parameter #0:
- Missing nullability on parameter `tag` in method `dumpBuffers`
-MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #0:
- Missing nullability on parameter `tag` in method `dumpByteString`
-MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #1:
- Missing nullability on parameter `prefix` in method `dumpByteString`
-MissingNullability: android.util.proto.EncodedBuffer#dumpByteString(String, String, byte[]) parameter #2:
- Missing nullability on parameter `buf` in method `dumpByteString`
-MissingNullability: android.util.proto.EncodedBuffer#getBytes(int):
- Missing nullability on method `getBytes` return
-MissingNullability: android.util.proto.EncodedBuffer#getDebugString():
- Missing nullability on method `getDebugString` return
-MissingNullability: android.util.proto.EncodedBuffer#writeRawBuffer(byte[]) parameter #0:
- Missing nullability on parameter `val` in method `writeRawBuffer`
-MissingNullability: android.util.proto.EncodedBuffer#writeRawBuffer(byte[], int, int) parameter #0:
- Missing nullability on parameter `val` in method `writeRawBuffer`
-MissingNullability: android.util.proto.ProtoParseException#ProtoParseException(String) parameter #0:
- Missing nullability on parameter `msg` in method `ProtoParseException`
-MissingNullability: android.util.proto.WireTypeMismatchException#WireTypeMismatchException(String) parameter #0:
- Missing nullability on parameter `msg` in method `WireTypeMismatchException`
-MissingNullability: android.view.Choreographer#postCallback(int, Runnable, Object) parameter #1:
- Missing nullability on parameter `action` in method `postCallback`
-MissingNullability: android.view.Choreographer#postCallback(int, Runnable, Object) parameter #2:
- Missing nullability on parameter `token` in method `postCallback`
-MissingNullability: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long) parameter #1:
- Missing nullability on parameter `action` in method `postCallbackDelayed`
-MissingNullability: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long) parameter #2:
- Missing nullability on parameter `token` in method `postCallbackDelayed`
-MissingNullability: android.view.Choreographer#removeCallbacks(int, Runnable, Object) parameter #1:
- Missing nullability on parameter `action` in method `removeCallbacks`
-MissingNullability: android.view.Choreographer#removeCallbacks(int, Runnable, Object) parameter #2:
- Missing nullability on parameter `token` in method `removeCallbacks`
-MissingNullability: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #0:
- Missing nullability on parameter `views` in method `sort`
-MissingNullability: android.view.FocusFinder#sort(android.view.View[], int, int, android.view.ViewGroup, boolean) parameter #3:
- Missing nullability on parameter `root` in method `sort`
-MissingNullability: android.view.KeyEvent#actionToString(int):
- Missing nullability on method `actionToString` return
-MissingNullability: android.view.SurfaceControlViewHost#relayout(android.view.WindowManager.LayoutParams) parameter #0:
- Missing nullability on parameter `attrs` in method `relayout`
-MissingNullability: android.view.View#getTooltipView():
- Missing nullability on method `getTooltipView` return
-MissingNullability: android.view.View#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #0:
- Missing nullability on parameter `background` in method `isDefaultFocusHighlightNeeded`
-MissingNullability: android.view.View#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #1:
- Missing nullability on parameter `foreground` in method `isDefaultFocusHighlightNeeded`
-MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #0:
- Missing nullability on parameter `tree` in method `startRenderingCommandsCapture`
-MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #1:
- Missing nullability on parameter `executor` in method `startRenderingCommandsCapture`
-MissingNullability: android.view.ViewDebug#startRenderingCommandsCapture(android.view.View, java.util.concurrent.Executor, java.util.concurrent.Callable<java.io.OutputStream>) parameter #2:
- Missing nullability on parameter `callback` in method `startRenderingCommandsCapture`
-MissingNullability: android.view.WindowManager#holdLock(android.os.IBinder, int) parameter #0:
- Missing nullability on parameter `token` in method `holdLock`
-MissingNullability: android.view.WindowManager.LayoutParams#accessibilityTitle:
- Missing nullability on field `accessibilityTitle` in class `class android.view.WindowManager.LayoutParams`
-MissingNullability: android.view.accessibility.AccessibilityNodeInfo#writeToParcelNoRecycle(android.os.Parcel, int) parameter #0:
- Missing nullability on parameter `parcel` in method `writeToParcelNoRecycle`
-MissingNullability: android.view.accessibility.AccessibilityWindowInfo#setNumInstancesInUseCounter(java.util.concurrent.atomic.AtomicInteger) parameter #0:
- Missing nullability on parameter `counter` in method `setNumInstancesInUseCounter`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#asyncNewChild(int):
- Missing nullability on method `asyncNewChild` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getAutofillId():
- Missing nullability on method `getAutofillId` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getExtras():
- Missing nullability on method `getExtras` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getHint():
- Missing nullability on method `getHint` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getNode():
- Missing nullability on method `getNode` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getTempRect():
- Missing nullability on method `getTempRect` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#getText():
- Missing nullability on method `getText` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newChild(int):
- Missing nullability on method `newChild` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newHtmlInfoBuilder(String):
- Missing nullability on method `newHtmlInfoBuilder` return
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#newHtmlInfoBuilder(String) parameter #0:
- Missing nullability on parameter `tagName` in method `newHtmlInfoBuilder`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillHints(String[]) parameter #0:
- Missing nullability on parameter `hints` in method `setAutofillHints`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillId(android.view.autofill.AutofillId) parameter #0:
- Missing nullability on parameter `id` in method `setAutofillId`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillId(android.view.autofill.AutofillId, int) parameter #0:
- Missing nullability on parameter `parentId` in method `setAutofillId`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillOptions(CharSequence[]) parameter #0:
- Missing nullability on parameter `options` in method `setAutofillOptions`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setAutofillValue(android.view.autofill.AutofillValue) parameter #0:
- Missing nullability on parameter `value` in method `setAutofillValue`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setClassName(String) parameter #0:
- Missing nullability on parameter `className` in method `setClassName`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setContentDescription(CharSequence) parameter #0:
- Missing nullability on parameter `contentDescription` in method `setContentDescription`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHint(CharSequence) parameter #0:
- Missing nullability on parameter `hint` in method `setHint`
MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHintIdEntry(String) parameter #0:
Missing nullability on parameter `entryName` in method `setHintIdEntry`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setHtmlInfo(android.view.ViewStructure.HtmlInfo) parameter #0:
- Missing nullability on parameter `htmlInfo` in method `setHtmlInfo`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #1:
- Missing nullability on parameter `packageName` in method `setId`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #2:
- Missing nullability on parameter `typeName` in method `setId`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setId(int, String, String, String) parameter #3:
- Missing nullability on parameter `entryName` in method `setId`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setLocaleList(android.os.LocaleList) parameter #0:
- Missing nullability on parameter `localeList` in method `setLocaleList`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setText(CharSequence) parameter #0:
- Missing nullability on parameter `text` in method `setText`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setText(CharSequence, int, int) parameter #0:
- Missing nullability on parameter `text` in method `setText`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTextLines(int[], int[]) parameter #0:
- Missing nullability on parameter `charOffsets` in method `setTextLines`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTextLines(int[], int[]) parameter #1:
- Missing nullability on parameter `baselines` in method `setTextLines`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setTransformation(android.graphics.Matrix) parameter #0:
- Missing nullability on parameter `matrix` in method `setTransformation`
-MissingNullability: android.view.contentcapture.ViewNode.ViewStructureImpl#setWebDomain(String) parameter #0:
- Missing nullability on parameter `domain` in method `setWebDomain`
-MissingNullability: android.widget.CalendarView#getBoundsForDate(long, android.graphics.Rect) parameter #1:
- Missing nullability on parameter `outBounds` in method `getBoundsForDate`
MissingNullability: android.widget.ImageView#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #0:
Missing nullability on parameter `background` in method `isDefaultFocusHighlightNeeded`
MissingNullability: android.widget.ImageView#isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable) parameter #1:
Missing nullability on parameter `foreground` in method `isDefaultFocusHighlightNeeded`
-MissingNullability: android.widget.Magnifier#getMagnifierDefaultSize():
- Missing nullability on method `getMagnifierDefaultSize` return
-MissingNullability: android.widget.Magnifier#setOnOperationCompleteCallback(android.widget.Magnifier.Callback) parameter #0:
- Missing nullability on parameter `callback` in method `setOnOperationCompleteCallback`
-MissingNullability: android.widget.NumberPicker#getDisplayedValueForCurrentSelection():
- Missing nullability on method `getDisplayedValueForCurrentSelection` return
-MissingNullability: android.widget.PopupMenu#getMenuListView():
- Missing nullability on method `getMenuListView` return
-MissingNullability: android.widget.TimePicker#getAmView():
- Missing nullability on method `getAmView` return
-MissingNullability: android.widget.TimePicker#getHourView():
- Missing nullability on method `getHourView` return
-MissingNullability: android.widget.TimePicker#getMinuteView():
- Missing nullability on method `getMinuteView` return
-MissingNullability: android.widget.TimePicker#getPmView():
- Missing nullability on method `getPmView` return
-
-
-MutableBareField: android.content.AutofillOptions#appDisabledExpiration:
- Bare field appDisabledExpiration must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.AutofillOptions#augmentedAutofillEnabled:
- Bare field augmentedAutofillEnabled must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.AutofillOptions#disabledActivities:
- Bare field disabledActivities must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.AutofillOptions#whitelistedActivitiesForAugmentedAutofill:
- Bare field whitelistedActivitiesForAugmentedAutofill must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#convertedFromPreCreated:
- Bare field convertedFromPreCreated must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#creationTime:
- Bare field creationTime must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#flags:
- Bare field flags must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#guestToRemove:
- Bare field guestToRemove must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#iconPath:
- Bare field iconPath must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#id:
- Bare field id must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#lastLoggedInFingerprint:
- Bare field lastLoggedInFingerprint must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#lastLoggedInTime:
- Bare field lastLoggedInTime must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#name:
- Bare field name must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#partial:
- Bare field partial must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#preCreated:
- Bare field preCreated must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#profileBadge:
- Bare field profileBadge must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#profileGroupId:
- Bare field profileGroupId must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#restrictedProfileParentId:
- Bare field restrictedProfileParentId must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#serialNumber:
- Bare field serialNumber must be marked final, or moved behind accessors if mutable
-MutableBareField: android.content.pm.UserInfo#userType:
- Bare field userType must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#cache:
- Bare field cache must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#dbName:
- Bare field dbName must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#dbSize:
- Bare field dbSize must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#lookaside:
- Bare field lookaside must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#pageSize:
- Bare field pageSize must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
- Bare field dbStats must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#largestMemAlloc:
- Bare field largestMemAlloc must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#memoryUsed:
- Bare field memoryUsed must be marked final, or moved behind accessors if mutable
-MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#pageCacheOverflow:
- Bare field pageCacheOverflow must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#broadcastIntentAction:
- Bare field broadcastIntentAction must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#durationMillis:
- Bare field durationMillis must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#numAnimationsRunning:
- Bare field numAnimationsRunning must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#numInstances:
- Bare field numInstances must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#tags:
- Bare field tags must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#violationNumThisLoop:
- Bare field violationNumThisLoop must be marked final, or moved behind accessors if mutable
-MutableBareField: android.os.StrictMode.ViolationInfo#violationUptimeMillis:
- Bare field violationUptimeMillis must be marked final, or moved behind accessors if mutable
-
-
-NoByteOrShort: android.media.audiofx.AudioEffect#byteArrayToShort(byte[]):
- Should avoid odd sized primitives; use `int` instead of `short` in method android.media.audiofx.AudioEffect.byteArrayToShort(byte[])
-NoByteOrShort: android.media.audiofx.AudioEffect#setParameter(int, short) parameter #1:
- Should avoid odd sized primitives; use `int` instead of `short` in parameter value in android.media.audiofx.AudioEffect.setParameter(int param, short value)
-NoByteOrShort: android.media.audiofx.AudioEffect#shortToByteArray(short) parameter #0:
- Should avoid odd sized primitives; use `int` instead of `short` in parameter value in android.media.audiofx.AudioEffect.shortToByteArray(short value)
-NoByteOrShort: android.util.proto.EncodedBuffer#readRawByte():
- Should avoid odd sized primitives; use `int` instead of `byte` in method android.util.proto.EncodedBuffer.readRawByte()
-NoByteOrShort: android.util.proto.EncodedBuffer#writeRawByte(byte) parameter #0:
- Should avoid odd sized primitives; use `int` instead of `byte` in parameter val in android.util.proto.EncodedBuffer.writeRawByte(byte val)
-
-
-NoSettingsProvider: android.provider.Settings.Global#APP_OPS_CONSTANTS:
- New setting keys are not allowed (Field: APP_OPS_CONSTANTS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#AUTOMATIC_POWER_SAVE_MODE:
- New setting keys are not allowed (Field: AUTOMATIC_POWER_SAVE_MODE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#BATTERY_SAVER_CONSTANTS:
- New setting keys are not allowed (Field: BATTERY_SAVER_CONSTANTS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD:
- New setting keys are not allowed (Field: DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#DYNAMIC_POWER_SAVINGS_ENABLED:
- New setting keys are not allowed (Field: DYNAMIC_POWER_SAVINGS_ENABLED); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#HDR_CONVERSION_MODE:
- New setting keys are not allowed (Field: HDR_CONVERSION_MODE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#HDR_FORCE_CONVERSION_TYPE:
- New setting keys are not allowed (Field: HDR_FORCE_CONVERSION_TYPE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#HIDDEN_API_BLACKLIST_EXEMPTIONS:
- New setting keys are not allowed (Field: HIDDEN_API_BLACKLIST_EXEMPTIONS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#HIDDEN_API_POLICY:
- New setting keys are not allowed (Field: HIDDEN_API_POLICY); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#HIDE_ERROR_DIALOGS:
- New setting keys are not allowed (Field: HIDE_ERROR_DIALOGS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#LOW_POWER_MODE:
- New setting keys are not allowed (Field: LOW_POWER_MODE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#LOW_POWER_MODE_STICKY:
- New setting keys are not allowed (Field: LOW_POWER_MODE_STICKY); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Global#OVERLAY_DISPLAY_DEVICES:
- New setting keys are not allowed (Field: OVERLAY_DISPLAY_DEVICES); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED:
- New setting keys are not allowed (Field: ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#ACCESSIBILITY_MAGNIFICATION_CAPABILITY:
- New setting keys are not allowed (Field: ACCESSIBILITY_MAGNIFICATION_CAPABILITY); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#ACCESSIBILITY_MAGNIFICATION_MODE:
- New setting keys are not allowed (Field: ACCESSIBILITY_MAGNIFICATION_MODE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#ACCESSIBILITY_SHORTCUT_TARGET_SERVICE:
- New setting keys are not allowed (Field: ACCESSIBILITY_SHORTCUT_TARGET_SERVICE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#AUTOFILL_SERVICE:
- New setting keys are not allowed (Field: AUTOFILL_SERVICE); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#BIOMETRIC_VIRTUAL_ENABLED:
- New setting keys are not allowed (Field: BIOMETRIC_VIRTUAL_ENABLED); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#CONTENT_CAPTURE_ENABLED:
- New setting keys are not allowed (Field: CONTENT_CAPTURE_ENABLED); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#DISABLED_PRINT_SERVICES:
- New setting keys are not allowed (Field: DISABLED_PRINT_SERVICES); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#ENABLED_VR_LISTENERS:
- New setting keys are not allowed (Field: ENABLED_VR_LISTENERS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#IMMERSIVE_MODE_CONFIRMATIONS:
- New setting keys are not allowed (Field: IMMERSIVE_MODE_CONFIRMATIONS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#NOTIFICATION_BADGING:
- New setting keys are not allowed (Field: NOTIFICATION_BADGING); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#POWER_MENU_LOCKED_SHOW_CONTENT:
- New setting keys are not allowed (Field: POWER_MENU_LOCKED_SHOW_CONTENT); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#SYNC_PARENT_SOUNDS:
- New setting keys are not allowed (Field: SYNC_PARENT_SOUNDS); use getters/setters in relevant manager class
-NoSettingsProvider: android.provider.Settings.Secure#VOICE_INTERACTION_SERVICE:
- New setting keys are not allowed (Field: VOICE_INTERACTION_SERVICE); use getters/setters in relevant manager class
-
-
-OnNameExpected: android.service.notification.ConditionProviderService#isBound():
- If implemented by developer, should follow the on<Something> style; otherwise consider marking final
-OnNameExpected: android.service.watchdog.ExplicitHealthCheckService#setCallback(android.os.RemoteCallback):
- If implemented by developer, should follow the on<Something> style; otherwise consider marking final
-
-
-PackageLayering: android.util.FeatureFlagUtils:
- Method parameter type `android.content.Context` violates package layering: nothing in `package android.util` should depend on `package android.content`
-
-
-ParcelConstructor: android.credentials.ui.ProviderData#ProviderData(android.os.Parcel):
- Parcelable inflation is exposed through CREATOR, not raw constructors, in android.credentials.ui.ProviderData
-ParcelConstructor: android.os.StrictMode.ViolationInfo#ViolationInfo(android.os.Parcel):
- Parcelable inflation is exposed through CREATOR, not raw constructors, in android.os.StrictMode.ViolationInfo
-ParcelConstructor: android.os.health.HealthStatsParceler#HealthStatsParceler(android.os.Parcel):
- Parcelable inflation is exposed through CREATOR, not raw constructors, in android.os.health.HealthStatsParceler
-
-
-ParcelCreator: android.app.WindowConfiguration:
- Parcelable requires a `CREATOR` field; missing in android.app.WindowConfiguration
-ParcelCreator: android.service.autofill.InternalOnClickAction:
- Parcelable requires a `CREATOR` field; missing in android.service.autofill.InternalOnClickAction
-ParcelCreator: android.service.autofill.InternalSanitizer:
- Parcelable requires a `CREATOR` field; missing in android.service.autofill.InternalSanitizer
-ParcelCreator: android.service.autofill.InternalTransformation:
- Parcelable requires a `CREATOR` field; missing in android.service.autofill.InternalTransformation
-ParcelCreator: android.service.autofill.InternalValidator:
- Parcelable requires a `CREATOR` field; missing in android.service.autofill.InternalValidator
-
-
-ParcelNotFinal: android.app.WindowConfiguration:
- Parcelable classes must be final: android.app.WindowConfiguration is not final
-ParcelNotFinal: android.content.pm.UserInfo:
- Parcelable classes must be final: android.content.pm.UserInfo is not final
-ParcelNotFinal: android.os.health.HealthStatsParceler:
- Parcelable classes must be final: android.os.health.HealthStatsParceler is not final
-ParcelNotFinal: android.service.autofill.InternalOnClickAction:
- Parcelable classes must be final: android.service.autofill.InternalOnClickAction is not final
-ParcelNotFinal: android.service.autofill.InternalSanitizer:
- Parcelable classes must be final: android.service.autofill.InternalSanitizer is not final
-ParcelNotFinal: android.service.autofill.InternalTransformation:
- Parcelable classes must be final: android.service.autofill.InternalTransformation is not final
-ParcelNotFinal: android.service.autofill.InternalValidator:
- Parcelable classes must be final: android.service.autofill.InternalValidator is not final
ProtectedMember: android.app.AppDetailsActivity#onCreate(android.os.Bundle):
Protected methods not allowed; must be public: method android.app.AppDetailsActivity.onCreate(android.os.Bundle)}
-ProtectedMember: android.view.View#resetResolvedDrawables():
- Protected methods not allowed; must be public: method android.view.View.resetResolvedDrawables()}
ProtectedMember: android.view.ViewGroup#resetResolvedDrawables():
Protected methods not allowed; must be public: method android.view.ViewGroup.resetResolvedDrawables()}
-RethrowRemoteException: android.app.ActivityManager#resumeAppSwitches():
- Methods calling system APIs should rethrow `RemoteException` as `RuntimeException` (but do not list it in the throws clause)
-
-
SamShouldBeLast: android.animation.ValueAnimator#ofObject(android.animation.TypeEvaluator, java.lang.Object...):
SAM-compatible parameters (such as parameter 1, "evaluator", in android.animation.ValueAnimator.ofObject) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.app.Activity#convertToTranslucent(android.app.Activity.TranslucentConversionListener, android.app.ActivityOptions):
@@ -951,10 +59,6 @@
SAM-compatible parameters (such as parameter 1, "pw", in android.content.pm.PackageItemInfo.dumpFront) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.database.sqlite.SQLiteCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]):
SAM-compatible parameters (such as parameter 1, "factory", in android.database.sqlite.SQLiteCursorDriver.query) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.database.sqlite.SQLiteDebug#dump(android.util.Printer, String[]):
- SAM-compatible parameters (such as parameter 1, "printer", in android.database.sqlite.SQLiteDebug.dump) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.database.sqlite.SQLiteDirectCursorDriver#query(android.database.sqlite.SQLiteDatabase.CursorFactory, String[]):
- SAM-compatible parameters (such as parameter 1, "factory", in android.database.sqlite.SQLiteDirectCursorDriver.query) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.graphics.drawable.AdaptiveIconDrawable#scheduleDrawable(android.graphics.drawable.Drawable, Runnable, long):
SAM-compatible parameters (such as parameter 2, "what", in android.graphics.drawable.AdaptiveIconDrawable.scheduleDrawable) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.graphics.drawable.Drawable#scheduleSelf(Runnable, long):
@@ -983,32 +87,12 @@
SAM-compatible parameters (such as parameter 1, "listener", in android.media.MediaCas.setEventListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.os.Parcel#createFixedArray(Class<T>, java.util.function.Function<android.os.IBinder,S>, int...):
SAM-compatible parameters (such as parameter 2, "asInterface", in android.os.Parcel.createFixedArray) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.os.StrictMode.ViolationInfo#dump(android.util.Printer, String):
- SAM-compatible parameters (such as parameter 1, "pw", in android.os.StrictMode.ViolationInfo.dump) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.permission.PermissionControllerManager#countPermissionApps(java.util.List<java.lang.String>, int, android.permission.PermissionControllerManager.OnCountPermissionAppsResultCallback, android.os.Handler):
- SAM-compatible parameters (such as parameter 3, "callback", in android.permission.PermissionControllerManager.countPermissionApps) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.permission.PermissionControllerManager#getAppPermissions(String, android.permission.PermissionControllerManager.OnGetAppPermissionResultCallback, android.os.Handler):
- SAM-compatible parameters (such as parameter 2, "callback", in android.permission.PermissionControllerManager.getAppPermissions) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.security.KeyChain#choosePrivateKeyAlias(android.app.Activity, android.security.KeyChainAliasCallback, String[], java.security.Principal[], String, int, String):
SAM-compatible parameters (such as parameter 2, "response", in android.security.KeyChain.choosePrivateKeyAlias) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.security.KeyChain#choosePrivateKeyAlias(android.app.Activity, android.security.KeyChainAliasCallback, String[], java.security.Principal[], android.net.Uri, String):
SAM-compatible parameters (such as parameter 2, "response", in android.security.KeyChain.choosePrivateKeyAlias) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.service.autofill.CharSequenceTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- SAM-compatible parameters (such as parameter 1, "finder", in android.service.autofill.CharSequenceTransformation.apply) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.service.autofill.DateTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- SAM-compatible parameters (such as parameter 1, "finder", in android.service.autofill.DateTransformation.apply) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.service.autofill.ImageTransformation#apply(android.service.autofill.ValueFinder, android.widget.RemoteViews, int):
- SAM-compatible parameters (such as parameter 1, "finder", in android.service.autofill.ImageTransformation.apply) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.service.autofill.InternalTransformation#batchApply(android.service.autofill.ValueFinder, android.widget.RemoteViews, java.util.ArrayList<android.util.Pair<java.lang.Integer,android.service.autofill.InternalTransformation>>):
- SAM-compatible parameters (such as parameter 1, "finder", in android.service.autofill.InternalTransformation.batchApply) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.view.Choreographer#postCallback(int, Runnable, Object):
- SAM-compatible parameters (such as parameter 2, "action", in android.view.Choreographer.postCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.view.Choreographer#postCallbackDelayed(int, Runnable, Object, long):
- SAM-compatible parameters (such as parameter 2, "action", in android.view.Choreographer.postCallbackDelayed) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.view.Choreographer#postFrameCallbackDelayed(android.view.Choreographer.FrameCallback, long):
SAM-compatible parameters (such as parameter 1, "callback", in android.view.Choreographer.postFrameCallbackDelayed) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-SamShouldBeLast: android.view.Choreographer#removeCallbacks(int, Runnable, Object):
- SAM-compatible parameters (such as parameter 2, "action", in android.view.Choreographer.removeCallbacks) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.view.View#postDelayed(Runnable, long):
SAM-compatible parameters (such as parameter 1, "action", in android.view.View.postDelayed) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
SamShouldBeLast: android.view.View#postOnAnimationDelayed(Runnable, long):
@@ -1025,20 +109,6 @@
SAM-compatible parameters (such as parameter 1, "pw", in android.view.inputmethod.InputMethodInfo.dump) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
-StaticUtils: android.os.health.HealthKeys:
- Fully-static utility classes must not have constructor
-StaticUtils: android.service.autofill.InternalTransformation:
- Fully-static utility classes must not have constructor
-StaticUtils: android.util.FeatureFlagUtils:
- Fully-static utility classes must not have constructor
-
-
-StreamFiles: android.os.Environment#buildPath(java.io.File, java.lang.String...):
- Methods accepting `File` should also accept `FileDescriptor` or streams: method android.os.Environment.buildPath(java.io.File,java.lang.String...)
-StreamFiles: android.os.FileUtils#contains(java.io.File, java.io.File):
- Methods accepting `File` should also accept `FileDescriptor` or streams: method android.os.FileUtils.contains(java.io.File,java.io.File)
-
-
UnflaggedApi: android.Manifest.permission#MANAGE_REMOTE_AUTH:
New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_REMOTE_AUTH
UnflaggedApi: android.Manifest.permission#START_ACTIVITIES_FROM_SDK_SANDBOX:
@@ -1269,41 +339,3 @@
New API must be flagged with @FlaggedApi: field android.window.WindowInfosListenerForTest.WindowInfo.isVisible
UnflaggedApi: android.window.WindowInfosListenerForTest.WindowInfo#transform:
New API must be flagged with @FlaggedApi: field android.window.WindowInfosListenerForTest.WindowInfo.transform
-
-
-UseIcu: android.hardware.soundtrigger.KeyphraseEnrollmentInfo#getKeyphraseMetadata(String, java.util.Locale) parameter #1:
- Type `java.util.Locale` should be replaced with richer ICU type `android.icu.util.ULocale`
-UseIcu: android.hardware.soundtrigger.KeyphraseEnrollmentInfo#getManageKeyphraseIntent(int, String, java.util.Locale) parameter #2:
- Type `java.util.Locale` should be replaced with richer ICU type `android.icu.util.ULocale`
-UseIcu: android.hardware.soundtrigger.KeyphraseMetadata#supportsLocale(java.util.Locale) parameter #0:
- Type `java.util.Locale` should be replaced with richer ICU type `android.icu.util.ULocale`
-
-
-UserHandle: android.app.admin.DevicePolicyManager#getOwnerInstalledCaCerts(android.os.UserHandle):
- When a method overload is needed to target a specific UserHandle, callers should be directed to use Context.createPackageContextAsUser() and re-obtain the relevant Manager, and no new API should be added
-UserHandle: android.app.usage.StorageStatsManager#queryCratesForPackage(java.util.UUID, String, android.os.UserHandle):
- When a method overload is needed to target a specific UserHandle, callers should be directed to use Context.createPackageContextAsUser() and re-obtain the relevant Manager, and no new API should be added
-UserHandle: android.app.usage.StorageStatsManager#queryCratesForUser(java.util.UUID, android.os.UserHandle):
- When a method overload is needed to target a specific UserHandle, callers should be directed to use Context.createPackageContextAsUser() and re-obtain the relevant Manager, and no new API should be added
-UserHandle: android.content.pm.PackageManager#getInstallReason(String, android.os.UserHandle):
- When a method overload is needed to target a specific UserHandle, callers should be directed to use Context.createPackageContextAsUser() and re-obtain the relevant Manager, and no new API should be added
-
-
-UserHandleName: android.content.AutofillOptions:
- Classes holding a set of parameters should be called `FooParams`, was `AutofillOptions`
-UserHandleName: android.content.ContentCaptureOptions:
- Classes holding a set of parameters should be called `FooParams`, was `ContentCaptureOptions`
-
-
-VisiblySynchronized: PsiThisExpression:
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.content.res.AssetManager.getApkPaths()
-VisiblySynchronized: android.content.res.AssetManager#getApkPaths():
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.content.res.AssetManager.getApkPaths()
-VisiblySynchronized: android.content.res.AssetManager#getLastResourceResolution():
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.content.res.AssetManager.getLastResourceResolution()
-VisiblySynchronized: android.content.res.AssetManager#getOverlayablesToString(String):
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.content.res.AssetManager.getOverlayablesToString(String)
-VisiblySynchronized: android.content.res.AssetManager#setResourceResolutionLoggingEnabled(boolean):
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.content.res.AssetManager.setResourceResolutionLoggingEnabled(boolean)
-VisiblySynchronized: android.os.MessageQueue#removeSyncBarrier(int):
- Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.os.MessageQueue.removeSyncBarrier(int)
diff --git a/core/java/android/content/pm/ServiceInfo.java b/core/java/android/content/pm/ServiceInfo.java
index be8b2a2..65f56f6 100644
--- a/core/java/android/content/pm/ServiceInfo.java
+++ b/core/java/android/content/pm/ServiceInfo.java
@@ -486,7 +486,7 @@
* Here is an example:
* <pre>
* <uses-permission
- * android:name="android.permissions.FOREGROUND_SERVICE_SPECIAL_USE"
+ * android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"
* />
* <service
* android:name=".MySpecialForegroundService"
@@ -506,7 +506,7 @@
* in both platforms.
* <pre>
* <uses-permission
- * android:name="android.permissions.FOREGROUND_SERVICE_SPECIAL_USE"
+ * android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"
* android:maxSdkVersion="last_sdk_version_without_type_foo"
* />
* <service
diff --git a/core/java/android/credentials/CredentialManager.java b/core/java/android/credentials/CredentialManager.java
index 408869e..20771af 100644
--- a/core/java/android/credentials/CredentialManager.java
+++ b/core/java/android/credentials/CredentialManager.java
@@ -131,15 +131,35 @@
@Hide
public void getCandidateCredentials(
@NonNull GetCredentialRequest request,
+ @NonNull String callingPackage,
@Nullable CancellationSignal cancellationSignal,
@CallbackExecutor @NonNull Executor executor,
- @NonNull OutcomeReceiver<GetCredentialResponse, GetCredentialException> callback) {
+ @NonNull OutcomeReceiver<GetCandidateCredentialsResponse,
+ GetCandidateCredentialsException> callback
+ ) {
requireNonNull(request, "request must not be null");
+ requireNonNull(callingPackage, "callingPackage must not be null");
requireNonNull(executor, "executor must not be null");
requireNonNull(callback, "callback must not be null");
if (cancellationSignal != null && cancellationSignal.isCanceled()) {
- Log.w(TAG, "getCredential already canceled");
+ Log.w(TAG, "getCandidateCredentials already canceled");
+ return;
+ }
+
+ ICancellationSignal cancelRemote = null;
+ try {
+ cancelRemote =
+ mService.getCandidateCredentials(
+ request,
+ new GetCandidateCredentialsTransport(executor, callback),
+ mContext.getOpPackageName());
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+
+ if (cancellationSignal != null && cancelRemote != null) {
+ cancellationSignal.setRemote(cancelRemote);
}
}
diff --git a/core/java/android/credentials/GetCandidateCredentialsResponse.java b/core/java/android/credentials/GetCandidateCredentialsResponse.java
index 1d649eb..231e4bc 100644
--- a/core/java/android/credentials/GetCandidateCredentialsResponse.java
+++ b/core/java/android/credentials/GetCandidateCredentialsResponse.java
@@ -17,9 +17,17 @@
package android.credentials;
import android.annotation.Hide;
+import android.annotation.NonNull;
+import android.credentials.ui.GetCredentialProviderData;
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.internal.util.AnnotationValidations;
+import com.android.internal.util.Preconditions;
+
+import java.util.ArrayList;
+import java.util.List;
+
/**
* A list of candidate credentials.
*
@@ -28,11 +36,34 @@
@Hide
public final class GetCandidateCredentialsResponse implements Parcelable {
// TODO(b/299321990): Add members
+
+ @NonNull
+ private final List<GetCredentialProviderData> mCandidateProviderDataList;
+
+ /**
+ * @hide
+ */
+ @Hide
+ public GetCandidateCredentialsResponse(
+ List<GetCredentialProviderData> candidateProviderDataList
+ ) {
+ Preconditions.checkCollectionNotEmpty(
+ candidateProviderDataList,
+ /*valueName=*/ "candidateProviderDataList");
+ mCandidateProviderDataList = new ArrayList<>(candidateProviderDataList);
+ }
+
protected GetCandidateCredentialsResponse(Parcel in) {
+ List<GetCredentialProviderData> candidateProviderDataList = new ArrayList<>();
+ in.readTypedList(candidateProviderDataList, GetCredentialProviderData.CREATOR);
+ mCandidateProviderDataList = candidateProviderDataList;
+
+ AnnotationValidations.validate(NonNull.class, null, mCandidateProviderDataList);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
+ dest.writeTypedList(mCandidateProviderDataList);
}
@Override
@@ -41,7 +72,7 @@
}
public static final Creator<GetCandidateCredentialsResponse> CREATOR =
- new Creator<GetCandidateCredentialsResponse>() {
+ new Creator<>() {
@Override
public GetCandidateCredentialsResponse createFromParcel(Parcel in) {
return new GetCandidateCredentialsResponse(in);
diff --git a/core/java/android/credentials/ICredentialManager.aidl b/core/java/android/credentials/ICredentialManager.aidl
index 42323d6..d081576 100644
--- a/core/java/android/credentials/ICredentialManager.aidl
+++ b/core/java/android/credentials/ICredentialManager.aidl
@@ -47,7 +47,7 @@
@nullable ICancellationSignal executeCreateCredential(in CreateCredentialRequest request, in ICreateCredentialCallback callback, String callingPackage);
- @nullable ICancellationSignal getCandidateCredentials(in GetCandidateCredentialsRequest request, in IGetCandidateCredentialsCallback callback, String callingPackage);
+ @nullable ICancellationSignal getCandidateCredentials(in GetCredentialRequest request, in IGetCandidateCredentialsCallback callback, String callingPackage);
@nullable ICancellationSignal clearCredentialState(in ClearCredentialStateRequest request, in IClearCredentialStateCallback callback, String callingPackage);
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index 7f6ec58..cf47786 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -16,14 +16,12 @@
package android.inputmethodservice;
-import static android.inputmethodservice.SoftInputWindowProto.BOUNDS;
import static android.inputmethodservice.SoftInputWindowProto.WINDOW_STATE;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
import android.app.Dialog;
-import android.graphics.Rect;
import android.os.Debug;
import android.os.IBinder;
import android.util.Log;
@@ -45,7 +43,6 @@
private static final String TAG = "SoftInputWindow";
private final KeyEvent.DispatcherState mDispatcherState;
- private final Rect mBounds = new Rect();
private final InputMethodService mService;
@Retention(SOURCE)
@@ -150,22 +147,6 @@
}
@Override
- public boolean dispatchTouchEvent(MotionEvent ev) {
- getWindow().getDecorView().getHitRect(mBounds);
-
- if (ev.isWithinBoundsNoHistory(mBounds.left, mBounds.top,
- mBounds.right - 1, mBounds.bottom - 1)) {
- return super.dispatchTouchEvent(ev);
- } else {
- MotionEvent temp = ev.clampNoHistory(mBounds.left, mBounds.top,
- mBounds.right - 1, mBounds.bottom - 1);
- boolean handled = super.dispatchTouchEvent(temp);
- temp.recycle();
- return handled;
- }
- }
-
- @Override
public void show() {
switch (mWindowState) {
case WindowState.TOKEN_PENDING:
@@ -273,7 +254,6 @@
void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- mBounds.dumpDebug(proto, BOUNDS);
proto.write(WINDOW_STATE, mWindowState);
proto.end(token);
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 30fd2cf..4d53b2c 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -1584,11 +1584,11 @@
*/
static final int DISABLED = 0x00000020;
- /**
- * Mask for use with setFlags indicating bits used for indicating whether
- * this view is enabled
- * {@hide}
- */
+ /**
+ * Mask for use with setFlags indicating bits used for indicating whether
+ * this view is enabled
+ * {@hide}
+ */
static final int ENABLED_MASK = 0x00000020;
/**
@@ -15251,13 +15251,13 @@
}
}
- /**
- * @see #performAccessibilityAction(int, Bundle)
- *
- * Note: Called from the default {@link AccessibilityDelegate}.
- *
- * @hide
- */
+ /**
+ * @see #performAccessibilityAction(int, Bundle)
+ *
+ * Note: Called from the default {@link AccessibilityDelegate}.
+ *
+ * @hide
+ */
@UnsupportedAppUsage
public boolean performAccessibilityActionInternal(int action, @Nullable Bundle arguments) {
if (isNestedScrollingEnabled()
@@ -17391,7 +17391,7 @@
return attachInfo.mHandler.hasCallbacks(mPendingCheckForLongPress);
}
- /**
+ /**
* Remove the pending click action
*/
@UnsupportedAppUsage
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index f7f3957..5720fc0 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -7412,19 +7412,26 @@
}
target = next;
}
- if (!childIsHit) {
+ if (!childIsHit && mFirstHoverTarget != null) {
target = mFirstHoverTarget;
+ final ArrayList<View> preorderedList = buildTouchDispatchChildList();
while (notEmpty && target != null) {
final HoverTarget next = target.next;
final View hoveredView = target.child;
- rect.set(hoveredView.mLeft, hoveredView.mTop, hoveredView.mRight,
- hoveredView.mBottom);
- matrix.mapRect(rect);
- notEmpty = region.op(Math.round(rect.left), Math.round(rect.top),
- Math.round(rect.right), Math.round(rect.bottom), Region.Op.DIFFERENCE);
+ if (!isOnTop(child, hoveredView, preorderedList)) {
+ rect.set(hoveredView.mLeft, hoveredView.mTop, hoveredView.mRight,
+ hoveredView.mBottom);
+ matrix.mapRect(rect);
+ notEmpty = region.op(Math.round(rect.left), Math.round(rect.top),
+ Math.round(rect.right), Math.round(rect.bottom),
+ Region.Op.DIFFERENCE);
+ }
target = next;
}
+ if (preorderedList != null) {
+ preorderedList.clear();
+ }
}
} else {
TouchTarget target = mFirstTouchTarget;
@@ -7437,19 +7444,26 @@
}
target = next;
}
- if (!childIsHit) {
+ if (!childIsHit && mFirstTouchTarget != null) {
target = mFirstTouchTarget;
+ final ArrayList<View> preorderedList = buildOrderedChildList();
while (notEmpty && target != null) {
final TouchTarget next = target.next;
final View touchedView = target.child;
- rect.set(touchedView.mLeft, touchedView.mTop, touchedView.mRight,
- touchedView.mBottom);
- matrix.mapRect(rect);
- notEmpty = region.op(Math.round(rect.left), Math.round(rect.top),
- Math.round(rect.right), Math.round(rect.bottom), Region.Op.DIFFERENCE);
+ if (!isOnTop(child, touchedView, preorderedList)) {
+ rect.set(touchedView.mLeft, touchedView.mTop, touchedView.mRight,
+ touchedView.mBottom);
+ matrix.mapRect(rect);
+ notEmpty = region.op(Math.round(rect.left), Math.round(rect.top),
+ Math.round(rect.right), Math.round(rect.bottom),
+ Region.Op.DIFFERENCE);
+ }
target = next;
}
+ if (preorderedList != null) {
+ preorderedList.clear();
+ }
}
}
@@ -7459,6 +7473,28 @@
return notEmpty;
}
+ /**
+ * Return true if the given {@code view} is drawn on top of the {@code otherView}.
+ * Both the {@code view} and {@code otherView} must be children of this ViewGroup.
+ * Otherwise, the returned value is meaningless.
+ */
+ private boolean isOnTop(View view, View otherView, ArrayList<View> preorderedList) {
+ final int childrenCount = mChildrenCount;
+ final boolean customOrder = preorderedList == null && isChildrenDrawingOrderEnabled();
+ final View[] children = mChildren;
+ for (int i = childrenCount - 1; i >= 0; i--) {
+ final int childIndex = getAndVerifyPreorderedIndex(childrenCount, i, customOrder);
+ final View child = getAndVerifyPreorderedView(preorderedList, children, childIndex);
+ if (child == view) {
+ return true;
+ }
+ if (child == otherView) {
+ return false;
+ }
+ }
+ // Can't find the view and otherView in the children list. Return value is meaningless.
+ return false;
+ }
private static void applyOpToRegionByBounds(Region region, View view, Region.Op op) {
final int[] locationInWindow = new int[2];
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index aa6d347..ff6165b 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -4017,8 +4017,6 @@
mWindowFocusChanged = false;
hasWindowFocus = mUpcomingWindowFocus;
}
- // TODO (b/131181940): Make sure this doesn't leak Activity with mActivityConfigCallback
- // config changes.
if (hasWindowFocus) {
mInsetsController.onWindowFocusGained(
getFocusedViewOrNull() != null /* hasViewFocused */);
diff --git a/core/java/android/view/inputmethod/flags.aconfig b/core/java/android/view/inputmethod/flags.aconfig
index 92d3408..c144289 100644
--- a/core/java/android/view/inputmethod/flags.aconfig
+++ b/core/java/android/view/inputmethod/flags.aconfig
@@ -2,7 +2,8 @@
flag {
name: "refactor_insets_controller"
- namespace: "inputmethod"
+ namespace: "input_method"
description: "Feature flag for refactoring InsetsController and removing ImeInsetsSourceConsumer"
bug: "298172246"
+ is_fixed_read_only: true
}
\ No newline at end of file
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index ac0e493..a0d0656 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -14151,7 +14151,8 @@
selectionStart, OffsetMapping.MAP_STRATEGY_CURSOR);
final int line = layout.getLineForOffset(offsetTransformed);
final float insertionMarkerX =
- layout.getPrimaryHorizontal(offsetTransformed)
+ layout.getPrimaryHorizontal(
+ offsetTransformed, layout.shouldClampCursor(line))
+ viewportToContentHorizontalOffset;
final float insertionMarkerTop = layout.getLineTop(line)
+ viewportToContentVerticalOffset;
diff --git a/core/java/android/window/StartingWindowInfo.java b/core/java/android/window/StartingWindowInfo.java
index 451acbe..a88e394 100644
--- a/core/java/android/window/StartingWindowInfo.java
+++ b/core/java/android/window/StartingWindowInfo.java
@@ -122,7 +122,7 @@
TYPE_PARAMETER_PROCESS_RUNNING,
TYPE_PARAMETER_ALLOW_TASK_SNAPSHOT,
TYPE_PARAMETER_ACTIVITY_CREATED,
- TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN,
+ TYPE_PARAMETER_ALLOW_ICON,
TYPE_PARAMETER_ALLOW_HANDLE_SOLID_COLOR_SCREEN,
TYPE_PARAMETER_WINDOWLESS,
TYPE_PARAMETER_LEGACY_SPLASH_SCREEN
@@ -143,7 +143,7 @@
/** @hide */
public static final int TYPE_PARAMETER_ACTIVITY_CREATED = 0x00000010;
/** @hide */
- public static final int TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN = 0x00000020;
+ public static final int TYPE_PARAMETER_ALLOW_ICON = 0x00000020;
/**
* The parameter which indicates if the activity has finished drawing.
* @hide
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 9b5a3f7..e014ab0 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -40,6 +40,9 @@
import android.app.ActivityManager;
import android.app.KeyguardManager;
import android.app.SearchManager;
+import android.app.compat.CompatChanges;
+import android.compat.annotation.ChangeId;
+import android.compat.annotation.EnabledSince;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
@@ -123,6 +126,7 @@
import com.android.internal.view.menu.MenuPresenter;
import com.android.internal.view.menu.MenuView;
import com.android.internal.widget.DecorContentParent;
+import com.android.window.flags.Flags;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -162,6 +166,14 @@
private final static int DEFAULT_BACKGROUND_FADE_DURATION_MS = 300;
+ /**
+ * Makes navigation bar color transparent by default if the target SDK is
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM} or above.
+ */
+ @ChangeId
+ @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM)
+ private static final long NAV_BAR_COLOR_DEFAULT_TRANSPARENT = 232195501L;
+
private static final int CUSTOM_TITLE_COMPATIBLE_FEATURES = DEFAULT_FEATURES |
(1 << FEATURE_CUSTOM_TITLE) |
(1 << FEATURE_CONTENT_TRANSITIONS) |
@@ -2525,6 +2537,8 @@
mNavigationBarColor =
navBarColor == navBarDefaultColor
+ && !(CompatChanges.isChangeEnabled(NAV_BAR_COLOR_DEFAULT_TRANSPARENT)
+ && Flags.navBarTransparentByDefault())
&& !context.getResources().getBoolean(
R.bool.config_navBarDefaultTransparent)
? navBarCompatibleColor
diff --git a/core/proto/android/inputmethodservice/softinputwindow.proto b/core/proto/android/inputmethodservice/softinputwindow.proto
index e0ba6bf..32d14f0 100644
--- a/core/proto/android/inputmethodservice/softinputwindow.proto
+++ b/core/proto/android/inputmethodservice/softinputwindow.proto
@@ -27,6 +27,6 @@
reserved 2; // window_type
reserved 3; // gravity
reserved 4; // takes_focus
- optional .android.graphics.RectProto bounds = 5;
+ reserved 5; // bounds
optional int32 window_state = 6;
}
\ No newline at end of file
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d09bf44..2e2ec5b 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2814,7 +2814,7 @@
<!-- Base "handwriting slop" value used by ViewConfiguration as a
movement threshold where stylus handwriting should begin. -->
- <dimen name="config_viewConfigurationHandwritingSlop">4dp</dimen>
+ <dimen name="config_viewConfigurationHandwritingSlop">2dp</dimen>
<!-- Base "hover slop" value used by ViewConfiguration as a
movement threshold under which hover is considered "stationary". -->
@@ -5451,6 +5451,10 @@
to enroll the other eligible biometric. -->
<fraction name="config_biometricNotificationFrrThreshold">25%</fraction>
+ <!-- Whether to enable the biometric notification for dual-modality device that enrolled a
+ single biometric and experiences high FRR. -->
+ <bool name="config_biometricFrrNotificationEnabled">false</bool>
+
<!-- The component name for the default profile supervisor, which can be set as a profile owner
even after user setup is complete. The defined component should be used for supervision purposes
only. The component must be part of a system app. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 7f1a6f9..fe11449 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2604,6 +2604,7 @@
<!-- Biometric FRR config -->
<java-symbol type="fraction" name="config_biometricNotificationFrrThreshold" />
+ <java-symbol type="bool" name="config_biometricFrrNotificationEnabled" />
<!-- Biometric FRR notification messages -->
<java-symbol type="string" name="device_unlock_notification_name" />
diff --git a/core/tests/coretests/src/android/view/ViewGroupGetChildLocalHitRegionTest.java b/core/tests/coretests/src/android/view/ViewGroupGetChildLocalHitRegionTest.java
index 60a0a2a..c210fd6 100644
--- a/core/tests/coretests/src/android/view/ViewGroupGetChildLocalHitRegionTest.java
+++ b/core/tests/coretests/src/android/view/ViewGroupGetChildLocalHitRegionTest.java
@@ -90,22 +90,73 @@
assertGetChildLocalHitRegionEmpty(R.id.view_cover_top, R.id.view_cover_bottom);
}
+ @Test
+ public void testGetChildLocalHitRegion_topViewIsNotBlockedByBottomView() {
+ // In this case, two views overlap with each other and the MotionEvent is injected to the
+ // bottom view. It verifies that the hit region of the top view won't be blocked by the
+ // bottom view.
+ testGetChildLocalHitRegion_topViewIsNotBlockedByBottomView(/* isHover= */ true);
+ testGetChildLocalHitRegion_topViewIsNotBlockedByBottomView(/* isHover= */ false);
+ }
+
+ private void testGetChildLocalHitRegion_topViewIsNotBlockedByBottomView(boolean isHover) {
+ // In this case, two views overlap with each other and the MotionEvent is injected to the
+ // bottom view. It verifies that the hit region of the top view won't be blocked by the
+ // bottom view.
+ mScenarioRule.getScenario().onActivity(activity -> {
+ View viewTop = activity.findViewById(R.id.view_overlap_top);
+ View viewBottom = activity.findViewById(R.id.view_overlap_bottom);
+
+ // The viewTop covers the left side of the viewBottom. To avoid the MotionEvent gets
+ // blocked by viewTop, we inject MotionEvents into viewBottom's right bottom corner.
+ float x = viewBottom.getWidth() - 1;
+ float y = viewBottom.getHeight() - 1;
+ injectMotionEvent(viewBottom, x, y, isHover);
+
+ Matrix actualMatrix = new Matrix();
+ Region actualRegion = new Region(0, 0, viewTop.getWidth(), viewTop.getHeight());
+ boolean actualNotEmpty = viewTop.getParent()
+ .getChildLocalHitRegion(viewTop, actualRegion, actualMatrix, isHover);
+
+ int[] windowLocation = new int[2];
+ viewTop.getLocationInWindow(windowLocation);
+ Matrix expectMatrix = new Matrix();
+ expectMatrix.preTranslate(-windowLocation[0], -windowLocation[1]);
+ // Though viewTop and viewBottom overlaps, viewTop's hit region won't be blocked by
+ // viewBottom.
+ Region expectRegion = new Region(0, 0, viewTop.getWidth(), viewTop.getHeight());
+
+ assertThat(actualNotEmpty).isTrue();
+ assertThat(actualMatrix).isEqualTo(expectMatrix);
+ assertThat(actualRegion).isEqualTo(expectRegion);
+ });
+ }
+
private void injectMotionEvent(View view, boolean isHover) {
+ float x = view.getWidth() / 2f;
+ float y = view.getHeight() / 2f;
+ injectMotionEvent(view, x, y, isHover);
+ }
+
+ /**
+ * Inject MotionEvent into the given view, at the given location specified in the view's
+ * coordinates.
+ */
+ private void injectMotionEvent(View view, float x, float y, boolean isHover) {
int[] location = new int[2];
view.getLocationInWindow(location);
- float x = location[0] + view.getWidth() / 2f;
- float y = location[1] + view.getHeight() / 2f;
+ float globalX = location[0] + x;
+ float globalY = location[1] + y;
int action = isHover ? MotionEvent.ACTION_HOVER_ENTER : MotionEvent.ACTION_DOWN;
MotionEvent motionEvent = MotionEvent.obtain(/* downtime= */ 0, /* eventTime= */ 0, action,
- x, y, /* pressure= */ 0, /* size= */ 0, /* metaState= */ 0,
+ globalX, globalY, /* pressure= */ 0, /* size= */ 0, /* metaState= */ 0,
/* xPrecision= */ 1, /* yPrecision= */ 1, /* deviceId= */0, /* edgeFlags= */0);
View rootView = view.getRootView();
rootView.dispatchPointerEvent(motionEvent);
}
-
private void assertGetChildLocalHitRegion(int viewId) {
assertGetChildLocalHitRegion(viewId, /* isHover= */ true);
assertGetChildLocalHitRegion(viewId, /* isHover= */ false);
diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml
index d93e9ba..7638132 100644
--- a/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml
+++ b/libs/WindowManager/Shell/res/layout/desktop_mode_focused_window_decor.xml
@@ -26,8 +26,8 @@
<ImageButton
android:id="@+id/caption_handle"
android:layout_width="128dp"
- android:layout_height="42dp"
- android:paddingVertical="19dp"
+ android:layout_height="@dimen/desktop_mode_fullscreen_decor_caption_height"
+ android:paddingVertical="16dp"
android:contentDescription="@string/handle_text"
android:src="@drawable/decor_handle_dark"
tools:tint="@color/desktop_mode_caption_handle_bar_dark"
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index cba86c8..7faf380 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -401,6 +401,12 @@
<!-- Height of button (32dp) + 2 * margin (5dp each). -->
<dimen name="freeform_decor_caption_height">42dp</dimen>
+ <!-- Height of desktop mode caption for freeform tasks. -->
+ <dimen name="desktop_mode_freeform_decor_caption_height">42dp</dimen>
+
+ <!-- Height of desktop mode caption for fullscreen tasks. -->
+ <dimen name="desktop_mode_fullscreen_decor_caption_height">36dp</dimen>
+
<!-- The width of the maximize menu in desktop mode. -->
<dimen name="desktop_mode_maximize_menu_width">287dp</dimen>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index 0e617ac..ead2f9c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -596,9 +596,7 @@
final TransitionUtil.LeafTaskFilter leafTaskFilter =
new TransitionUtil.LeafTaskFilter();
boolean hasTaskChange = false;
- // Walk backwards so that higher z-order changes are recorded *last* in the assorted
- // task lists. This way, when the are added, the on-top tasks are drawn on top.
- for (int i = info.getChanges().size() - 1; i >= 0; --i) {
+ for (int i = 0; i < info.getChanges().size(); ++i) {
final TransitionInfo.Change change = info.getChanges().get(i);
final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
if (taskInfo != null
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
index 72fc8686..6ea6516 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/phone/PhoneStartingWindowTypeAlgorithm.java
@@ -30,7 +30,7 @@
import static android.window.StartingWindowInfo.TYPE_PARAMETER_NEW_TASK;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_PROCESS_RUNNING;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_TASK_SWITCH;
-import static android.window.StartingWindowInfo.TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN;
+import static android.window.StartingWindowInfo.TYPE_PARAMETER_ALLOW_ICON;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_WINDOWLESS;
import android.window.StartingWindowInfo;
@@ -52,8 +52,7 @@
final boolean processRunning = (parameter & TYPE_PARAMETER_PROCESS_RUNNING) != 0;
final boolean allowTaskSnapshot = (parameter & TYPE_PARAMETER_ALLOW_TASK_SNAPSHOT) != 0;
final boolean activityCreated = (parameter & TYPE_PARAMETER_ACTIVITY_CREATED) != 0;
- final boolean isSolidColorSplashScreen =
- (parameter & TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN) != 0;
+ final boolean allowIcon = (parameter & TYPE_PARAMETER_ALLOW_ICON) != 0;
final boolean legacySplashScreen =
((parameter & TYPE_PARAMETER_LEGACY_SPLASH_SCREEN) != 0);
final boolean activityDrawn = (parameter & TYPE_PARAMETER_ACTIVITY_DRAWN) != 0;
@@ -67,13 +66,13 @@
+ "processRunning=%b, "
+ "allowTaskSnapshot=%b, "
+ "activityCreated=%b, "
- + "isSolidColorSplashScreen=%b, "
+ + "allowIcon=%b, "
+ "legacySplashScreen=%b, "
+ "activityDrawn=%b, "
+ "windowless=%b, "
+ "topIsHome=%b",
newTask, taskSwitch, processRunning, allowTaskSnapshot, activityCreated,
- isSolidColorSplashScreen, legacySplashScreen, activityDrawn, windowlessSurface,
+ allowIcon, legacySplashScreen, activityDrawn, windowlessSurface,
topIsHome);
if (windowlessSurface) {
@@ -81,7 +80,7 @@
}
if (!topIsHome) {
if (!processRunning || newTask || (taskSwitch && !activityCreated)) {
- return getSplashscreenType(isSolidColorSplashScreen, legacySplashScreen);
+ return getSplashscreenType(allowIcon, legacySplashScreen);
}
}
@@ -95,18 +94,18 @@
}
}
if (!activityDrawn && !topIsHome) {
- return getSplashscreenType(isSolidColorSplashScreen, legacySplashScreen);
+ return getSplashscreenType(allowIcon, legacySplashScreen);
}
}
return STARTING_WINDOW_TYPE_NONE;
}
- private static int getSplashscreenType(boolean solidColorSplashScreen,
- boolean legacySplashScreen) {
- return solidColorSplashScreen
- ? STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN
- : legacySplashScreen
- ? STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN
+ private static int getSplashscreenType(boolean allowIcon, boolean legacySplashScreen) {
+ if (allowIcon) {
+ return legacySplashScreen ? STARTING_WINDOW_TYPE_LEGACY_SPLASH_SCREEN
: STARTING_WINDOW_TYPE_SPLASH_SCREEN;
+ } else {
+ return STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN;
+ }
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
index c189731..82fc0f4 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
@@ -18,6 +18,7 @@
import android.app.ActivityManager.RunningTaskInfo;
import android.app.WindowConfiguration;
+import android.app.WindowConfiguration.WindowingMode;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
@@ -114,7 +115,7 @@
mRelayoutParams.reset();
mRelayoutParams.mRunningTaskInfo = taskInfo;
mRelayoutParams.mLayoutResId = R.layout.caption_window_decor;
- mRelayoutParams.mCaptionHeightId = getCaptionHeightId();
+ mRelayoutParams.mCaptionHeightId = getCaptionHeightId(taskInfo.getWindowingMode());
mRelayoutParams.mShadowRadiusId = shadowRadiusID;
mRelayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw;
@@ -227,7 +228,7 @@
}
@Override
- int getCaptionHeightId() {
+ int getCaptionHeightId(@WindowingMode int windowingMode) {
return R.dimen.freeform_decor_caption_height;
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index 949ee81..afa2754 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -125,7 +125,8 @@
private MoveToDesktopAnimator mMoveToDesktopAnimator;
private final Rect mDragToDesktopAnimationStartBounds = new Rect();
- private final DesktopModeKeyguardChangeListener mDesktopModeKeyguardChangeListener;
+ private final DesktopModeKeyguardChangeListener mDesktopModeKeyguardChangeListener =
+ new DesktopModeKeyguardChangeListener();
private final RootTaskDisplayAreaOrganizer mRootTaskDisplayAreaOrganizer;
public DesktopModeWindowDecorViewModel(
@@ -157,7 +158,6 @@
new DesktopModeWindowDecoration.Factory(),
new InputMonitorFactory(),
SurfaceControl.Transaction::new,
- new DesktopModeKeyguardChangeListener(),
rootTaskDisplayAreaOrganizer);
}
@@ -177,7 +177,6 @@
DesktopModeWindowDecoration.Factory desktopModeWindowDecorFactory,
InputMonitorFactory inputMonitorFactory,
Supplier<SurfaceControl.Transaction> transactionFactory,
- DesktopModeKeyguardChangeListener desktopModeKeyguardChangeListener,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer) {
mContext = context;
mMainHandler = mainHandler;
@@ -194,7 +193,6 @@
mDesktopModeWindowDecorFactory = desktopModeWindowDecorFactory;
mInputMonitorFactory = inputMonitorFactory;
mTransactionFactory = transactionFactory;
- mDesktopModeKeyguardChangeListener = desktopModeKeyguardChangeListener;
mRootTaskDisplayAreaOrganizer = rootTaskDisplayAreaOrganizer;
shellInit.addInitCallback(this::onInit, this);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index 0cacdfc..84ec6b3 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -17,8 +17,10 @@
package com.android.wm.shell.windowdecor;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import android.app.ActivityManager;
+import android.app.WindowConfiguration.WindowingMode;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
@@ -56,6 +58,7 @@
import java.util.HashSet;
import java.util.Set;
+import java.util.function.Supplier;
/**
* Defines visuals and behaviors of a window decoration of a caption bar and shadows. It works with
@@ -109,7 +112,30 @@
Choreographer choreographer,
SyncTransactionQueue syncQueue,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer) {
- super(context, displayController, taskOrganizer, taskInfo, taskSurface, windowDecorConfig);
+ this (context, displayController, taskOrganizer, taskInfo, taskSurface, windowDecorConfig,
+ handler, choreographer, syncQueue, rootTaskDisplayAreaOrganizer,
+ SurfaceControl.Builder::new, SurfaceControl.Transaction::new,
+ WindowContainerTransaction::new, new SurfaceControlViewHostFactory() {});
+ }
+
+ DesktopModeWindowDecoration(
+ Context context,
+ DisplayController displayController,
+ ShellTaskOrganizer taskOrganizer,
+ ActivityManager.RunningTaskInfo taskInfo,
+ SurfaceControl taskSurface,
+ Configuration windowDecorConfig,
+ Handler handler,
+ Choreographer choreographer,
+ SyncTransactionQueue syncQueue,
+ RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
+ Supplier<SurfaceControl.Builder> surfaceControlBuilderSupplier,
+ Supplier<SurfaceControl.Transaction> surfaceControlTransactionSupplier,
+ Supplier<WindowContainerTransaction> windowContainerTransactionSupplier,
+ SurfaceControlViewHostFactory surfaceControlViewHostFactory) {
+ super(context, displayController, taskOrganizer, taskInfo, taskSurface, windowDecorConfig,
+ surfaceControlBuilderSupplier, surfaceControlTransactionSupplier,
+ windowContainerTransactionSupplier, surfaceControlViewHostFactory);
mHandler = handler;
mChoreographer = choreographer;
@@ -150,7 +176,7 @@
return;
}
- final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ final SurfaceControl.Transaction t = mSurfaceControlTransactionSupplier.get();
// Use |applyStartTransactionOnDraw| so that the transaction (that applies task crop) is
// synced with the buffer transaction (that draws the View). Both will be shown on screen
// at the same, whereas applying them independently causes flickering. See b/270202228.
@@ -180,7 +206,7 @@
mRelayoutParams.reset();
mRelayoutParams.mRunningTaskInfo = taskInfo;
mRelayoutParams.mLayoutResId = windowDecorLayoutId;
- mRelayoutParams.mCaptionHeightId = getCaptionHeightId();
+ mRelayoutParams.mCaptionHeightId = getCaptionHeightId(taskInfo.getWindowingMode());
mRelayoutParams.mShadowRadiusId = shadowRadiusID;
mRelayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw;
// The configuration used to lay out the window decoration. The system context's config is
@@ -296,7 +322,7 @@
final int displayWidth = displayLayout.width();
final int displayHeight = displayLayout.height();
- final int captionHeight = getCaptionHeight();
+ final int captionHeight = getCaptionHeight(mTaskInfo.getWindowingMode());
final ImageButton maximizeWindowButton =
mResult.mRootView.findViewById(R.id.maximize_window);
@@ -452,6 +478,7 @@
@Override
void releaseViews() {
closeHandleMenu();
+ closeMaximizeMenu();
super.releaseViews();
}
@@ -555,7 +582,7 @@
super.close();
}
- private int getDesktopModeWindowDecorLayoutId(int windowingMode) {
+ private int getDesktopModeWindowDecorLayoutId(@WindowingMode int windowingMode) {
return windowingMode == WINDOWING_MODE_FREEFORM
? R.layout.desktop_mode_app_controls_window_decor
: R.layout.desktop_mode_focused_window_decor;
@@ -584,7 +611,7 @@
exclusionRegion = new Region();
}
exclusionRegion.union(new Rect(0, 0, mResult.mWidth,
- getCaptionHeight()));
+ getCaptionHeight(mTaskInfo.getWindowingMode())));
exclusionRegion.translate(mPositionInParent.x, mPositionInParent.y);
return exclusionRegion;
}
@@ -600,12 +627,14 @@
}
@Override
- int getCaptionHeightId() {
- return R.dimen.freeform_decor_caption_height;
+ int getCaptionHeightId(@WindowingMode int windowingMode) {
+ return windowingMode == WINDOWING_MODE_FULLSCREEN
+ ? R.dimen.desktop_mode_fullscreen_decor_caption_height
+ : R.dimen.desktop_mode_freeform_decor_caption_height;
}
- private int getCaptionHeight() {
- return loadDimensionPixelSize(mContext.getResources(), getCaptionHeightId());
+ private int getCaptionHeight(@WindowingMode int windowingMode) {
+ return loadDimensionPixelSize(mContext.getResources(), getCaptionHeightId(windowingMode));
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
index 2d5ef72..3c853f1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
@@ -20,6 +20,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import android.app.ActivityManager.RunningTaskInfo;
+import android.app.WindowConfiguration.WindowingMode;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -337,7 +338,7 @@
}
}
- int getCaptionHeightId() {
+ int getCaptionHeightId(@WindowingMode int windowingMode) {
return Resources.ID_NULL;
}
@@ -459,7 +460,7 @@
* Adds caption inset source to a WCT
*/
public void addCaptionInset(WindowContainerTransaction wct) {
- final int captionHeightId = getCaptionHeightId();
+ final int captionHeightId = getCaptionHeightId(mTaskInfo.getWindowingMode());
if (!ViewRootImpl.CAPTION_ON_SHELL || captionHeightId == Resources.ID_NULL) {
return;
}
diff --git a/libs/WindowManager/Shell/tests/flicker/Android.bp b/libs/WindowManager/Shell/tests/flicker/Android.bp
index 6fd3354..0058d11 100644
--- a/libs/WindowManager/Shell/tests/flicker/Android.bp
+++ b/libs/WindowManager/Shell/tests/flicker/Android.bp
@@ -119,6 +119,20 @@
],
}
+java_library {
+ name: "wm-shell-flicker-platinum-tests",
+ platform_apis: true,
+ optimize: {
+ enabled: false,
+ },
+ srcs: [
+ ":WMShellFlickerServicePlatinumTests-src",
+ ],
+ static_libs: [
+ "wm-shell-flicker-utils",
+ ],
+}
+
java_defaults {
name: "WMShellFlickerTestsDefault",
manifest: "manifests/AndroidManifest.xml",
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
index b86c98e..03c438f 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
@@ -23,6 +23,7 @@
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import android.tools.common.flicker.subject.region.RegionTraceSubject
import android.tools.device.helpers.WindowUtils
import android.tools.device.traces.parsers.toFlickerComponent
import androidx.test.filters.RequiresDevice
@@ -128,9 +129,20 @@
if (tapl.isTablet) {
flicker.assertWmVisibleRegion(pipApp) { coversAtMost(displayBounds) }
} else {
- // on phones home does not rotate in landscape, PiP enters back to portrait
- // orientation so use display bounds from that orientation for assertion
- flicker.assertWmVisibleRegion(pipApp) { coversAtMost(portraitDisplayBounds) }
+ // on phones home screen does not rotate in landscape, PiP enters back to portrait
+ // orientation - if we go from landscape to portrait it should switch between the bounds
+ // otherwise it should be the same as tablet (i.e. portrait to portrait)
+ if (flicker.scenario.isLandscapeOrSeascapeAtStart) {
+ flicker.assertWmVisibleRegion(pipApp) {
+ // first check against landscape bounds then against portrait bounds
+ (coversAtMost(displayBounds).then() as RegionTraceSubject).coversAtMost(
+ portraitDisplayBounds
+ )
+ }
+ } else {
+ // always check against the display bounds which do not change during transition
+ flicker.assertWmVisibleRegion(pipApp) { coversAtMost(displayBounds) }
+ }
}
}
@@ -139,7 +151,6 @@
@JvmStatic
fun getParams() =
LegacyFlickerTestFactory.nonRotationTests(
- supportedRotations = listOf(Rotation.ROTATION_0),
// TODO(b/176061063):The 3 buttons of nav bar do not exist in the hierarchy.
supportedNavigationModes = listOf(NavBar.MODE_GESTURAL)
)
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
index aa35237..a8f4d0a 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
@@ -31,7 +31,7 @@
class DismissSplitScreenByGoHomeGesturalNavLandscape :
DismissSplitScreenByGoHome(Rotation.ROTATION_90) {
- @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
+ @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) // SPLIT_SCREEN_EXIT not yet tagged here (b/301222449)
@Test
override fun dismissSplitScreenByGoHome() = super.dismissSplitScreenByGoHome()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
index e195360..cee9bbf 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
@@ -31,7 +31,7 @@
class DismissSplitScreenByGoHomeGesturalNavPortrait :
DismissSplitScreenByGoHome(Rotation.ROTATION_0) {
- @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
+ @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) // SPLIT_SCREEN_EXIT not yet tagged here (b/301222449)
@Test
override fun dismissSplitScreenByGoHome() = super.dismissSplitScreenByGoHome()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
index 5f771c7..169b5cf 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
@@ -31,7 +31,7 @@
class EnterSplitScreenByDragFromAllAppsGesturalNavLandscape :
EnterSplitScreenByDragFromAllApps(Rotation.ROTATION_90) {
- @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
+ @ExpectedScenarios(["ENTIRE_TRACE"]) // missing SPLIT_SCREEN_ENTER tag (b/301093332)
@Test
override fun enterSplitScreenByDragFromAllApps() = super.enterSplitScreenByDragFromAllApps()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
index 729a401..412c011 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
@@ -31,7 +31,7 @@
class EnterSplitScreenByDragFromAllAppsGesturalNavPortrait :
EnterSplitScreenByDragFromAllApps(Rotation.ROTATION_0) {
- @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
+ @ExpectedScenarios(["ENTIRE_TRACE"]) // missing SPLIT_SCREEN_ENTER tag (b/301093332)
@Test
override fun enterSplitScreenByDragFromAllApps() = super.enterSplitScreenByDragFromAllApps()
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavLandscape.kt
index e37d806..b444bad 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavLandscape.kt
@@ -19,10 +19,15 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.CopyContentInSplit
+import org.junit.Rule
import org.junit.Test
open class CopyContentInSplitGesturalNavLandscape : CopyContentInSplit(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavPortrait.kt
index 2a50912..e2ab989 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/CopyContentInSplitGesturalNavPortrait.kt
@@ -19,10 +19,15 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.CopyContentInSplit
+import org.junit.Rule
import org.junit.Test
open class CopyContentInSplitGesturalNavPortrait : CopyContentInSplit(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavLandscape.kt
index d5da1a8..22b8102 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DismissSplitScreenByDivider
+import org.junit.Rule
import org.junit.Test
open class DismissSplitScreenByDividerGesturalNavLandscape :
DismissSplitScreenByDivider(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavPortrait.kt
index 7fdcb9b..3fb014f 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByDividerGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DismissSplitScreenByDivider
+import org.junit.Rule
import org.junit.Test
open class DismissSplitScreenByDividerGesturalNavPortrait :
DismissSplitScreenByDivider(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
index 308e954..ea1f942 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DismissSplitScreenByGoHome
+import org.junit.Rule
import org.junit.Test
open class DismissSplitScreenByGoHomeGesturalNavLandscape :
DismissSplitScreenByGoHome(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
index 39e75bd..8f23a79 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DismissSplitScreenByGoHomeGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DismissSplitScreenByGoHome
+import org.junit.Rule
import org.junit.Test
open class DismissSplitScreenByGoHomeGesturalNavPortrait :
DismissSplitScreenByGoHome(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavLandscape.kt
index e18da17..b0f39e5 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavLandscape.kt
@@ -19,10 +19,15 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DragDividerToResize
+import org.junit.Rule
import org.junit.Test
open class DragDividerToResizeGesturalNavLandscape : DragDividerToResize(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavPortrait.kt
index 00d60e7..6ce8746 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/DragDividerToResizeGesturalNavPortrait.kt
@@ -19,10 +19,15 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.DragDividerToResize
+import org.junit.Rule
import org.junit.Test
open class DragDividerToResizeGesturalNavPortrait : DragDividerToResize(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
index d7efbc8..9f74edf 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromAllApps
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromAllAppsGesturalNavLandscape :
EnterSplitScreenByDragFromAllApps(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
index 4eece3f..1e4055e 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromAllAppsGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromAllApps
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromAllAppsGesturalNavPortrait :
EnterSplitScreenByDragFromAllApps(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavLandscape.kt
index d96b056..c3b8132 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromNotification
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromNotificationGesturalNavLandscape :
EnterSplitScreenByDragFromNotification(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavPortrait.kt
index 809b690..7756d04 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromNotificationGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromNotification
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromNotificationGesturalNavPortrait :
EnterSplitScreenByDragFromNotification(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavLandscape.kt
index bbdf2d7..c72aa5a 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromShortcut
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromShortcutGesturalNavLandscape :
EnterSplitScreenByDragFromShortcut(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavPortrait.kt
index 5c29fd8..cc88f27 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromShortcutGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromShortcut
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromShortcutGesturalNavPortrait :
EnterSplitScreenByDragFromShortcut(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavLandscape.kt
index a7398eb..87b38b1 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromTaskbar
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromTaskbarGesturalNavLandscape :
EnterSplitScreenByDragFromTaskbar(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavPortrait.kt
index eae88ad..ca347ed 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenByDragFromTaskbarGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenByDragFromTaskbar
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenByDragFromTaskbarGesturalNavPortrait :
EnterSplitScreenByDragFromTaskbar(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavLandscape.kt
index 7e8ee04..6597819 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenFromOverview
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenFromOverviewGesturalNavLandscape :
EnterSplitScreenFromOverview(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavPortrait.kt
index 9295c33..6df31fc 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/EnterSplitScreenFromOverviewGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.EnterSplitScreenFromOverview
+import org.junit.Rule
import org.junit.Test
open class EnterSplitScreenFromOverviewGesturalNavPortrait :
EnterSplitScreenFromOverview(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavLandscape.kt
index 4b59e9f..02596c5 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchAppByDoubleTapDivider
+import org.junit.Rule
import org.junit.Test
open class SwitchAppByDoubleTapDividerGesturalNavLandscape :
SwitchAppByDoubleTapDivider(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavPortrait.kt
index 5ff36d4..9d579f6 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchAppByDoubleTapDividerGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchAppByDoubleTapDivider
+import org.junit.Rule
import org.junit.Test
open class SwitchAppByDoubleTapDividerGesturalNavPortrait :
SwitchAppByDoubleTapDivider(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavLandscape.kt
index c0cb721..da85342 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromAnotherApp
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromAnotherAppGesturalNavLandscape :
SwitchBackToSplitFromAnotherApp(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavPortrait.kt
index 8c14088..1ae2c9e 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromAnotherAppGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromAnotherApp
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromAnotherAppGesturalNavPortrait :
SwitchBackToSplitFromAnotherApp(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavLandscape.kt
index 7b6614b..b1b56257 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromHome
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromHomeGesturalNavLandscape :
SwitchBackToSplitFromHome(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavPortrait.kt
index 5df5be9..08c437e 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromHomeGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromHome
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromHomeGesturalNavPortrait :
SwitchBackToSplitFromHome(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
index 9d63003..efbf86d 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromRecent
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromRecentGesturalNavLandscape :
SwitchBackToSplitFromRecent(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
index 9fa04b2..f7072fa 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBackToSplitFromRecent
+import org.junit.Rule
import org.junit.Test
open class SwitchBackToSplitFromRecentGesturalNavPortrait :
SwitchBackToSplitFromRecent(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavLandscape.kt
index 9386aa2..d80d112 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavLandscape.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBetweenSplitPairs
+import org.junit.Rule
import org.junit.Test
open class SwitchBetweenSplitPairsGesturalNavLandscape :
SwitchBetweenSplitPairs(Rotation.ROTATION_90) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavPortrait.kt
index 5ef2167..30ec37a 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/SwitchBetweenSplitPairsGesturalNavPortrait.kt
@@ -19,11 +19,16 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.SwitchBetweenSplitPairs
+import org.junit.Rule
import org.junit.Test
open class SwitchBetweenSplitPairsGesturalNavPortrait :
SwitchBetweenSplitPairs(Rotation.ROTATION_0) {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
index 9caab9b..1e086d2 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
@@ -18,13 +18,18 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.UnlockKeyguardToSplitScreen
+import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.BlockJUnit4ClassRunner
@RunWith(BlockJUnit4ClassRunner::class)
open class UnlockKeyguardToSplitScreenGesturalNavLandscape : UnlockKeyguardToSplitScreen() {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
index bf484e5..932f892 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/platinum/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
@@ -18,13 +18,18 @@
import android.platform.test.annotations.PlatinumTest
import android.platform.test.annotations.Presubmit
+import android.tools.device.flicker.rules.FlickerServiceRule
import com.android.wm.shell.flicker.service.splitscreen.scenarios.UnlockKeyguardToSplitScreen
+import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.BlockJUnit4ClassRunner
@RunWith(BlockJUnit4ClassRunner::class)
open class UnlockKeyguardToSplitScreenGesturalNavPortrait : UnlockKeyguardToSplitScreen() {
+ @get:Rule
+ val flickerServiceRule = FlickerServiceRule(enabled = true, failTestOnFaasFailure = false)
+
@PlatinumTest(focusArea = "sysui")
@Presubmit
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
index c433b21..d7b306c 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
@@ -19,6 +19,7 @@
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -49,11 +50,13 @@
fun setup() {
Assume.assumeTrue(tapl.isTablet)
+ tapl.goHome()
+
+ primaryApp.launchViaIntent(wmHelper)
+ ChangeDisplayOrientationRule.setRotation(rotation)
+
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
-
- tapl.goHome()
- primaryApp.launchViaIntent(wmHelper)
}
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromNotification.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromNotification.kt
index 3f087a5..cc982d1 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromNotification.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromNotification.kt
@@ -19,6 +19,7 @@
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -50,14 +51,16 @@
fun setup() {
Assume.assumeTrue(tapl.isTablet)
- tapl.setEnableRotation(true)
- tapl.setExpectedRotation(rotation.value)
-
// Send a notification
sendNotificationApp.launchViaIntent(wmHelper)
sendNotificationApp.postNotification(wmHelper)
tapl.goHome()
+
+ tapl.setEnableRotation(true)
+ tapl.setExpectedRotation(rotation.value)
+
primaryApp.launchViaIntent(wmHelper)
+ ChangeDisplayOrientationRule.setRotation(rotation)
}
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
index 767e7b5..fa12bb8 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
@@ -19,6 +19,7 @@
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
+import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -49,12 +50,13 @@
fun setup() {
Assume.assumeTrue(tapl.isTablet)
- tapl.setEnableRotation(true)
- tapl.setExpectedRotation(rotation.value)
-
tapl.goHome()
SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, secondaryApp.appName)
primaryApp.launchViaIntent(wmHelper)
+ ChangeDisplayOrientationRule.setRotation(rotation)
+
+ tapl.setEnableRotation(true)
+ tapl.setExpectedRotation(rotation.value)
}
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenFromOverview.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenFromOverview.kt
index 3a6a4a1..983653b 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenFromOverview.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenFromOverview.kt
@@ -46,9 +46,6 @@
@Before
fun setup() {
- tapl.setEnableRotation(true)
- tapl.setExpectedRotation(rotation.value)
-
primaryApp.launchViaIntent(wmHelper)
secondaryApp.launchViaIntent(wmHelper)
tapl.goHome()
@@ -57,6 +54,9 @@
.withAppTransitionIdle()
.withHomeActivityVisible()
.waitForAndVerify()
+
+ tapl.setEnableRotation(true)
+ tapl.setExpectedRotation(rotation.value)
}
@Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
index 6330d33..068171d 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
@@ -48,11 +48,11 @@
@Before
fun setup() {
+ tapl.workspace.switchToOverview().dismissAllTasks()
+
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
- tapl.workspace.switchToOverview().dismissAllTasks()
-
SplitScreenUtils.enterSplit(wmHelper, tapl, device, primaryApp, secondaryApp, rotation)
}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchBackToSplitFromRecent.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchBackToSplitFromRecent.kt
index 6ff8c53..7065846 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchBackToSplitFromRecent.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchBackToSplitFromRecent.kt
@@ -46,9 +46,10 @@
@Before
fun setup() {
+ tapl.workspace.switchToOverview().dismissAllTasks()
+
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
- tapl.workspace.switchToOverview().dismissAllTasks()
SplitScreenUtils.enterSplit(wmHelper, tapl, device, primaryApp, secondaryApp, rotation)
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/SplitScreenUtils.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/SplitScreenUtils.kt
index 87e3860..d53adc0 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/SplitScreenUtils.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/utils/SplitScreenUtils.kt
@@ -108,6 +108,7 @@
) {
primaryApp.launchViaIntent(wmHelper)
secondaryApp.launchViaIntent(wmHelper)
+ ChangeDisplayOrientationRule.setRotation(rotation)
tapl.goHome()
wmHelper.StateSyncBuilder().withHomeActivityVisible().waitForAndVerify()
splitFromOverview(tapl, device, rotation)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.java
deleted file mode 100644
index 249f23a..0000000
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wm.shell.windowdecor;
-
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
-import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
-import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
-
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.ActivityManager;
-import android.app.WindowConfiguration;
-import android.graphics.Rect;
-import android.hardware.display.DisplayManager;
-import android.hardware.display.VirtualDisplay;
-import android.hardware.input.InputManager;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Looper;
-import android.view.Choreographer;
-import android.view.Display;
-import android.view.InputChannel;
-import android.view.InputMonitor;
-import android.view.SurfaceControl;
-import android.view.SurfaceView;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
-import com.android.wm.shell.ShellTaskOrganizer;
-import com.android.wm.shell.ShellTestCase;
-import com.android.wm.shell.TestRunningTaskInfoBuilder;
-import com.android.wm.shell.common.DisplayController;
-import com.android.wm.shell.common.DisplayLayout;
-import com.android.wm.shell.common.ShellExecutor;
-import com.android.wm.shell.common.SyncTransactionQueue;
-import com.android.wm.shell.desktopmode.DesktopTasksController;
-import com.android.wm.shell.recents.RecentsTransitionHandler;
-import com.android.wm.shell.recents.RecentsTransitionStateListener;
-import com.android.wm.shell.sysui.ShellController;
-import com.android.wm.shell.sysui.ShellInit;
-import com.android.wm.shell.transition.Transitions;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Supplier;
-
-/** Tests of {@link DesktopModeWindowDecorViewModel} */
-@SmallTest
-public class DesktopModeWindowDecorViewModelTests extends ShellTestCase {
-
- private static final String TAG = "DesktopModeWindowDecorViewModelTests";
- private static final Rect STABLE_INSETS = new Rect(0, 100, 0, 0);
-
- @Mock private DesktopModeWindowDecoration mDesktopModeWindowDecoration;
- @Mock private DesktopModeWindowDecoration.Factory mDesktopModeWindowDecorFactory;
-
- @Mock private Handler mMainHandler;
- @Mock private Choreographer mMainChoreographer;
- @Mock private ShellTaskOrganizer mTaskOrganizer;
- @Mock private DisplayController mDisplayController;
- @Mock private DisplayLayout mDisplayLayout;
- @Mock private SyncTransactionQueue mSyncQueue;
- @Mock private DesktopTasksController mDesktopTasksController;
- @Mock private InputMonitor mInputMonitor;
- @Mock private InputManager mInputManager;
- @Mock private Transitions mTransitions;
- @Mock private DesktopModeWindowDecorViewModel.InputMonitorFactory mMockInputMonitorFactory;
- @Mock private Supplier<SurfaceControl.Transaction> mTransactionFactory;
- @Mock private SurfaceControl.Transaction mTransaction;
- @Mock private Display mDisplay;
- @Mock private ShellController mShellController;
- @Mock private ShellExecutor mShellExecutor;
- @Mock private DesktopModeWindowDecorViewModel.DesktopModeKeyguardChangeListener
- mDesktopModeKeyguardChangeListener;
- @Mock private RootTaskDisplayAreaOrganizer mRootTaskDisplayAreaOrganizer;
- @Mock private RecentsTransitionHandler mRecentsTransitionHandler;
-
- private final List<InputManager> mMockInputManagers = new ArrayList<>();
-
- private ShellInit mShellInit;
- private DesktopModeWindowDecorViewModel mDesktopModeWindowDecorViewModel;
-
- @Before
- public void setUp() {
- mMockInputManagers.add(mInputManager);
- mShellInit = new ShellInit(mShellExecutor);
- mDesktopModeWindowDecorViewModel =
- new DesktopModeWindowDecorViewModel(
- mContext,
- mMainHandler,
- mMainChoreographer,
- mShellInit,
- mTaskOrganizer,
- mDisplayController,
- mShellController,
- mSyncQueue,
- mTransitions,
- Optional.of(mDesktopTasksController),
- mRecentsTransitionHandler,
- mDesktopModeWindowDecorFactory,
- mMockInputMonitorFactory,
- mTransactionFactory,
- mDesktopModeKeyguardChangeListener,
- mRootTaskDisplayAreaOrganizer
- );
-
- doReturn(mDesktopModeWindowDecoration)
- .when(mDesktopModeWindowDecorFactory)
- .create(any(), any(), any(), any(), any(), any(), any(), any(), any());
- doReturn(mTransaction).when(mTransactionFactory).get();
- doReturn(mDisplayLayout).when(mDisplayController).getDisplayLayout(anyInt());
- doReturn(STABLE_INSETS).when(mDisplayLayout).stableInsets();
- doNothing().when(mShellController).addKeyguardChangeListener(any());
-
- when(mMockInputMonitorFactory.create(any(), any())).thenReturn(mInputMonitor);
- // InputChannel cannot be mocked because it passes to InputEventReceiver.
- final InputChannel[] inputChannels = InputChannel.openInputChannelPair(TAG);
- inputChannels[0].dispose();
- when(mInputMonitor.getInputChannel()).thenReturn(inputChannels[1]);
-
- mDesktopModeWindowDecoration.mDisplay = mDisplay;
- doReturn(Display.DEFAULT_DISPLAY).when(mDisplay).getDisplayId();
-
- mShellInit.init();
- }
-
- @Test
- public void testDeleteCaptionOnChangeTransitionWhenNecessary() throws Exception {
- final int taskId = 1;
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_FREEFORM);
- SurfaceControl surfaceControl = mock(SurfaceControl.class);
- runOnMainThread(() -> {
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
-
- mDesktopModeWindowDecorViewModel.onTaskOpening(
- taskInfo, surfaceControl, startT, finishT);
-
- taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_UNDEFINED);
- taskInfo.configuration.windowConfiguration.setActivityType(ACTIVITY_TYPE_UNDEFINED);
- mDesktopModeWindowDecorViewModel.onTaskChanging(
- taskInfo, surfaceControl, startT, finishT);
- });
- verify(mDesktopModeWindowDecorFactory)
- .create(
- mContext,
- mDisplayController,
- mTaskOrganizer,
- taskInfo,
- surfaceControl,
- mMainHandler,
- mMainChoreographer,
- mSyncQueue,
- mRootTaskDisplayAreaOrganizer);
- verify(mDesktopModeWindowDecoration).close();
- }
-
- @Test
- public void testCreateCaptionOnChangeTransitionWhenNecessary() throws Exception {
- final int taskId = 1;
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_UNDEFINED);
- SurfaceControl surfaceControl = mock(SurfaceControl.class);
- runOnMainThread(() -> {
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
- taskInfo.configuration.windowConfiguration.setActivityType(ACTIVITY_TYPE_UNDEFINED);
-
- mDesktopModeWindowDecorViewModel.onTaskChanging(
- taskInfo, surfaceControl, startT, finishT);
-
- taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_FREEFORM);
- taskInfo.configuration.windowConfiguration.setActivityType(ACTIVITY_TYPE_STANDARD);
-
- mDesktopModeWindowDecorViewModel.onTaskChanging(
- taskInfo, surfaceControl, startT, finishT);
- });
- verify(mDesktopModeWindowDecorFactory, times(1))
- .create(
- mContext,
- mDisplayController,
- mTaskOrganizer,
- taskInfo,
- surfaceControl,
- mMainHandler,
- mMainChoreographer,
- mSyncQueue,
- mRootTaskDisplayAreaOrganizer);
- }
-
- @Test
- public void testCreateAndDisposeEventReceiver() throws Exception {
- final int taskId = 1;
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_FREEFORM);
- taskInfo.configuration.windowConfiguration.setActivityType(ACTIVITY_TYPE_STANDARD);
- runOnMainThread(() -> {
- SurfaceControl surfaceControl = mock(SurfaceControl.class);
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
-
- mDesktopModeWindowDecorViewModel.onTaskOpening(
- taskInfo, surfaceControl, startT, finishT);
-
- mDesktopModeWindowDecorViewModel.destroyWindowDecoration(taskInfo);
- });
- verify(mMockInputMonitorFactory).create(any(), any());
- verify(mInputMonitor).dispose();
- }
-
- @Test
- public void testEventReceiversOnMultipleDisplays() throws Exception {
- runOnMainThread(() -> {
- SurfaceView surfaceView = new SurfaceView(mContext);
- final DisplayManager mDm = mContext.getSystemService(DisplayManager.class);
- final VirtualDisplay secondaryDisplay = mDm.createVirtualDisplay(
- "testEventReceiversOnMultipleDisplays", /*width=*/ 400, /*height=*/ 400,
- /*densityDpi=*/ 320, surfaceView.getHolder().getSurface(),
- DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY);
- try {
- int secondaryDisplayId = secondaryDisplay.getDisplay().getDisplayId();
-
- final int taskId = 1;
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_FREEFORM);
- final ActivityManager.RunningTaskInfo secondTaskInfo =
- createTaskInfo(taskId + 1, secondaryDisplayId, WINDOWING_MODE_FREEFORM);
- final ActivityManager.RunningTaskInfo thirdTaskInfo =
- createTaskInfo(taskId + 2, secondaryDisplayId, WINDOWING_MODE_FREEFORM);
-
- SurfaceControl surfaceControl = mock(SurfaceControl.class);
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
-
- mDesktopModeWindowDecorViewModel.onTaskOpening(taskInfo, surfaceControl, startT,
- finishT);
- mDesktopModeWindowDecorViewModel.onTaskOpening(secondTaskInfo, surfaceControl,
- startT, finishT);
- mDesktopModeWindowDecorViewModel.onTaskOpening(thirdTaskInfo, surfaceControl,
- startT, finishT);
- mDesktopModeWindowDecorViewModel.destroyWindowDecoration(thirdTaskInfo);
- mDesktopModeWindowDecorViewModel.destroyWindowDecoration(taskInfo);
- } finally {
- secondaryDisplay.release();
- }
- });
- verify(mMockInputMonitorFactory, times(2)).create(any(), any());
- verify(mInputMonitor, times(1)).dispose();
- }
-
- @Test
- public void testCaptionIsNotCreatedWhenKeyguardIsVisible() throws Exception {
- doReturn(true).when(
- mDesktopModeKeyguardChangeListener).isKeyguardVisibleAndOccluded();
-
- final int taskId = 1;
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_FULLSCREEN);
- taskInfo.isFocused = true;
- SurfaceControl surfaceControl = mock(SurfaceControl.class);
- runOnMainThread(() -> {
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
-
- mDesktopModeWindowDecorViewModel.onTaskOpening(
- taskInfo, surfaceControl, startT, finishT);
-
- taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_UNDEFINED);
- taskInfo.configuration.windowConfiguration.setActivityType(ACTIVITY_TYPE_UNDEFINED);
- mDesktopModeWindowDecorViewModel.onTaskChanging(
- taskInfo, surfaceControl, startT, finishT);
- });
- verify(mDesktopModeWindowDecorFactory, never())
- .create(any(), any(), any(), any(), any(), any(), any(), any(), any());
- }
-
- @Test
- public void testRelayoutBlockedDuringRecentsTransition() throws Exception {
- final ArgumentCaptor<RecentsTransitionStateListener> recentsCaptor =
- ArgumentCaptor.forClass(RecentsTransitionStateListener.class);
- verify(mRecentsTransitionHandler).addTransitionStateListener(recentsCaptor.capture());
-
- final IBinder transition = mock(IBinder.class);
- final DesktopModeWindowDecoration decoration = mock(DesktopModeWindowDecoration.class);
- final SurfaceControl.Transaction startT = mock(SurfaceControl.Transaction.class);
- final SurfaceControl.Transaction finishT = mock(SurfaceControl.Transaction.class);
- final int taskId = 1;
- final SurfaceControl taskSurface = new SurfaceControl();
- final ActivityManager.RunningTaskInfo taskInfo =
- createTaskInfo(taskId, Display.DEFAULT_DISPLAY, WINDOWING_MODE_FREEFORM);
- doReturn(decoration).when(mDesktopModeWindowDecorFactory)
- .create(any(), any(), any(), eq(taskInfo), eq(taskSurface), any(), any(), any(),
- any());
-
- runOnMainThread(() -> {
- // Make sure a window decorations exists first by launching a freeform task.
- mDesktopModeWindowDecorViewModel.onTaskOpening(
- taskInfo, taskSurface, startT, finishT);
- // Now call back when as a Recents transition starts.
- recentsCaptor.getValue().onTransitionStarted(transition);
- });
-
- verify(decoration).incrementRelayoutBlock();
- verify(decoration).addTransitionPausingRelayout(transition);
- }
-
- private void runOnMainThread(Runnable r) throws Exception {
- final Handler mainHandler = new Handler(Looper.getMainLooper());
- final CountDownLatch latch = new CountDownLatch(1);
- mainHandler.post(() -> {
- r.run();
- latch.countDown();
- });
- latch.await(1, TimeUnit.SECONDS);
- }
-
- private static ActivityManager.RunningTaskInfo createTaskInfo(int taskId,
- int displayId, @WindowConfiguration.WindowingMode int windowingMode) {
- ActivityManager.RunningTaskInfo taskInfo =
- new TestRunningTaskInfoBuilder()
- .setDisplayId(displayId)
- .setVisible(true)
- .build();
- taskInfo.taskId = taskId;
- taskInfo.configuration.windowConfiguration.setWindowingMode(windowingMode);
- return taskInfo;
- }
-}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
new file mode 100644
index 0000000..00d70a7
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
@@ -0,0 +1,344 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.wm.shell.windowdecor
+
+import android.app.ActivityManager.RunningTaskInfo
+import android.app.WindowConfiguration
+import android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD
+import android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED
+import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
+import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
+import android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED
+import android.graphics.Rect
+import android.hardware.display.DisplayManager
+import android.hardware.display.VirtualDisplay
+import android.os.Handler
+import android.os.IBinder
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper.RunWithLooper
+import android.view.Choreographer
+import android.view.Display.DEFAULT_DISPLAY
+import android.view.InputChannel
+import android.view.InputMonitor
+import android.view.SurfaceControl
+import android.view.SurfaceView
+import androidx.core.content.getSystemService
+import androidx.test.filters.SmallTest
+import com.android.wm.shell.RootTaskDisplayAreaOrganizer
+import com.android.wm.shell.ShellTaskOrganizer
+import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.TestRunningTaskInfoBuilder
+import com.android.wm.shell.common.DisplayController
+import com.android.wm.shell.common.DisplayLayout
+import com.android.wm.shell.common.ShellExecutor
+import com.android.wm.shell.common.SyncTransactionQueue
+import com.android.wm.shell.desktopmode.DesktopTasksController
+import com.android.wm.shell.recents.RecentsTransitionHandler
+import com.android.wm.shell.recents.RecentsTransitionStateListener
+import com.android.wm.shell.sysui.KeyguardChangeListener
+import com.android.wm.shell.sysui.ShellController
+import com.android.wm.shell.sysui.ShellInit
+import com.android.wm.shell.transition.Transitions
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.times
+import org.mockito.Mockito.verify
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.whenever
+import java.util.Optional
+import java.util.function.Supplier
+
+/** Tests of [DesktopModeWindowDecorViewModel] */
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@RunWithLooper
+class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
+ @Mock private lateinit var mockDesktopModeWindowDecorFactory:
+ DesktopModeWindowDecoration.Factory
+ @Mock private lateinit var mockMainHandler: Handler
+ @Mock private lateinit var mockMainChoreographer: Choreographer
+ @Mock private lateinit var mockTaskOrganizer: ShellTaskOrganizer
+ @Mock private lateinit var mockDisplayController: DisplayController
+ @Mock private lateinit var mockDisplayLayout: DisplayLayout
+ @Mock private lateinit var mockSyncQueue: SyncTransactionQueue
+ @Mock private lateinit var mockDesktopTasksController: DesktopTasksController
+ @Mock private lateinit var mockInputMonitor: InputMonitor
+ @Mock private lateinit var mockTransitions: Transitions
+ @Mock private lateinit var mockInputMonitorFactory:
+ DesktopModeWindowDecorViewModel.InputMonitorFactory
+ @Mock private lateinit var mockShellController: ShellController
+ @Mock private lateinit var mockShellExecutor: ShellExecutor
+ @Mock private lateinit var mockRootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer
+ @Mock private lateinit var mockRecentsTransitionHandler: RecentsTransitionHandler
+
+ private val transactionFactory = Supplier<SurfaceControl.Transaction> {
+ SurfaceControl.Transaction()
+ }
+
+ private lateinit var shellInit: ShellInit
+ private lateinit var desktopModeWindowDecorViewModel: DesktopModeWindowDecorViewModel
+
+ @Before
+ fun setUp() {
+ shellInit = ShellInit(mockShellExecutor)
+ desktopModeWindowDecorViewModel = DesktopModeWindowDecorViewModel(
+ mContext,
+ mockMainHandler,
+ mockMainChoreographer,
+ shellInit,
+ mockTaskOrganizer,
+ mockDisplayController,
+ mockShellController,
+ mockSyncQueue,
+ mockTransitions,
+ Optional.of(mockDesktopTasksController),
+ mockRecentsTransitionHandler,
+ mockDesktopModeWindowDecorFactory,
+ mockInputMonitorFactory,
+ transactionFactory,
+ mockRootTaskDisplayAreaOrganizer
+ )
+
+ whenever(mockDisplayController.getDisplayLayout(any())).thenReturn(mockDisplayLayout)
+ whenever(mockDisplayLayout.stableInsets()).thenReturn(STABLE_INSETS)
+ whenever(mockInputMonitorFactory.create(any(), any())).thenReturn(mockInputMonitor)
+
+ // InputChannel cannot be mocked because it passes to InputEventReceiver.
+ val inputChannels = InputChannel.openInputChannelPair(TAG)
+ inputChannels.first().dispose()
+ whenever(mockInputMonitor.inputChannel).thenReturn(inputChannels[1])
+
+ shellInit.init()
+ }
+
+ @Test
+ fun testDeleteCaptionOnChangeTransitionWhenNecessary() {
+ val task = createTask(windowingMode = WINDOWING_MODE_FREEFORM)
+ val taskSurface = SurfaceControl()
+ val decoration = setUpMockDecorationForTask(task)
+
+ onTaskOpening(task, taskSurface)
+
+ task.setWindowingMode(WINDOWING_MODE_UNDEFINED)
+ task.setActivityType(ACTIVITY_TYPE_UNDEFINED)
+ onTaskChanging(task, taskSurface)
+
+ verify(mockDesktopModeWindowDecorFactory).create(
+ mContext,
+ mockDisplayController,
+ mockTaskOrganizer,
+ task,
+ taskSurface,
+ mockMainHandler,
+ mockMainChoreographer,
+ mockSyncQueue,
+ mockRootTaskDisplayAreaOrganizer
+ )
+ verify(decoration).close()
+ }
+
+ @Test
+ fun testCreateCaptionOnChangeTransitionWhenNecessary() {
+ val task = createTask(
+ windowingMode = WINDOWING_MODE_UNDEFINED,
+ activityType = ACTIVITY_TYPE_UNDEFINED
+ )
+ val taskSurface = SurfaceControl()
+ setUpMockDecorationForTask(task)
+
+ onTaskChanging(task, taskSurface)
+ verify(mockDesktopModeWindowDecorFactory, never()).create(
+ mContext,
+ mockDisplayController,
+ mockTaskOrganizer,
+ task,
+ taskSurface,
+ mockMainHandler,
+ mockMainChoreographer,
+ mockSyncQueue,
+ mockRootTaskDisplayAreaOrganizer
+ )
+
+ task.setWindowingMode(WINDOWING_MODE_FREEFORM)
+ task.setActivityType(ACTIVITY_TYPE_STANDARD)
+ onTaskChanging(task, taskSurface)
+ verify(mockDesktopModeWindowDecorFactory, times(1)).create(
+ mContext,
+ mockDisplayController,
+ mockTaskOrganizer,
+ task,
+ taskSurface,
+ mockMainHandler,
+ mockMainChoreographer,
+ mockSyncQueue,
+ mockRootTaskDisplayAreaOrganizer
+ )
+ }
+
+ @Test
+ fun testCreateAndDisposeEventReceiver() {
+ val task = createTask(windowingMode = WINDOWING_MODE_FREEFORM)
+ setUpMockDecorationForTask(task)
+
+ onTaskOpening(task)
+ desktopModeWindowDecorViewModel.destroyWindowDecoration(task)
+
+ verify(mockInputMonitorFactory).create(any(), any())
+ verify(mockInputMonitor).dispose()
+ }
+
+ @Test
+ fun testEventReceiversOnMultipleDisplays() {
+ val secondaryDisplay = createVirtualDisplay() ?: return
+ val secondaryDisplayId = secondaryDisplay.display.displayId
+ val task = createTask(displayId = DEFAULT_DISPLAY, windowingMode = WINDOWING_MODE_FREEFORM)
+ val secondTask = createTask(
+ displayId = secondaryDisplayId,
+ windowingMode = WINDOWING_MODE_FREEFORM
+ )
+ val thirdTask = createTask(
+ displayId = secondaryDisplayId,
+ windowingMode = WINDOWING_MODE_FREEFORM
+ )
+ setUpMockDecorationsForTasks(task, secondTask, thirdTask)
+
+ onTaskOpening(task)
+ onTaskOpening(secondTask)
+ onTaskOpening(thirdTask)
+ desktopModeWindowDecorViewModel.destroyWindowDecoration(thirdTask)
+ desktopModeWindowDecorViewModel.destroyWindowDecoration(task)
+ secondaryDisplay.release()
+
+ verify(mockInputMonitorFactory, times(2)).create(any(), any())
+ verify(mockInputMonitor, times(1)).dispose()
+ }
+
+ @Test
+ fun testCaptionIsNotCreatedWhenKeyguardIsVisible() {
+ val task = createTask(windowingMode = WINDOWING_MODE_FULLSCREEN, focused = true)
+ val keyguardListenerCaptor = argumentCaptor<KeyguardChangeListener>()
+ verify(mockShellController).addKeyguardChangeListener(keyguardListenerCaptor.capture())
+
+ keyguardListenerCaptor.firstValue.onKeyguardVisibilityChanged(
+ true /* visible */,
+ true /* occluded */,
+ false /* animatingDismiss */
+ )
+ onTaskOpening(task)
+
+ task.setWindowingMode(WINDOWING_MODE_UNDEFINED)
+ task.setWindowingMode(ACTIVITY_TYPE_UNDEFINED)
+ onTaskChanging(task)
+
+ verify(mockDesktopModeWindowDecorFactory, never())
+ .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ }
+
+ @Test
+ fun testRelayoutBlockedDuringRecentsTransition() {
+ val recentsCaptor = argumentCaptor<RecentsTransitionStateListener>()
+ verify(mockRecentsTransitionHandler).addTransitionStateListener(recentsCaptor.capture())
+
+ val transition = mock(IBinder::class.java)
+ val task = createTask(windowingMode = WINDOWING_MODE_FREEFORM)
+ val decoration = setUpMockDecorationForTask(task)
+
+ // Make sure a window decorations exists first by launching a freeform task.
+ onTaskOpening(task)
+ // Now call back when a Recents transition starts.
+ recentsCaptor.firstValue.onTransitionStarted(transition)
+
+ verify(decoration).incrementRelayoutBlock()
+ verify(decoration).addTransitionPausingRelayout(transition)
+ }
+
+ private fun onTaskOpening(task: RunningTaskInfo, leash: SurfaceControl = SurfaceControl()) {
+ desktopModeWindowDecorViewModel.onTaskOpening(
+ task,
+ leash,
+ SurfaceControl.Transaction(),
+ SurfaceControl.Transaction()
+ )
+ }
+
+ private fun onTaskChanging(task: RunningTaskInfo, leash: SurfaceControl = SurfaceControl()) {
+ desktopModeWindowDecorViewModel.onTaskChanging(
+ task,
+ leash,
+ SurfaceControl.Transaction(),
+ SurfaceControl.Transaction()
+ )
+ }
+
+ private fun createTask(
+ displayId: Int = DEFAULT_DISPLAY,
+ @WindowConfiguration.WindowingMode windowingMode: Int,
+ activityType: Int = ACTIVITY_TYPE_STANDARD,
+ focused: Boolean = true
+ ): RunningTaskInfo {
+ return TestRunningTaskInfoBuilder()
+ .setDisplayId(displayId)
+ .setWindowingMode(windowingMode)
+ .setVisible(true)
+ .setActivityType(activityType)
+ .build().apply {
+ isFocused = focused
+ }
+ }
+
+ private fun setUpMockDecorationForTask(task: RunningTaskInfo): DesktopModeWindowDecoration {
+ val decoration = mock(DesktopModeWindowDecoration::class.java)
+ whenever(mockDesktopModeWindowDecorFactory.create(
+ any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ ).thenReturn(decoration)
+ return decoration
+ }
+
+ private fun setUpMockDecorationsForTasks(vararg tasks: RunningTaskInfo) {
+ tasks.forEach { setUpMockDecorationForTask(it) }
+ }
+
+ private fun createVirtualDisplay(): VirtualDisplay? {
+ val surfaceView = SurfaceView(mContext)
+ return mContext.getSystemService<DisplayManager>()?.createVirtualDisplay(
+ "testEventReceiversOnMultipleDisplays",
+ /*width=*/ 400,
+ /*height=*/ 400,
+ /*densityDpi=*/320,
+ surfaceView.holder.surface,
+ DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
+ )
+ }
+
+ private fun RunningTaskInfo.setWindowingMode(@WindowConfiguration.WindowingMode mode: Int) {
+ configuration.windowConfiguration.windowingMode = mode
+ }
+
+ private fun RunningTaskInfo.setActivityType(type: Int) {
+ configuration.windowConfiguration.activityType = type
+ }
+
+ companion object {
+ private const val TAG = "DesktopModeWindowDecorViewModelTests"
+ private val STABLE_INSETS = Rect(0, 100, 0, 0)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
new file mode 100644
index 0000000..a2dbab1
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.wm.shell.windowdecor;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+
+import android.app.ActivityManager;
+import android.content.ComponentName;
+import android.content.res.Configuration;
+import android.os.Handler;
+import android.testing.AndroidTestingRunner;
+import android.view.Choreographer;
+import android.view.Display;
+import android.view.SurfaceControl;
+import android.view.SurfaceControlViewHost;
+import android.window.WindowContainerTransaction;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
+import com.android.wm.shell.ShellTaskOrganizer;
+import com.android.wm.shell.ShellTestCase;
+import com.android.wm.shell.TestRunningTaskInfoBuilder;
+import com.android.wm.shell.common.DisplayController;
+import com.android.wm.shell.common.SyncTransactionQueue;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+
+import java.util.function.Supplier;
+
+/**
+ * Tests for {@link DesktopModeWindowDecoration}.
+ *
+ * Build/Install/Run:
+ * atest WMShellUnitTests:DesktopModeWindowDecorationTests
+ */
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+public class DesktopModeWindowDecorationTests extends ShellTestCase {
+ @Mock
+ private DisplayController mMockDisplayController;
+ @Mock
+ private ShellTaskOrganizer mMockShellTaskOrganizer;
+ @Mock
+ private Handler mMockHandler;
+ @Mock
+ private Choreographer mMockChoreographer;
+ @Mock
+ private SyncTransactionQueue mMockSyncQueue;
+ @Mock
+ private RootTaskDisplayAreaOrganizer mMockRootTaskDisplayAreaOrganizer;
+ @Mock
+ private Supplier<SurfaceControl.Transaction> mMockTransactionSupplier;
+ @Mock
+ private SurfaceControl.Transaction mMockTransaction;
+ @Mock
+ private SurfaceControl mMockSurfaceControl;
+ @Mock
+ private SurfaceControlViewHost mMockSurfaceControlViewHost;
+ @Mock
+ private WindowDecoration.SurfaceControlViewHostFactory mMockSurfaceControlViewHostFactory;
+
+ private final Configuration mConfiguration = new Configuration();
+
+ @Before
+ public void setUp() {
+ doReturn(mMockSurfaceControlViewHost).when(mMockSurfaceControlViewHostFactory).create(
+ any(), any(), any());
+ doReturn(mMockTransaction).when(mMockTransactionSupplier).get();
+ }
+
+ @Test
+ public void testMenusClosedWhenTaskIsInvisible() {
+ doReturn(mMockTransaction).when(mMockTransaction).hide(any());
+
+ final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(false /* visible */);
+ final DesktopModeWindowDecoration spyWindowDecor =
+ spy(createWindowDecoration(taskInfo));
+
+ spyWindowDecor.relayout(taskInfo);
+
+ // Menus should close if open before the task being invisible causes relayout to return.
+ verify(spyWindowDecor).closeHandleMenu();
+ verify(spyWindowDecor).closeMaximizeMenu();
+
+ }
+
+ private DesktopModeWindowDecoration createWindowDecoration(
+ ActivityManager.RunningTaskInfo taskInfo) {
+ return new DesktopModeWindowDecoration(mContext, mMockDisplayController,
+ mMockShellTaskOrganizer, taskInfo, mMockSurfaceControl, mConfiguration,
+ mMockHandler, mMockChoreographer, mMockSyncQueue, mMockRootTaskDisplayAreaOrganizer,
+ SurfaceControl.Builder::new, mMockTransactionSupplier,
+ WindowContainerTransaction::new, mMockSurfaceControlViewHostFactory);
+ }
+
+ private ActivityManager.RunningTaskInfo createTaskInfo(boolean visible) {
+ final ActivityManager.TaskDescription.Builder taskDescriptionBuilder =
+ new ActivityManager.TaskDescription.Builder();
+ ActivityManager.RunningTaskInfo taskInfo = new TestRunningTaskInfoBuilder()
+ .setDisplayId(Display.DEFAULT_DISPLAY)
+ .setTaskDescriptionBuilder(taskDescriptionBuilder)
+ .setVisible(visible)
+ .build();
+ taskInfo.realActivity = new ComponentName("com.android.wm.shell.windowdecor",
+ "DesktopModeWindowDecorationTests");
+ taskInfo.baseActivity = new ComponentName("com.android.wm.shell.windowdecor",
+ "DesktopModeWindowDecorationTests");
+ return taskInfo;
+
+ }
+}
diff --git a/packages/CredentialManager/AndroidManifest.xml b/packages/CredentialManager/AndroidManifest.xml
index d9ef3a2..a5ccdb6 100644
--- a/packages/CredentialManager/AndroidManifest.xml
+++ b/packages/CredentialManager/AndroidManifest.xml
@@ -22,6 +22,7 @@
<uses-permission android:name="android.permission.LAUNCH_CREDENTIAL_SELECTOR"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>
+ <uses-permission android:name="android.permission.ACCESS_INSTANT_APPS" />
<application
android:allowBackup="true"
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt b/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
index 8361877..473d7b6f 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
@@ -19,6 +19,7 @@
import android.app.slice.Slice
import android.content.ComponentName
import android.content.Context
+import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.credentials.Credential.TYPE_PASSWORD_CREDENTIAL
import android.credentials.ui.AuthenticationEntry
@@ -67,7 +68,7 @@
appPackageName: String
): String? {
return try {
- val pkgInfo = pm.getPackageInfo(appPackageName, PackageManager.PackageInfoFlags.of(0))
+ val pkgInfo = getPackageInfo(pm, appPackageName)
val applicationInfo = checkNotNull(pkgInfo.applicationInfo)
applicationInfo.loadSafeLabel(
pm, 0f,
@@ -90,10 +91,7 @@
// Test data has only package name not component name.
// For test data usage only.
try {
- val pkgInfo = pm.getPackageInfo(
- providerFlattenedComponentName,
- PackageManager.PackageInfoFlags.of(0)
- )
+ val pkgInfo = getPackageInfo(pm, providerFlattenedComponentName)
val applicationInfo = checkNotNull(pkgInfo.applicationInfo)
providerLabel =
applicationInfo.loadSafeLabel(
@@ -117,10 +115,7 @@
// Added for mdoc use case where the provider may not need to register a service and
// instead only relies on the registration api.
try {
- val pkgInfo = pm.getPackageInfo(
- component.packageName,
- PackageManager.PackageInfoFlags.of(0)
- )
+ val pkgInfo = getPackageInfo(pm, providerFlattenedComponentName)
val applicationInfo = checkNotNull(pkgInfo.applicationInfo)
providerLabel =
applicationInfo.loadSafeLabel(
@@ -144,6 +139,19 @@
}
}
+private fun getPackageInfo(
+ pm: PackageManager,
+ packageName: String
+): PackageInfo {
+ val flags = PackageManager.MATCH_INSTANT
+
+ return pm.getPackageInfo(
+ packageName,
+ PackageManager.PackageInfoFlags.of(
+ (flags).toLong())
+ )
+}
+
/** Utility functions for converting CredentialManager data structures to or from UI formats. */
class GetFlowUtils {
companion object {
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuBoxPageProvider.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuBoxPageProvider.kt
index 6d22e6a..5ffbe8ba 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuBoxPageProvider.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuBoxPageProvider.kt
@@ -19,7 +19,7 @@
import android.os.Bundle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.tooling.preview.Preview
@@ -45,13 +45,13 @@
@Composable
override fun Page(arguments: Bundle?) {
- var selectedItem by remember { mutableStateOf("item1") }
+ var selectedItem by remember { mutableIntStateOf(-1) }
val options = listOf("item1", "item2", "item3")
RegularScaffold(title = TITLE) {
SettingsExposedDropdownMenuBox(
label = exposedDropdownMenuBoxLabel,
options = options,
- selectedOptionText = selectedItem,
+ selectedOptionIndex = selectedItem,
enabled = true,
onselectedOptionTextChange = { selectedItem = it })
}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
index ec43aab..0d6c064 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
@@ -41,9 +41,9 @@
fun SettingsExposedDropdownMenuBox(
label: String,
options: List<String>,
- selectedOptionText: String,
+ selectedOptionIndex: Int,
enabled: Boolean,
- onselectedOptionTextChange: (String) -> Unit,
+ onselectedOptionTextChange: (Int) -> Unit,
) {
var expanded by remember { mutableStateOf(false) }
ExposedDropdownMenuBox(
@@ -58,8 +58,8 @@
modifier = Modifier
.menuAnchor()
.fillMaxWidth(),
- value = selectedOptionText,
- onValueChange = onselectedOptionTextChange,
+ value = options.getOrElse(selectedOptionIndex) { "" },
+ onValueChange = { },
label = { Text(text = label) },
trailingIcon = {
ExposedDropdownMenuDefaults.TrailingIcon(
@@ -81,7 +81,7 @@
DropdownMenuItem(
text = { Text(option) },
onClick = {
- onselectedOptionTextChange(option)
+ onselectedOptionTextChange(options.indexOf(option))
expanded = false
},
contentPadding = ExposedDropdownMenuDefaults.ItemContentPadding,
@@ -103,7 +103,7 @@
SettingsExposedDropdownMenuBox(
label = "ExposedDropdownMenuBoxLabel",
options = options,
- selectedOptionText = item1,
+ selectedOptionIndex = 0,
enabled = true,
onselectedOptionTextChange = {})
}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
index 3260094..a258185 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
@@ -31,6 +31,7 @@
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -54,7 +55,7 @@
enabled: Boolean,
onSelectedOptionStateChange: () -> Unit,
) {
- var dropDownWidth by remember { mutableStateOf(0) }
+ var dropDownWidth by remember { mutableIntStateOf(0) }
var expanded by remember { mutableStateOf(false) }
ExposedDropdownMenuBox(
expanded = expanded,
@@ -104,7 +105,7 @@
)
}
onSelectedOptionStateChange()
- }) {
+ }) {
Row(
modifier = Modifier
.fillMaxHeight()
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBoxTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBoxTest.kt
index 09f5945..bc67e4c 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBoxTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBoxTest.kt
@@ -17,6 +17,7 @@
package com.android.settingslib.spa.widget.editor
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
@@ -40,13 +41,13 @@
@Test
fun exposedDropdownMenuBoxs_displayed() {
composeTestRule.setContent {
- var selectedItem by remember { mutableStateOf("item1") }
+ var selectedItem by remember { mutableStateOf(0) }
SettingsExposedDropdownMenuBox(
label = exposedDropdownMenuBoxLabel,
options = options,
- selectedOptionText = selectedItem,
+ selectedOptionIndex = selectedItem,
enabled = true,
- onselectedOptionTextChange = {selectedItem = it})
+ onselectedOptionTextChange = { selectedItem = it })
}
composeTestRule.onNodeWithText(exposedDropdownMenuBoxLabel, substring = true)
.assertIsDisplayed()
@@ -55,13 +56,13 @@
@Test
fun exposedDropdownMenuBoxs_expanded() {
composeTestRule.setContent {
- var selectedItem by remember { mutableStateOf("item1") }
+ var selectedItem by remember { mutableIntStateOf(0) }
SettingsExposedDropdownMenuBox(
label = exposedDropdownMenuBoxLabel,
options = options,
- selectedOptionText = selectedItem,
+ selectedOptionIndex = selectedItem,
enabled = true,
- onselectedOptionTextChange = {selectedItem = it})
+ onselectedOptionTextChange = { selectedItem = it })
}
composeTestRule.onNodeWithText(item2, substring = true)
.assertDoesNotExist()
@@ -74,13 +75,13 @@
@Test
fun exposedDropdownMenuBoxs_valueChanged() {
composeTestRule.setContent {
- var selectedItem by remember { mutableStateOf("item1") }
+ var selectedItem by remember { mutableIntStateOf(0) }
SettingsExposedDropdownMenuBox(
label = exposedDropdownMenuBoxLabel,
options = options,
- selectedOptionText = selectedItem,
+ selectedOptionIndex = selectedItem,
enabled = true,
- onselectedOptionTextChange = {selectedItem = it})
+ onselectedOptionTextChange = { selectedItem = it })
}
composeTestRule.onNodeWithText(item2, substring = true)
.assertDoesNotExist()
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 8dc95f4..f9ea773 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1254,7 +1254,6 @@
<!-- Summary to show how many devices are connected in wifi hotspot [CHAR LIMIT=NONE] -->
<string name="wifi_tether_connected_summary">
{count, plural,
- =0 {0 device connected}
=1 {1 device connected}
other {# devices connected}
}
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 77925d6..6080101 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -203,6 +203,9 @@
"LowLightDreamLib",
"motion_tool_lib",
],
+ libs: [
+ "keepanno-annotations",
+ ],
manifest: "AndroidManifest.xml",
javacflags: ["-Adagger.fastInit=enabled"],
@@ -466,6 +469,7 @@
"android.test.runner",
"android.test.base",
"android.test.mock",
+ "keepanno-annotations",
],
kotlincflags: ["-Xjvm-default=all"],
aaptflags: [
@@ -497,6 +501,9 @@
static_libs: [
"SystemUI-tests-base",
],
+ libs: [
+ "keepanno-annotations",
+ ],
aaptflags: [
"--extra-packages",
"com.android.systemui",
diff --git a/packages/SystemUI/TEST_MAPPING b/packages/SystemUI/TEST_MAPPING
index cb9e9ee..af6fa86 100644
--- a/packages/SystemUI/TEST_MAPPING
+++ b/packages/SystemUI/TEST_MAPPING
@@ -43,7 +43,9 @@
{
"exclude-annotation": "android.platform.test.annotations.Postsubmit"
}
- ]
+ ],
+ // The test doesn't run on AOSP Cuttlefish
+ "keywords": ["internal"]
},
{
// TODO(b/251476085): Consider merging with SystemUIGoogleScreenshotTests (in U+)
@@ -55,7 +57,9 @@
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
- ]
+ ],
+ // The test doesn't run on AOSP Cuttlefish
+ "keywords": ["internal"]
},
{
// Permission indicators
@@ -112,10 +116,8 @@
"include-filter": "android.permissionui.cts.CameraMicIndicatorsPermissionTest"
}
]
- }
- ],
- "postsubmit": [
- {
+ },
+ {
"name": "SystemUIGoogleScreenshotTests",
"options": [
{
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
index 0c07616..1b56d4a 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
@@ -605,12 +605,28 @@
object : Controller by delegate {
override fun onLaunchAnimationStart(isExpandingFullyAbove: Boolean) {
listener?.onLaunchAnimationStart()
+
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(
+ TAG,
+ "Calling controller.onLaunchAnimationStart(isExpandingFullyAbove=" +
+ "$isExpandingFullyAbove) [controller=$delegate]"
+ )
+ }
delegate.onLaunchAnimationStart(isExpandingFullyAbove)
}
override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {
listener?.onLaunchAnimationEnd()
iCallback?.invoke()
+
+ if (DEBUG_LAUNCH_ANIMATION) {
+ Log.d(
+ TAG,
+ "Calling controller.onLaunchAnimationEnd(isExpandingFullyAbove=" +
+ "$isExpandingFullyAbove) [controller=$delegate]"
+ )
+ }
delegate.onLaunchAnimationEnd(isExpandingFullyAbove)
}
diff --git a/packages/SystemUI/proguard_common.flags b/packages/SystemUI/proguard_common.flags
index e2d8891..be1e655 100644
--- a/packages/SystemUI/proguard_common.flags
+++ b/packages/SystemUI/proguard_common.flags
@@ -1,8 +1,5 @@
-keep class com.android.systemui.VendorServices
-# the `#inject` methods are accessed via reflection to work on ContentProviders
--keepclassmembers class * extends com.android.systemui.dagger.SysUIComponent { void inject(***); }
-
# Needed to ensure callback field references are kept in their respective
# owning classes when the downstream callback registrars only store weak refs.
# TODO(b/264686688): Handle these cases with more targeted annotations.
diff --git a/packages/SystemUI/res/color/notification_overlay_color.xml b/packages/SystemUI/res/color/notification_overlay_color.xml
new file mode 100644
index 0000000..c24bff9
--- /dev/null
+++ b/packages/SystemUI/res/color/notification_overlay_color.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+ <item android:state_pressed="true" android:color="?androidprv:attr/materialColorOnSurface" android:alpha="0.15" />
+ <item android:state_hovered="true" android:color="?androidprv:attr/materialColorOnSurface" android:alpha="0.11" />
+ <item android:color="@color/transparent" />
+</selector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/notification_material_bg.xml b/packages/SystemUI/res/drawable/notification_material_bg.xml
index 61a8e8e..3eaa618 100644
--- a/packages/SystemUI/res/drawable/notification_material_bg.xml
+++ b/packages/SystemUI/res/drawable/notification_material_bg.xml
@@ -15,7 +15,7 @@
~ limitations under the License
-->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:color="?android:attr/colorControlHighlight">
<item>
@@ -23,4 +23,9 @@
<solid android:color="?androidprv:attr/colorSurface" />
</shape>
</item>
-</ripple>
\ No newline at end of file
+ <item>
+ <shape>
+ <solid android:color="@color/notification_overlay_color" />
+ </shape>
+ </item>
+</layer-list>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 60a78d6..beb481a 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -130,6 +130,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right|center_vertical"
+ android:gravity="center_vertical"
android:paddingStart="@dimen/hover_system_icons_container_padding_start"
android:paddingEnd="@dimen/hover_system_icons_container_padding_end"
android:paddingTop="@dimen/hover_system_icons_container_padding_top"
diff --git a/packages/SystemUI/res/layout/screen_record_dialog.xml b/packages/SystemUI/res/layout/screen_record_dialog.xml
index f6ce70d..dc560bf 100644
--- a/packages/SystemUI/res/layout/screen_record_dialog.xml
+++ b/packages/SystemUI/res/layout/screen_record_dialog.xml
@@ -150,19 +150,6 @@
android:layout_height="match_parent"
android:layout_weight="1"/>
- <!-- Temporary entrypoint for the partial screensharing used for teamfooding -->
- <!-- TODO(b/236838395) remove this and use redesigned dialog -->
- <TextView
- android:id="@+id/button_app"
- android:visibility="gone"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:layout_gravity="end"
- android:layout_marginEnd="8dp"
- android:text="App"
- style="@style/Widget.Dialog.Button.BorderButton" />
-
<TextView
android:id="@+id/button_start"
android:layout_width="wrap_content"
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
index 356b36f..fa7f9cf 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_row.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml
@@ -30,12 +30,14 @@
<com.android.systemui.statusbar.notification.row.NotificationBackgroundView
android:id="@+id/backgroundNormal"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:duplicateParentState="true"/>
<com.android.systemui.statusbar.notification.row.NotificationBackgroundView
android:id="@+id/backgroundDimmed"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent"
+ android:duplicateParentState="true"/>
<com.android.systemui.statusbar.notification.row.NotificationContentView
android:id="@+id/expanded"
diff --git a/packages/SystemUI/res/values-land/bools.xml b/packages/SystemUI/res/values-land/bools.xml
new file mode 100644
index 0000000..e24792d
--- /dev/null
+++ b/packages/SystemUI/res/values-land/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+ <!-- Only use small clock on lockscreen.
+ True here because only small clock used on small devices in landscape -->
+ <bool name="force_small_clock_on_lockscreen">true</bool>
+</resources>
diff --git a/packages/SystemUI/res/values-sw600dp-land/bools.xml b/packages/SystemUI/res/values-sw600dp-land/bools.xml
new file mode 100644
index 0000000..c4d77e8
--- /dev/null
+++ b/packages/SystemUI/res/values-sw600dp-land/bools.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2023, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+ <!-- Only use small clock on lockscreen.
+ False here because large clock is allowed on large devices in landscape -->
+ <bool name="force_small_clock_on_lockscreen">false</bool>
+</resources>
diff --git a/packages/SystemUI/res/values/bools.xml b/packages/SystemUI/res/values/bools.xml
index 91d3a88..3956662 100644
--- a/packages/SystemUI/res/values/bools.xml
+++ b/packages/SystemUI/res/values/bools.xml
@@ -59,4 +59,8 @@
True here so bouncers constraints are updated when rotating on small screens -->
<bool name="update_bouncer_constraints">true</bool>
+
+ <!-- Only use small clock on lockscreen.
+ False here because large clock used by default, unless otherwise specified -->
+ <bool name="force_small_clock_on_lockscreen">false</bool>
</resources>
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt b/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt
index bb799fc..d7019b5 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt
@@ -27,7 +27,7 @@
override var userId: Int = 0,
override var listening: Boolean = false,
// keep sorted
- var allowedDisplayState: Boolean = false,
+ var allowedDisplayStateWhileAwake: Boolean = false,
var alternateBouncerShowing: Boolean = false,
var authInterruptActive: Boolean = false,
var biometricSettingEnabledForUser: Boolean = false,
@@ -58,7 +58,7 @@
userId.toString(),
listening.toString(),
// keep sorted
- allowedDisplayState.toString(),
+ allowedDisplayStateWhileAwake.toString(),
alternateBouncerShowing.toString(),
authInterruptActive.toString(),
biometricSettingEnabledForUser.toString(),
@@ -98,7 +98,7 @@
userId = model.userId
listening = model.listening
// keep sorted
- allowedDisplayState = model.allowedDisplayState
+ allowedDisplayStateWhileAwake = model.allowedDisplayStateWhileAwake
alternateBouncerShowing = model.alternateBouncerShowing
authInterruptActive = model.authInterruptActive
biometricSettingEnabledForUser = model.biometricSettingEnabledForUser
@@ -143,7 +143,7 @@
"userId",
"listening",
// keep sorted
- "allowedDisplayState",
+ "allowedDisplayStateWhileAwake",
"alternateBouncerShowing",
"authInterruptActive",
"biometricSettingEnabledForUser",
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 0f733c6..abab5e6 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -75,6 +75,7 @@
import static com.android.keyguard.FaceAuthUiEvent.FACE_AUTH_UPDATED_STRONG_AUTH_CHANGED;
import static com.android.keyguard.FaceAuthUiEvent.FACE_AUTH_UPDATED_USER_SWITCHING;
import static com.android.systemui.DejankUtils.whitelistIpcs;
+import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_AWAKE;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_OPENED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
@@ -161,6 +162,7 @@
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.dump.DumpsysTableLogger;
+import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.keyguard.domain.interactor.FaceAuthenticationListener;
import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor;
import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent;
@@ -203,7 +205,6 @@
import java.util.Optional;
import java.util.Set;
import java.util.TimeZone;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
@@ -343,15 +344,16 @@
return;
}
- if (mDisplayTracker.getDisplay(mDisplayTracker.getDefaultDisplayId()).getState()
+ if (mWakefulness.getWakefulness() == WAKEFULNESS_AWAKE
+ && mDisplayTracker.getDisplay(mDisplayTracker.getDefaultDisplayId()).getState()
== Display.STATE_OFF) {
- mAllowedDisplayStateForFaceAuth = false;
+ mAllowedDisplayStateWhileAwakeForFaceAuth = false;
updateFaceListeningState(
BIOMETRIC_ACTION_STOP,
FACE_AUTH_DISPLAY_OFF
);
} else {
- mAllowedDisplayStateForFaceAuth = true;
+ mAllowedDisplayStateWhileAwakeForFaceAuth = true;
}
}
};
@@ -375,7 +377,7 @@
private boolean mOccludingAppRequestingFp;
private boolean mOccludingAppRequestingFace;
private boolean mSecureCameraLaunched;
- private boolean mAllowedDisplayStateForFaceAuth = true;
+ private boolean mAllowedDisplayStateWhileAwakeForFaceAuth = true;
@VisibleForTesting
protected boolean mTelephonyCapable;
private boolean mAllowFingerprintOnCurrentOccludingActivity;
@@ -423,6 +425,7 @@
private KeyguardFaceAuthInteractor mFaceAuthInteractor;
private final TaskStackChangeListeners mTaskStackChangeListeners;
private final IActivityTaskManager mActivityTaskManager;
+ private final WakefulnessLifecycle mWakefulness;
private final DisplayTracker mDisplayTracker;
private final LockPatternUtils mLockPatternUtils;
@VisibleForTesting
@@ -2208,7 +2211,7 @@
Trace.beginSection("KeyguardUpdateMonitor#handleStartedWakingUp");
Assert.isMainThread();
- mAllowedDisplayStateForFaceAuth = true;
+ mAllowedDisplayStateWhileAwakeForFaceAuth = true;
updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE);
if (mFaceWakeUpTriggersConfig.shouldTriggerFaceAuthOnWakeUpFrom(pmWakeReason)) {
FACE_AUTH_UPDATED_STARTED_WAKING_UP.setExtraInfo(pmWakeReason);
@@ -2364,7 +2367,8 @@
Optional<FingerprintInteractiveToAuthProvider> interactiveToAuthProvider,
TaskStackChangeListeners taskStackChangeListeners,
IActivityTaskManager activityTaskManagerService,
- DisplayTracker displayTracker) {
+ DisplayTracker displayTracker,
+ WakefulnessLifecycle wakefulness) {
mContext = context;
mSubscriptionManager = subscriptionManager;
mUserTracker = userTracker;
@@ -2411,6 +2415,7 @@
.collect(Collectors.toSet());
mTaskStackChangeListeners = taskStackChangeListeners;
mActivityTaskManager = activityTaskManagerService;
+ mWakefulness = wakefulness;
mDisplayTracker = displayTracker;
mDisplayTracker.addDisplayChangeCallback(mDisplayCallback, mainExecutor);
@@ -2440,7 +2445,7 @@
handleDevicePolicyManagerStateChanged(msg.arg1);
break;
case MSG_USER_SWITCHING:
- handleUserSwitching(msg.arg1, (CountDownLatch) msg.obj);
+ handleUserSwitching(msg.arg1, (Runnable) msg.obj);
break;
case MSG_USER_SWITCH_COMPLETE:
handleUserSwitchComplete(msg.arg1);
@@ -2741,10 +2746,12 @@
}
private final UserTracker.Callback mUserChangedCallback = new UserTracker.Callback() {
+
@Override
- public void onUserChanging(int newUser, Context userContext, CountDownLatch latch) {
+ public void onUserChanging(int newUser, @NonNull Context userContext,
+ @NonNull Runnable resultCallback) {
mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCHING,
- newUser, 0, latch));
+ newUser, 0, resultCallback));
}
@Override
@@ -3213,7 +3220,7 @@
&& faceAndFpNotAuthenticated
&& !mGoingToSleep
&& isPostureAllowedForFaceAuth
- && mAllowedDisplayStateForFaceAuth;
+ && mAllowedDisplayStateWhileAwakeForFaceAuth;
// Aggregate relevant fields for debug logging.
logListenerModelData(
@@ -3221,7 +3228,7 @@
System.currentTimeMillis(),
user,
shouldListen,
- mAllowedDisplayStateForFaceAuth,
+ mAllowedDisplayStateWhileAwakeForFaceAuth,
mAlternateBouncerShowing,
mAuthInterruptActive,
biometricEnabledForUser,
@@ -3575,7 +3582,7 @@
* Handle {@link #MSG_USER_SWITCHING}
*/
@VisibleForTesting
- void handleUserSwitching(int userId, CountDownLatch latch) {
+ void handleUserSwitching(int userId, Runnable resultCallback) {
mLogger.logUserSwitching(userId, "from UserTracker");
Assert.isMainThread();
clearBiometricRecognized();
@@ -3589,7 +3596,7 @@
cb.onUserSwitching(userId);
}
}
- latch.countDown();
+ resultCallback.run();
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt
index 12108b0..b15aaaf 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt
@@ -25,6 +25,9 @@
import android.util.Log
import androidx.core.app.AppComponentFactory
import com.android.systemui.dagger.ContextComponentHelper
+import com.android.systemui.dagger.SysUIComponent
+import com.android.tools.r8.keepanno.annotations.KeepTarget
+import com.android.tools.r8.keepanno.annotations.UsesReflection
import java.lang.reflect.InvocationTargetException
import java.util.concurrent.ExecutionException
import javax.inject.Inject
@@ -88,6 +91,7 @@
return app
}
+ @UsesReflection(KeepTarget(extendsClassConstant = SysUIComponent::class, methodName = "inject"))
override fun instantiateProviderCompat(cl: ClassLoader, className: String): ContentProvider {
val contentProvider = super.instantiateProviderCompat(cl, className)
if (contentProvider is ContextInitializer) {
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 1e002b8..58ba3c9 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -154,72 +154,72 @@
* may not appreciate that.
*/
@Module(includes = {
- AccessibilityModule.class,
- AccessibilityRepositoryModule.class,
- AConfigModule.class,
- AppOpsModule.class,
- AssistModule.class,
- AuthenticationModule.class,
- BiometricsModule.class,
- BouncerViewModule.class,
- ClipboardOverlayModule.class,
- ClockRegistryModule.class,
- CommonRepositoryModule.class,
- DisplayModule.class,
- ConnectivityModule.class,
- CoroutinesModule.class,
- DreamModule.class,
- ControlsModule.class,
- DemoModeModule.class,
- DisableFlagsModule.class,
- FalsingModule.class,
- FlagsModule.class,
- SystemPropertiesFlagsModule.class,
- FooterActionsModule.class,
- KeyboardModule.class,
- LetterboxModule.class,
- KeyguardBlueprintModule.class,
- LogModule.class,
- MediaProjectionModule.class,
- MediaProjectionTaskSwitcherModule.class,
- MotionToolModule.class,
- NotificationIconAreaControllerModule.class,
- PeopleHubModule.class,
- PeopleModule.class,
- PluginModule.class,
- PolicyModule.class,
- PrivacyModule.class,
- QRCodeScannerModule.class,
- QSFragmentStartableModule.class,
- RetailModeModule.class,
- ScreenshotModule.class,
- SensorModule.class,
- SecurityRepositoryModule.class,
- ScreenRecordModule.class,
- SettingsUtilModule.class,
- SmartRepliesInflationModule.class,
- SmartspaceModule.class,
- StatusBarModule.class,
- StatusBarPipelineModule.class,
- StatusBarPolicyModule.class,
- StatusBarWindowModule.class,
- SysUIConcurrencyModule.class,
- SysUIUnfoldModule.class,
- TelephonyRepositoryModule.class,
- TemporaryDisplayModule.class,
- TunerModule.class,
- UserModule.class,
- UtilModule.class,
- NoteTaskModule.class,
- WalletModule.class
+ AccessibilityModule.class,
+ AccessibilityRepositoryModule.class,
+ AConfigModule.class,
+ AppOpsModule.class,
+ AssistModule.class,
+ AuthenticationModule.class,
+ BiometricsModule.class,
+ BouncerViewModule.class,
+ ClipboardOverlayModule.class,
+ ClockRegistryModule.class,
+ CommonRepositoryModule.class,
+ ConnectivityModule.class,
+ ControlsModule.class,
+ CoroutinesModule.class,
+ DemoModeModule.class,
+ DisableFlagsModule.class,
+ DisplayModule.class,
+ DreamModule.class,
+ FalsingModule.class,
+ FlagsModule.class,
+ FooterActionsModule.class,
+ KeyboardModule.class,
+ KeyguardBlueprintModule.class,
+ LetterboxModule.class,
+ LogModule.class,
+ MediaProjectionModule.class,
+ MediaProjectionTaskSwitcherModule.class,
+ MotionToolModule.class,
+ NotificationIconAreaControllerModule.class,
+ PeopleHubModule.class,
+ PeopleModule.class,
+ PluginModule.class,
+ PolicyModule.class,
+ PrivacyModule.class,
+ QRCodeScannerModule.class,
+ QSFragmentStartableModule.class,
+ RetailModeModule.class,
+ ScreenshotModule.class,
+ SensorModule.class,
+ SecurityRepositoryModule.class,
+ ScreenRecordModule.class,
+ SettingsUtilModule.class,
+ SmartRepliesInflationModule.class,
+ SmartspaceModule.class,
+ StatusBarModule.class,
+ StatusBarPipelineModule.class,
+ StatusBarPolicyModule.class,
+ StatusBarWindowModule.class,
+ SystemPropertiesFlagsModule.class,
+ SysUIConcurrencyModule.class,
+ SysUIUnfoldModule.class,
+ TelephonyRepositoryModule.class,
+ TemporaryDisplayModule.class,
+ TunerModule.class,
+ UserModule.class,
+ UtilModule.class,
+ NoteTaskModule.class,
+ WalletModule.class
},
subcomponents = {
ComplicationComponent.class,
- NavigationBarComponent.class,
- NotificationRowComponent.class,
DozeComponent.class,
ExpandableNotificationRowComponent.class,
KeyguardBouncerComponent.class,
+ NavigationBarComponent.class,
+ NotificationRowComponent.class,
NotificationShelfComponent.class,
WindowRootViewComponent.class,
})
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index d5f9288..02575eb 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -779,11 +779,11 @@
/** Enable the Compose implementation of the PeopleSpaceActivity. */
@JvmField
- val COMPOSE_PEOPLE_SPACE = unreleasedFlag("compose_people_space", teamfood = true)
+ val COMPOSE_PEOPLE_SPACE = releasedFlag("compose_people_space")
/** Enable the Compose implementation of the Quick Settings footer actions. */
@JvmField
- val COMPOSE_QS_FOOTER_ACTIONS = unreleasedFlag("compose_qs_footer_actions", teamfood = true)
+ val COMPOSE_QS_FOOTER_ACTIONS = releasedFlag("compose_qs_footer_actions")
/** Enable the share wifi button in Quick Settings internet dialog. */
@JvmField
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
index 257006e..22bcf0a 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
@@ -18,10 +18,8 @@
package com.android.systemui.keyguard
import android.content.Context
-import android.content.res.Configuration
import android.view.LayoutInflater
import android.view.View
-import android.view.ViewGroup
import com.android.keyguard.KeyguardStatusView
import com.android.keyguard.KeyguardStatusViewController
import com.android.keyguard.LockIconView
@@ -29,38 +27,21 @@
import com.android.keyguard.dagger.KeyguardStatusViewComponent
import com.android.systemui.CoreStartable
import com.android.systemui.R
-import com.android.systemui.communal.ui.adapter.CommunalWidgetViewAdapter
-import com.android.systemui.communal.ui.binder.CommunalWidgetViewBinder
-import com.android.systemui.communal.ui.viewmodel.CommunalWidgetViewModel
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor
-import com.android.systemui.keyguard.ui.binder.KeyguardAmbientIndicationAreaViewBinder
import com.android.systemui.keyguard.ui.binder.KeyguardBlueprintViewBinder
import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder
-import com.android.systemui.keyguard.ui.binder.KeyguardQuickAffordanceViewBinder
import com.android.systemui.keyguard.ui.binder.KeyguardRootViewBinder
-import com.android.systemui.keyguard.ui.binder.KeyguardSettingsViewBinder
import com.android.systemui.keyguard.ui.view.KeyguardIndicationArea
import com.android.systemui.keyguard.ui.view.KeyguardRootView
import com.android.systemui.keyguard.ui.view.layout.KeyguardBlueprintCommandListener
-import com.android.systemui.keyguard.ui.viewmodel.KeyguardAmbientIndicationViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel
-import com.android.systemui.keyguard.ui.viewmodel.KeyguardQuickAffordancesCombinedViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
-import com.android.systemui.keyguard.ui.viewmodel.KeyguardSettingsMenuViewModel
import com.android.systemui.keyguard.ui.viewmodel.OccludingAppDeviceEntryMessageViewModel
-import com.android.systemui.plugins.ActivityStarter
-import com.android.systemui.plugins.FalsingManager
import com.android.systemui.shade.NotificationShadeWindowView
import com.android.systemui.statusbar.KeyguardIndicationController
-import com.android.systemui.statusbar.VibratorHelper
-import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
-import com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer
-import com.android.systemui.statusbar.notification.stack.ui.viewbinder.SharedNotificationContainerBinder
-import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.temporarydisplay.chipbar.ChipbarCoordinator
import javax.inject.Inject
@@ -74,30 +55,17 @@
@Inject
constructor(
private val keyguardRootView: KeyguardRootView,
- private val sharedNotificationContainer: SharedNotificationContainer,
private val keyguardRootViewModel: KeyguardRootViewModel,
private val keyguardIndicationAreaViewModel: KeyguardIndicationAreaViewModel,
- private val sharedNotificationContainerViewModel: SharedNotificationContainerViewModel,
- private val keyguardAmbientIndicationViewModel: KeyguardAmbientIndicationViewModel,
private val notificationShadeWindowView: NotificationShadeWindowView,
private val featureFlags: FeatureFlags,
private val indicationController: KeyguardIndicationController,
- private val keyguardQuickAffordancesCombinedViewModel:
- KeyguardQuickAffordancesCombinedViewModel,
- private val falsingManager: FalsingManager,
- private val vibratorHelper: VibratorHelper,
private val keyguardStateController: KeyguardStateController,
- private val keyguardSettingsMenuViewModel: KeyguardSettingsMenuViewModel,
- private val activityStarter: ActivityStarter,
private val occludingAppDeviceEntryMessageViewModel: OccludingAppDeviceEntryMessageViewModel,
private val chipbarCoordinator: ChipbarCoordinator,
private val keyguardBlueprintCommandListener: KeyguardBlueprintCommandListener,
private val keyguardBlueprintViewModel: KeyguardBlueprintViewModel,
private val keyguardStatusViewComponentFactory: KeyguardStatusViewComponent.Factory,
- private val keyguardBlueprintInteractor: KeyguardBlueprintInteractor,
- private val communalWidgetViewModel: CommunalWidgetViewModel,
- private val communalWidgetViewAdapter: CommunalWidgetViewAdapter,
- private val notificationStackScrollerLayoutController: NotificationStackScrollLayoutController,
private val context: Context,
private val keyguardIndicationController: KeyguardIndicationController,
private val lockIconViewController: LockIconViewController,
@@ -105,10 +73,7 @@
private var rootViewHandle: DisposableHandle? = null
private var indicationAreaHandle: DisposableHandle? = null
- private var leftShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
- private var rightShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
- private var ambientIndicationAreaHandle: KeyguardAmbientIndicationAreaViewBinder.Binding? = null
- private var settingsPopupMenuHandle: DisposableHandle? = null
+
var keyguardStatusViewController: KeyguardStatusViewController? = null
get() {
if (field == null) {
@@ -127,52 +92,12 @@
override fun start() {
bindKeyguardRootView()
- if (featureFlags.isEnabled(Flags.LAZY_INFLATE_KEYGUARD)) {
- keyguardRootView.removeAllViews()
- initializeViews()
- } else {
- val notificationPanel =
- notificationShadeWindowView.requireViewById(R.id.notification_panel) as ViewGroup
- unbindKeyguardBottomArea(notificationPanel)
- bindIndicationArea()
- bindLockIconView(notificationPanel)
- bindKeyguardStatusView(notificationPanel)
- setupNotificationStackScrollLayout(notificationPanel)
- bindLeftShortcut()
- bindRightShortcut()
- bindAmbientIndicationArea()
- bindSettingsPopupMenu()
- bindCommunalWidgetArea()
- }
+ initializeViews()
KeyguardBlueprintViewBinder.bind(keyguardRootView, keyguardBlueprintViewModel)
keyguardBlueprintCommandListener.start()
}
- fun setupNotificationStackScrollLayout(legacyParent: ViewGroup) {
- if (featureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
- // This moves the existing NSSL view to a different parent, as the controller is a
- // singleton and recreating it has other bad side effects
- val nssl =
- legacyParent.requireViewById<View>(R.id.notification_stack_scroller).also {
- (it.getParent() as ViewGroup).removeView(it)
- }
- sharedNotificationContainer.addNotificationStackScrollLayout(nssl)
- SharedNotificationContainerBinder.bind(
- sharedNotificationContainer,
- sharedNotificationContainerViewModel,
- notificationStackScrollerLayoutController,
- )
- }
- }
-
- override fun onConfigurationChanged(newConfig: Configuration?) {
- super.onConfigurationChanged(newConfig)
- leftShortcutHandle?.onConfigurationChanged()
- rightShortcutHandle?.onConfigurationChanged()
- ambientIndicationAreaHandle?.onConfigurationChanged()
- }
-
fun bindIndicationArea() {
indicationAreaHandle?.dispose()
@@ -213,135 +138,6 @@
)
}
- private fun bindLockIconView(legacyParent: ViewGroup) {
- if (featureFlags.isEnabled(Flags.MIGRATE_LOCK_ICON)) {
- legacyParent.requireViewById<View>(R.id.lock_icon_view).let {
- legacyParent.removeView(it)
- }
- } else {
- keyguardRootView.findViewById<View?>(R.id.lock_icon_view)?.let {
- keyguardRootView.removeView(it)
- }
- legacyParent.requireViewById<LockIconView>(R.id.lock_icon_view).let {
- lockIconViewController.setLockIconView(it)
- }
- }
- }
-
- private fun bindAmbientIndicationArea() {
- if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- ambientIndicationAreaHandle?.destroy()
- ambientIndicationAreaHandle =
- KeyguardAmbientIndicationAreaViewBinder.bind(
- notificationShadeWindowView,
- keyguardAmbientIndicationViewModel,
- keyguardRootViewModel,
- )
- } else {
- keyguardRootView.findViewById<View?>(R.id.ambient_indication_container)?.let {
- keyguardRootView.removeView(it)
- }
- }
- }
-
- private fun bindSettingsPopupMenu() {
- if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- settingsPopupMenuHandle?.dispose()
- settingsPopupMenuHandle =
- KeyguardSettingsViewBinder.bind(
- keyguardRootView,
- keyguardSettingsMenuViewModel,
- vibratorHelper,
- activityStarter,
- )
- } else {
- keyguardRootView.findViewById<View?>(R.id.keyguard_settings_button)?.let {
- keyguardRootView.removeView(it)
- }
- }
- }
-
- private fun unbindKeyguardBottomArea(legacyParent: ViewGroup) {
- if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- legacyParent.requireViewById<View>(R.id.keyguard_bottom_area).let {
- legacyParent.removeView(it)
- }
- }
- }
-
- private fun bindLeftShortcut() {
- leftShortcutHandle?.destroy()
- if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- leftShortcutHandle =
- KeyguardQuickAffordanceViewBinder.bind(
- keyguardRootView.requireViewById(R.id.start_button),
- keyguardQuickAffordancesCombinedViewModel.startButton,
- keyguardRootViewModel.alpha,
- falsingManager,
- vibratorHelper,
- ) {
- indicationController.showTransientIndication(it)
- }
- } else {
- keyguardRootView.findViewById<View?>(R.id.start_button)?.let {
- keyguardRootView.removeView(it)
- }
- }
- }
-
- private fun bindRightShortcut() {
- rightShortcutHandle?.destroy()
- if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
- rightShortcutHandle =
- KeyguardQuickAffordanceViewBinder.bind(
- keyguardRootView.requireViewById(R.id.end_button),
- keyguardQuickAffordancesCombinedViewModel.endButton,
- keyguardRootViewModel.alpha,
- falsingManager,
- vibratorHelper,
- ) {
- indicationController.showTransientIndication(it)
- }
- } else {
- keyguardRootView.findViewById<View?>(R.id.end_button)?.let {
- keyguardRootView.removeView(it)
- }
- }
- }
-
- fun bindKeyguardStatusView(legacyParent: ViewGroup) {
- // At startup, 2 views with the ID `R.id.keyguard_status_view` will be available.
- // Disable one of them
- if (featureFlags.isEnabled(Flags.MIGRATE_KEYGUARD_STATUS_VIEW)) {
- legacyParent.findViewById<View>(R.id.keyguard_status_view)?.let {
- legacyParent.removeView(it)
- }
-
- val keyguardStatusView = keyguardRootView.addStatusView()
- val statusViewComponent = keyguardStatusViewComponentFactory.build(keyguardStatusView)
- val controller = statusViewComponent.getKeyguardStatusViewController()
- controller.init()
- keyguardStatusViewController = controller
- } else {
- keyguardRootView.findViewById<View?>(R.id.keyguard_status_view)?.let {
- keyguardRootView.removeView(it)
- }
- }
- }
-
- private fun bindCommunalWidgetArea() {
- if (!featureFlags.isEnabled(Flags.WIDGET_ON_KEYGUARD)) {
- return
- }
-
- CommunalWidgetViewBinder.bind(
- keyguardRootView,
- communalWidgetViewModel,
- communalWidgetViewAdapter,
- keyguardBlueprintInteractor,
- )
- }
-
/**
* Temporary, to allow NotificationPanelViewController to use the same instance while code is
* migrated: b/288242803
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt
index af0abdf..5e5caba 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt
@@ -34,7 +34,7 @@
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.withContext
@SysUISingleton
@@ -58,16 +58,21 @@
get() = R.drawable.ic_camera
override val lockScreenState: Flow<KeyguardQuickAffordanceConfig.LockScreenState>
- get() =
- flowOf(
- KeyguardQuickAffordanceConfig.LockScreenState.Visible(
- icon =
- Icon.Resource(
- R.drawable.ic_camera,
- ContentDescription.Resource(R.string.accessibility_camera_button)
- )
- )
+ get() = flow {
+ emit(
+ if (isLaunchable()) {
+ KeyguardQuickAffordanceConfig.LockScreenState.Visible(
+ icon =
+ Icon.Resource(
+ R.drawable.ic_camera,
+ ContentDescription.Resource(R.string.accessibility_camera_button)
+ )
+ )
+ } else {
+ KeyguardQuickAffordanceConfig.LockScreenState.Hidden
+ }
)
+ }
override suspend fun getPickerScreenState(): KeyguardQuickAffordanceConfig.PickerScreenState {
return if (isLaunchable()) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/KeyguardRootView.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/KeyguardRootView.kt
index a948741..f2b28d9 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/KeyguardRootView.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/KeyguardRootView.kt
@@ -19,123 +19,14 @@
import android.content.Context
import android.util.AttributeSet
-import android.view.LayoutInflater
-import android.view.View
-import android.widget.ImageView
import androidx.constraintlayout.widget.ConstraintLayout
-import androidx.core.content.res.ResourcesCompat
-import com.android.keyguard.KeyguardStatusView
-import com.android.keyguard.LockIconView
-import com.android.systemui.R
-import com.android.systemui.animation.view.LaunchableImageView
/** Provides a container for all keyguard ui content. */
class KeyguardRootView(
context: Context,
- private val attrs: AttributeSet?,
+ attrs: AttributeSet?,
) :
ConstraintLayout(
context,
attrs,
- ) {
-
- private var statusView: KeyguardStatusView? = null
-
- init {
- addIndicationTextArea()
- addLockIconView()
- addAmbientIndicationArea()
- addLeftShortcut()
- addRightShortcut()
- addSettingsPopupMenu()
- addStatusView()
- }
-
- private fun addIndicationTextArea() {
- val view = KeyguardIndicationArea(context, attrs)
- addView(view)
- }
-
- private fun addLockIconView() {
- val view = LockIconView(context, attrs).apply { id = R.id.lock_icon_view }
- addView(view)
- }
-
- private fun addAmbientIndicationArea() {
- LayoutInflater.from(context).inflate(R.layout.ambient_indication, this)
- }
-
- private fun addLeftShortcut() {
- val padding = resources.getDimensionPixelSize(R.dimen.keyguard_affordance_fixed_padding)
- val view =
- LaunchableImageView(context, attrs).apply {
- id = R.id.start_button
- scaleType = ImageView.ScaleType.FIT_CENTER
- background =
- ResourcesCompat.getDrawable(
- context.resources,
- R.drawable.keyguard_bottom_affordance_bg,
- context.theme
- )
- foreground =
- ResourcesCompat.getDrawable(
- context.resources,
- R.drawable.keyguard_bottom_affordance_selected_border,
- context.theme
- )
- visibility = View.INVISIBLE
- setPadding(padding, padding, padding, padding)
- }
- addView(view)
- }
-
- private fun addRightShortcut() {
- val padding = resources.getDimensionPixelSize(R.dimen.keyguard_affordance_fixed_padding)
- val view =
- LaunchableImageView(context, attrs).apply {
- id = R.id.end_button
- scaleType = ImageView.ScaleType.FIT_CENTER
- background =
- ResourcesCompat.getDrawable(
- context.resources,
- R.drawable.keyguard_bottom_affordance_bg,
- context.theme
- )
- foreground =
- ResourcesCompat.getDrawable(
- context.resources,
- R.drawable.keyguard_bottom_affordance_selected_border,
- context.theme
- )
- visibility = View.INVISIBLE
- setPadding(padding, padding, padding, padding)
- }
- addView(view)
- }
-
- private fun addSettingsPopupMenu() {
- val view =
- LayoutInflater.from(context)
- .inflate(R.layout.keyguard_settings_popup_menu, this, false)
- .apply {
- id = R.id.keyguard_settings_button
- visibility = GONE
- }
- addView(view)
- }
-
- fun addStatusView(): KeyguardStatusView {
- // StatusView may need to be rebuilt on config changes. Remove and reinflate
- statusView?.let { removeView(it) }
- val view =
- (LayoutInflater.from(context).inflate(R.layout.keyguard_status_view, this, false)
- as KeyguardStatusView)
- .apply {
- setClipChildren(false)
- statusView = this
- }
-
- addView(view)
- return view
- }
-}
+ )
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt
index 43bbf69..1eeb017 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt
@@ -17,10 +17,7 @@
package com.android.systemui.keyguard.ui.view.layout.blueprints
-import androidx.constraintlayout.widget.ConstraintLayout
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.shared.model.KeyguardBlueprint
import com.android.systemui.keyguard.ui.view.layout.sections.AodNotificationIconsSection
import com.android.systemui.keyguard.ui.view.layout.sections.DefaultAmbientIndicationAreaSection
@@ -54,7 +51,6 @@
defaultNotificationStackScrollLayoutSection: DefaultNotificationStackScrollLayoutSection,
splitShadeGuidelines: SplitShadeGuidelines,
aodNotificationIconsSection: AodNotificationIconsSection,
- private val featureFlags: FeatureFlags,
) : KeyguardBlueprint {
override val id: String = DEFAULT
@@ -72,16 +68,6 @@
aodNotificationIconsSection,
)
- override fun replaceViews(
- previousBlueprint: KeyguardBlueprint?,
- constraintLayout: ConstraintLayout,
- bindData: Boolean
- ) {
- if (featureFlags.isEnabled(Flags.LAZY_INFLATE_KEYGUARD)) {
- super.replaceViews(previousBlueprint, constraintLayout, bindData)
- }
- }
-
companion object {
const val DEFAULT = "default"
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
index cf64a83..be48756 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
@@ -91,7 +91,13 @@
public override fun onCreate(bundle: Bundle?) {
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE)
- component = componentFactory.create(activity = this, view = this, resultHandler = this)
+ component =
+ componentFactory.create(
+ hostUserHandle = hostUserHandle,
+ callingPackage = callingPackage,
+ view = this,
+ resultHandler = this
+ )
component.lifecycleObservers.forEach { lifecycle.addObserver(it) }
// Create a separate configuration controller for this activity as the configuration
@@ -288,6 +294,18 @@
override fun createContentPreviewView(parent: ViewGroup): ViewGroup =
recentsViewController.createView(parent)
+ private val hostUserHandle: UserHandle
+ get() {
+ val extras =
+ intent.extras
+ ?: error("MediaProjectionAppSelectorActivity should be launched with extras")
+ return extras.getParcelable(EXTRA_HOST_APP_USER_HANDLE)
+ ?: error(
+ "MediaProjectionAppSelectorActivity should be provided with " +
+ "$EXTRA_HOST_APP_USER_HANDLE extra"
+ )
+ }
+
companion object {
const val TAG = "MediaProjectionAppSelectorActivity"
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/MediaProjectionAppSelectorComponent.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/MediaProjectionAppSelectorComponent.kt
index 11538fa..33d9cc3 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/MediaProjectionAppSelectorComponent.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/MediaProjectionAppSelectorComponent.kt
@@ -24,7 +24,6 @@
import com.android.launcher3.icons.IconFactory
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.media.MediaProjectionAppSelectorActivity
-import com.android.systemui.media.MediaProjectionAppSelectorActivity.Companion.EXTRA_HOST_APP_USER_HANDLE
import com.android.systemui.media.MediaProjectionPermissionActivity
import com.android.systemui.mediaprojection.appselector.data.ActivityTaskManagerLabelLoader
import com.android.systemui.mediaprojection.appselector.data.ActivityTaskManagerThumbnailLoader
@@ -118,29 +117,8 @@
@Provides
@MediaProjectionAppSelector
@MediaProjectionAppSelectorScope
- fun provideCallerPackageName(activity: MediaProjectionAppSelectorActivity): String? =
- activity.callingPackage
-
- @Provides
- @MediaProjectionAppSelector
- @MediaProjectionAppSelectorScope
- fun bindConfigurationController(
- activity: MediaProjectionAppSelectorActivity
- ): ConfigurationController = ConfigurationControllerImpl(activity)
-
- @Provides
- @HostUserHandle
- @MediaProjectionAppSelectorScope
- fun hostUserHandle(activity: MediaProjectionAppSelectorActivity): UserHandle {
- val extras =
- activity.intent.extras
- ?: error("MediaProjectionAppSelectorActivity should be launched with extras")
- return extras.getParcelable(EXTRA_HOST_APP_USER_HANDLE)
- ?: error(
- "MediaProjectionAppSelectorActivity should be provided with " +
- "$EXTRA_HOST_APP_USER_HANDLE extra"
- )
- }
+ fun bindConfigurationController(context: Context): ConfigurationController =
+ ConfigurationControllerImpl(context)
@Provides fun bindIconFactory(context: Context): IconFactory = IconFactory.obtain(context)
@@ -161,7 +139,8 @@
interface Factory {
/** Create a factory to inject the activity into the graph */
fun create(
- @BindsInstance activity: MediaProjectionAppSelectorActivity,
+ @BindsInstance @HostUserHandle hostUserHandle: UserHandle,
+ @BindsInstance @MediaProjectionAppSelector callingPackage: String?,
@BindsInstance view: MediaProjectionAppSelectorView,
@BindsInstance resultHandler: MediaProjectionAppSelectorResultHandler,
): MediaProjectionAppSelectorComponent
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
index cef52e7..d0ceaf6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
@@ -117,7 +117,6 @@
import java.util.List;
import java.util.Objects;
import java.util.Optional;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.function.Supplier;
@@ -492,9 +491,9 @@
notifySystemUiStateFlags(mSysUiState.getFlags());
notifyConnectionChanged();
- if (mLatchForOnUserChanging != null) {
- mLatchForOnUserChanging.countDown();
- mLatchForOnUserChanging = null;
+ if (mDoneUserChanging != null) {
+ mDoneUserChanging.run();
+ mDoneUserChanging = null;
}
}
@@ -550,14 +549,14 @@
}
};
- private CountDownLatch mLatchForOnUserChanging;
+ private Runnable mDoneUserChanging;
private final UserTracker.Callback mUserChangedCallback =
new UserTracker.Callback() {
@Override
public void onUserChanging(int newUser, @NonNull Context userContext,
- CountDownLatch latch) {
+ @NonNull Runnable resultCallback) {
mConnectionBackoffAttempts = 0;
- mLatchForOnUserChanging = latch;
+ mDoneUserChanging = resultCallback;
internalConnectToCurrentUser("User changed");
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
index acb6d96..7a0c087 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
@@ -151,10 +151,9 @@
return flags.isEnabled(Flags.WM_ENABLE_PARTIAL_SCREEN_SHARING)
? new ScreenRecordPermissionDialog(context, getHostUserHandle(), this,
- activityStarter, dialogLaunchAnimator, mUserContextProvider,
- onStartRecordingClicked)
- : new ScreenRecordDialog(context, this, activityStarter,
- mUserContextProvider, flags, dialogLaunchAnimator, onStartRecordingClicked);
+ activityStarter, mUserContextProvider, onStartRecordingClicked)
+ : new ScreenRecordDialog(context, this, mUserContextProvider,
+ onStartRecordingClicked);
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java
index 2a21aaa..91e3b60 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java
@@ -18,7 +18,6 @@
import static android.app.Activity.RESULT_OK;
-import static com.android.systemui.media.MediaProjectionAppSelectorActivity.EXTRA_CAPTURE_REGION_RESULT_RECEIVER;
import static com.android.systemui.media.MediaProjectionAppSelectorActivity.KEY_CAPTURE_TARGET;
import static com.android.systemui.screenrecord.ScreenRecordingAudioSource.INTERNAL;
import static com.android.systemui.screenrecord.ScreenRecordingAudioSource.MIC;
@@ -28,13 +27,11 @@
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
-import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.ResultReceiver;
import android.view.Gravity;
-import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
@@ -45,13 +42,7 @@
import androidx.annotation.Nullable;
import com.android.systemui.R;
-import com.android.systemui.animation.ActivityLaunchAnimator;
-import com.android.systemui.animation.DialogLaunchAnimator;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
-import com.android.systemui.media.MediaProjectionAppSelectorActivity;
import com.android.systemui.media.MediaProjectionCaptureTarget;
-import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.settings.UserContextProvider;
import com.android.systemui.statusbar.phone.SystemUIDialog;
@@ -71,23 +62,15 @@
private final UserContextProvider mUserContextProvider;
@Nullable
private final Runnable mOnStartRecordingClicked;
- private final ActivityStarter mActivityStarter;
- private final FeatureFlags mFlags;
- private final DialogLaunchAnimator mDialogLaunchAnimator;
private Switch mTapsSwitch;
private Switch mAudioSwitch;
private Spinner mOptions;
public ScreenRecordDialog(Context context, RecordingController controller,
- ActivityStarter activityStarter, UserContextProvider userContextProvider,
- FeatureFlags flags, DialogLaunchAnimator dialogLaunchAnimator,
- @Nullable Runnable onStartRecordingClicked) {
+ UserContextProvider userContextProvider, @Nullable Runnable onStartRecordingClicked) {
super(context);
mController = controller;
mUserContextProvider = userContextProvider;
- mActivityStarter = activityStarter;
- mDialogLaunchAnimator = dialogLaunchAnimator;
- mFlags = flags;
mOnStartRecordingClicked = onStartRecordingClicked;
}
@@ -120,31 +103,6 @@
dismiss();
});
- if (mFlags.isEnabled(Flags.WM_ENABLE_PARTIAL_SCREEN_SHARING)) {
- TextView appBtn = findViewById(R.id.button_app);
-
- appBtn.setVisibility(View.VISIBLE);
- appBtn.setOnClickListener(v -> {
- Intent intent = new Intent(getContext(), MediaProjectionAppSelectorActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
- // We can't start activity for result here so we use result receiver to get
- // the selected target to capture
- intent.putExtra(EXTRA_CAPTURE_REGION_RESULT_RECEIVER,
- new CaptureTargetResultReceiver());
-
- ActivityLaunchAnimator.Controller animationController =
- mDialogLaunchAnimator.createActivityLaunchController(appBtn);
-
- if (animationController == null) {
- dismiss();
- }
-
- mActivityStarter.startActivity(intent, /* dismissShade= */ true,
- animationController);
- });
- }
-
mAudioSwitch = findViewById(R.id.screenrecord_audio_switch);
mTapsSwitch = findViewById(R.id.screenrecord_taps_switch);
mOptions = findViewById(R.id.screen_recording_options);
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt
index 9c5da10..56d732e 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt
@@ -33,7 +33,6 @@
import android.widget.Switch
import androidx.annotation.LayoutRes
import com.android.systemui.R
-import com.android.systemui.animation.DialogLaunchAnimator
import com.android.systemui.media.MediaProjectionAppSelectorActivity
import com.android.systemui.media.MediaProjectionCaptureTarget
import com.android.systemui.plugins.ActivityStarter
@@ -45,7 +44,6 @@
private val hostUserHandle: UserHandle,
private val controller: RecordingController,
private val activityStarter: ActivityStarter,
- private val dialogLaunchAnimator: DialogLaunchAnimator,
private val userContextProvider: UserContextProvider,
private val onStartRecordingClicked: Runnable?
) :
@@ -85,12 +83,7 @@
MediaProjectionAppSelectorActivity.EXTRA_HOST_APP_USER_HANDLE,
hostUserHandle
)
-
- val animationController = dialogLaunchAnimator.createActivityLaunchController(v!!)
- if (animationController == null) {
- dismiss()
- }
- activityStarter.startActivity(intent, /* dismissShade= */ true, animationController)
+ activityStarter.startActivity(intent, /* dismissShade= */ true)
}
dismiss()
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
index 93a3e90..bd592c9 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
+++ b/packages/SystemUI/src/com/android/systemui/settings/UserTracker.kt
@@ -19,7 +19,6 @@
import android.content.Context
import android.content.pm.UserInfo
import android.os.UserHandle
-import java.util.concurrent.CountDownLatch
import java.util.concurrent.Executor
/**
@@ -68,8 +67,8 @@
interface Callback {
/**
- * Same as {@link onUserChanging(Int, Context, CountDownLatch)} but the latch will be
- * auto-decremented after the completion of this method.
+ * Same as {@link onUserChanging(Int, Context, Runnable)} but the callback will be
+ * called automatically after the completion of this method.
*/
fun onUserChanging(newUser: Int, userContext: Context) {}
@@ -78,12 +77,12 @@
* Override this method to run things while the screen is frozen for the user switch.
* Please use {@link #onUserChanged} if the task doesn't need to push the unfreezing of the
* screen further. Please be aware that code executed in this callback will lengthen the
- * user switch duration. When overriding this method, countDown() MUST be called on the
- * latch once execution is complete.
+ * user switch duration. When overriding this method, resultCallback#run() MUST be called
+ * once the execution is complete.
*/
- fun onUserChanging(newUser: Int, userContext: Context, latch: CountDownLatch) {
+ fun onUserChanging(newUser: Int, userContext: Context, resultCallback: Runnable) {
onUserChanging(newUser, userContext)
- latch.countDown()
+ resultCallback.run()
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/settings/UserTrackerImpl.kt b/packages/SystemUI/src/com/android/systemui/settings/UserTrackerImpl.kt
index 5fb3c01..2f87301 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/UserTrackerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/settings/UserTrackerImpl.kt
@@ -33,11 +33,22 @@
import androidx.annotation.WorkerThread
import com.android.systemui.Dumpable
import com.android.systemui.dump.DumpManager
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
import com.android.systemui.util.Assert
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.asCoroutineDispatcher
+import kotlinx.coroutines.coroutineScope
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.sync.Mutex
import java.io.PrintWriter
import java.lang.ref.WeakReference
import java.util.concurrent.CountDownLatch
import java.util.concurrent.Executor
+import javax.inject.Provider
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
@@ -58,20 +69,26 @@
*/
open class UserTrackerImpl internal constructor(
private val context: Context,
+ private val featureFlagsProvider: Provider<FeatureFlagsClassic>,
private val userManager: UserManager,
private val iActivityManager: IActivityManager,
private val dumpManager: DumpManager,
- private val backgroundHandler: Handler
+ private val appScope: CoroutineScope,
+ private val backgroundContext: CoroutineDispatcher,
+ private val backgroundHandler: Handler,
) : UserTracker, Dumpable, BroadcastReceiver() {
companion object {
private const val TAG = "UserTrackerImpl"
+ private const val USER_CHANGE_THRESHOLD = 5L * 1000 // 5 sec
}
var initialized = false
private set
private val mutex = Any()
+ private val isBackgroundUserSwitchEnabled: Boolean get() =
+ featureFlagsProvider.get().isEnabled(Flags.USER_TRACKER_BACKGROUND_CALLBACKS)
override var userId: Int by SynchronizedDelegate(context.userId)
protected set
@@ -103,6 +120,10 @@
@GuardedBy("callbacks")
private val callbacks: MutableList<DataItem> = ArrayList()
+ private var beforeUserSwitchingJob: Job? = null
+ private var userSwitchingJob: Job? = null
+ private var afterUserSwitchingJob: Job? = null
+
open fun initialize(startingUser: Int) {
if (initialized) {
return
@@ -119,7 +140,7 @@
addAction(Intent.ACTION_MANAGED_PROFILE_REMOVED)
addAction(Intent.ACTION_MANAGED_PROFILE_UNLOCKED)
}
- context.registerReceiverForAllUsers(this, filter, null /* permission */, backgroundHandler)
+ context.registerReceiverForAllUsers(this, filter, null, backgroundHandler)
registerUserSwitchObserver()
@@ -162,16 +183,39 @@
private fun registerUserSwitchObserver() {
iActivityManager.registerUserSwitchObserver(object : UserSwitchObserver() {
override fun onBeforeUserSwitching(newUserId: Int) {
- handleBeforeUserSwitching(newUserId)
+ if (isBackgroundUserSwitchEnabled) {
+ beforeUserSwitchingJob?.cancel()
+ beforeUserSwitchingJob = appScope.launch(backgroundContext) {
+ handleBeforeUserSwitching(newUserId)
+ }
+ } else {
+ handleBeforeUserSwitching(newUserId)
+ }
}
override fun onUserSwitching(newUserId: Int, reply: IRemoteCallback?) {
- handleUserSwitching(newUserId)
- reply?.sendResult(null)
+ if (isBackgroundUserSwitchEnabled) {
+ userSwitchingJob?.cancel()
+ userSwitchingJob = appScope.launch(backgroundContext) {
+ handleUserSwitchingCoroutines(newUserId) {
+ reply?.sendResult(null)
+ }
+ }
+ } else {
+ handleUserSwitching(newUserId)
+ reply?.sendResult(null)
+ }
}
override fun onUserSwitchComplete(newUserId: Int) {
- handleUserSwitchComplete(newUserId)
+ if (isBackgroundUserSwitchEnabled) {
+ afterUserSwitchingJob?.cancel()
+ afterUserSwitchingJob = appScope.launch(backgroundContext) {
+ handleUserSwitchComplete(newUserId)
+ }
+ } else {
+ handleUserSwitchComplete(newUserId)
+ }
}
}, TAG)
}
@@ -195,7 +239,7 @@
val callback = it.callback.get()
if (callback != null) {
it.executor.execute {
- callback.onUserChanging(userId, userContext, latch)
+ callback.onUserChanging(userId, userContext) { latch.countDown() }
}
} else {
latch.countDown()
@@ -205,6 +249,28 @@
}
@WorkerThread
+ protected open suspend fun handleUserSwitchingCoroutines(newUserId: Int, onDone: () -> Unit) =
+ coroutineScope {
+ Assert.isNotMainThread()
+ Log.i(TAG, "Switching to user $newUserId")
+
+ for (callbackDataItem in synchronized(callbacks) { callbacks.toList() }) {
+ val callback: UserTracker.Callback = callbackDataItem.callback.get() ?: continue
+ launch(callbackDataItem.executor.asCoroutineDispatcher()) {
+ val mutex = Mutex(true)
+ val thresholdLogJob = launch(backgroundContext) {
+ delay(USER_CHANGE_THRESHOLD)
+ Log.e(TAG, "Failed to finish $callback in time")
+ }
+ callback.onUserChanging(userId, userContext) { mutex.unlock() }
+ mutex.lock()
+ thresholdLogJob.cancel()
+ }.join()
+ }
+ onDone()
+ }
+
+ @WorkerThread
protected open fun handleUserSwitchComplete(newUserId: Int) {
Assert.isNotMainThread()
Log.i(TAG, "Switched to user $newUserId")
diff --git a/packages/SystemUI/src/com/android/systemui/settings/dagger/MultiUserUtilsModule.java b/packages/SystemUI/src/com/android/systemui/settings/dagger/MultiUserUtilsModule.java
index e9a1dd7..a0dd924 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/dagger/MultiUserUtilsModule.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/dagger/MultiUserUtilsModule.java
@@ -25,8 +25,10 @@
import com.android.systemui.CoreStartable;
import com.android.systemui.dagger.SysUISingleton;
+import com.android.systemui.dagger.qualifiers.Application;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dump.DumpManager;
+import com.android.systemui.flags.FeatureFlagsClassic;
import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.DisplayTrackerImpl;
import com.android.systemui.settings.UserContentResolverProvider;
@@ -42,6 +44,11 @@
import dagger.multibindings.ClassKey;
import dagger.multibindings.IntoMap;
+import javax.inject.Provider;
+
+import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.CoroutineScope;
+
/**
* Dagger Module for classes found within the com.android.systemui.settings package.
*/
@@ -60,14 +67,17 @@
@Provides
static UserTracker provideUserTracker(
Context context,
+ Provider<FeatureFlagsClassic> featureFlagsProvider,
UserManager userManager,
IActivityManager iActivityManager,
DumpManager dumpManager,
+ @Application CoroutineScope appScope,
+ @Background CoroutineDispatcher backgroundDispatcher,
@Background Handler handler
) {
int startingUser = ActivityManager.getCurrentUser();
- UserTrackerImpl tracker = new UserTrackerImpl(context, userManager, iActivityManager,
- dumpManager, handler);
+ UserTrackerImpl tracker = new UserTrackerImpl(context, featureFlagsProvider, userManager,
+ iActivityManager, dumpManager, appScope, backgroundDispatcher, handler);
tracker.initialize(startingUser);
return tracker;
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 4fc7f29..88ee8da 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -586,6 +586,8 @@
private boolean mGestureWaitForTouchSlop;
private boolean mIgnoreXTouchSlop;
private boolean mExpandLatencyTracking;
+ private boolean mUseExternalTouch = false;
+
/**
* Whether we're waking up and will play the delayed doze animation in
* {@link NotificationWakeUpCoordinator}. If so, we'll want to keep the clock centered until the
@@ -1404,13 +1406,6 @@
updateViewControllers(userAvatarView, keyguardUserSwitcherView);
- if (mFeatureFlags.isEnabled(Flags.MIGRATE_KEYGUARD_STATUS_VIEW) && !mFeatureFlags.isEnabled(
- Flags.LAZY_INFLATE_KEYGUARD)) {
- attachSplitShadeMediaPlayerContainer(
- mKeyguardViewConfigurator.getKeyguardRootView()
- .findViewById(R.id.status_view_media_container));
- }
-
if (!mFeatureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
// Update keyguard bottom area
int index = mView.indexOfChild(mKeyguardBottomArea);
@@ -1680,6 +1675,10 @@
@ClockSize
private int computeDesiredClockSize() {
+ if (shouldForceSmallClock()) {
+ return SMALL;
+ }
+
if (mSplitShadeEnabled) {
return computeDesiredClockSizeForSplitShade();
}
@@ -1712,6 +1711,13 @@
return LARGE;
}
+ private boolean shouldForceSmallClock() {
+ return mFeatureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)
+ && !isOnAod()
+ // True on small landscape screens
+ && mResources.getBoolean(R.bool.force_small_clock_on_lockscreen);
+ }
+
private void updateKeyguardStatusViewAlignment(boolean animate) {
boolean shouldBeCentered = shouldKeyguardStatusViewBeCentered();
ConstraintLayout layout;
@@ -4122,12 +4128,22 @@
/** Sends an external (e.g. Status Bar) intercept touch event to the Shade touch handler. */
boolean handleExternalInterceptTouch(MotionEvent event) {
- return mTouchHandler.onInterceptTouchEvent(event);
+ try {
+ mUseExternalTouch = true;
+ return mTouchHandler.onInterceptTouchEvent(event);
+ } finally {
+ mUseExternalTouch = false;
+ }
}
@Override
public boolean handleExternalTouch(MotionEvent event) {
- return mTouchHandler.onTouchEvent(event);
+ try {
+ mUseExternalTouch = true;
+ return mTouchHandler.onTouchEvent(event);
+ } finally {
+ mUseExternalTouch = false;
+ }
}
@Override
@@ -4714,9 +4730,20 @@
public final class TouchHandler implements View.OnTouchListener, Gefingerpoken {
private long mLastTouchDownTime = -1L;
- /** @see ViewGroup#onInterceptTouchEvent(MotionEvent) */
+ /**
+ * With the shade and lockscreen being separated in the view hierarchy, touch handling now
+ * originates with the parent window through {@link #handleExternalTouch}. This allows for
+ * parity with the legacy hierarchy while not undertaking a massive refactoring of touch
+ * handling.
+ *
+ * @see NotificationShadeWindowViewController#didNotificationPanelInterceptEvent
+ */
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
+ if (mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL) && !mUseExternalTouch) {
+ return false;
+ }
+
mShadeLog.logMotionEvent(event, "NPVC onInterceptTouchEvent");
if (mQsController.disallowTouches()) {
mShadeLog.logMotionEvent(event,
@@ -4869,8 +4896,20 @@
return onTouchEvent(event);
}
+ /**
+ * With the shade and lockscreen being separated in the view hierarchy, touch handling now
+ * originates with the parent window through {@link #handleExternalTouch}. This allows for
+ * parity with the legacy hierarchy while not undertaking a massive refactoring of touch
+ * handling.
+ *
+ * @see NotificationShadeWindowViewController#didNotificationPanelInterceptEvent
+ */
@Override
public boolean onTouchEvent(MotionEvent event) {
+ if (mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL) && !mUseExternalTouch) {
+ return false;
+ }
+
if (event.getAction() == MotionEvent.ACTION_DOWN) {
if (event.getDownTime() == mLastTouchDownTime) {
// An issue can occur when swiping down after unlock, where multiple down
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
index 880ba92..96fae14 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
@@ -267,6 +267,9 @@
}
mView.setLayoutInsetsController(mNotificationInsetsController);
mView.setInteractionEventHandler(new NotificationShadeWindowView.InteractionEventHandler() {
+ boolean mUseDragDownHelperForTouch = false;
+ boolean mLastInterceptWasDragDownHelper = false;
+
@Override
public Boolean handleDispatchTouchEvent(MotionEvent ev) {
if (mStatusBarViewController == null) { // Fix for b/192490822
@@ -360,10 +363,8 @@
);
// In case we start outside of the view bounds (below the status bar), we need to
- // dispatch
- // the touch manually as the view system can't accommodate for touches outside of
- // the
- // regular view bounds.
+ // dispatch the touch manually as the view system can't accommodate for touches
+ // outside of the regular view bounds.
if (isDown && ev.getY() >= mView.getBottom()) {
mExpandingBelowNotch = true;
expandingBelowNotch = true;
@@ -405,6 +406,15 @@
@Override
public boolean shouldInterceptTouchEvent(MotionEvent ev) {
+ boolean intercepted = shouldInterceptTouchEventInternal(ev);
+ if (intercepted) {
+ mUseDragDownHelperForTouch = mLastInterceptWasDragDownHelper;
+ }
+ return intercepted;
+ }
+
+ private boolean shouldInterceptTouchEventInternal(MotionEvent ev) {
+ mLastInterceptWasDragDownHelper = false;
if (mStatusBarStateController.isDozing() && !mDozeServiceHost.isPulsing()
&& !mDockManager.isDocked()) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
@@ -431,19 +441,36 @@
}
if (mNotificationPanelViewController.isFullyExpanded()
- && mDragDownHelper.isDragDownEnabled()
&& !mService.isBouncerShowing()
&& !mStatusBarStateController.isDozing()) {
- boolean result = mDragDownHelper.onInterceptTouchEvent(ev);
- if (result) {
- if (ev.getAction() == MotionEvent.ACTION_DOWN) {
- mShadeLogger.d("NSWVC: drag down helper intercepted");
+ if (mDragDownHelper.isDragDownEnabled()) {
+ // This handles drag down over lockscreen
+ boolean result = mDragDownHelper.onInterceptTouchEvent(ev);
+ if (mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ if (result) {
+ mLastInterceptWasDragDownHelper = true;
+ if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ mShadeLogger.d("NSWVC: drag down helper intercepted");
+ }
+ } else if (didNotificationPanelInterceptEvent(ev)) {
+ return true;
+ }
+ } else {
+ if (result) {
+ if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ mShadeLogger.d("NSWVC: drag down helper intercepted");
+ }
+ }
+ }
+ return result;
+ } else {
+ // This else handles interactions on the full shade while unlocked
+ if (didNotificationPanelInterceptEvent(ev)) {
+ return true;
}
}
- return result;
- } else {
- return false;
}
+ return false;
}
@Override
@@ -451,7 +478,9 @@
MotionEvent cancellation = MotionEvent.obtain(ev);
cancellation.setAction(MotionEvent.ACTION_CANCEL);
mStackScrollLayout.onInterceptTouchEvent(cancellation);
- mNotificationPanelViewController.handleExternalInterceptTouch(cancellation);
+ if (!mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ mNotificationPanelViewController.handleExternalInterceptTouch(cancellation);
+ }
cancellation.recycle();
}
@@ -461,18 +490,27 @@
if (mStatusBarStateController.isDozing()) {
handled = !mDozeServiceHost.isPulsing();
}
-
if (mStatusBarKeyguardViewManager.onTouch(ev)) {
return true;
}
-
- if (mDragDownHelper.isDragDownEnabled()
- || mDragDownHelper.isDraggingDown()) {
- // we still want to finish our drag down gesture when locking the screen
- return mDragDownHelper.onTouchEvent(ev) || handled;
+ if (mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ if (mLastInterceptWasDragDownHelper && (mDragDownHelper.isDraggingDown())) {
+ // we still want to finish our drag down gesture when locking the screen
+ handled |= mDragDownHelper.onTouchEvent(ev) || handled;
+ }
+ if (!handled && mNotificationPanelViewController.handleExternalTouch(ev)) {
+ return true;
+ }
} else {
- return handled;
+ if (mDragDownHelper.isDragDownEnabled()
+ || mDragDownHelper.isDraggingDown()) {
+ // we still want to finish our drag down gesture when locking the screen
+ return mDragDownHelper.onTouchEvent(ev) || handled;
+ } else {
+ return handled;
+ }
}
+ return handled;
}
@Override
@@ -520,6 +558,20 @@
mDepthController.onPanelExpansionChanged(currentState);
}
+ private boolean didNotificationPanelInterceptEvent(MotionEvent ev) {
+ if (mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ // Since NotificationStackScrollLayout is now a sibling of notification_panel, we need
+ // to also ask NotificationPanelViewController directly, in order to process swipe up
+ // events originating from notifications
+ if (mNotificationPanelViewController.handleExternalInterceptTouch(ev)) {
+ mShadeLogger.d("NSWVC: NPVC intercepted");
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public NotificationShadeWindowView getView() {
return mView;
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
index bdf114e..3873ac4 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
@@ -129,6 +129,9 @@
mView.setStackScroller(notificationStackScrollLayoutController.getView())
mView.setMigratingNSSL(featureFlags.isEnabled(Flags.MIGRATE_NSSL))
+ if (featureFlags.isEnabled(Flags.QS_CONTAINER_GRAPH_OPTIMIZER)){
+ mView.enableGraphOptimization()
+ }
}
public override fun onViewAttached() {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQuickSettingsContainer.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQuickSettingsContainer.java
index a4e439b..292cf8e 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQuickSettingsContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQuickSettingsContainer.java
@@ -16,6 +16,8 @@
package com.android.systemui.shade;
+import static androidx.constraintlayout.core.widgets.Optimizer.OPTIMIZATION_GRAPH;
+
import android.app.Fragment;
import android.content.Context;
import android.content.res.Configuration;
@@ -24,7 +26,6 @@
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewGroup.MarginLayoutParams;
import android.view.WindowInsets;
import androidx.annotation.Nullable;
@@ -183,6 +184,10 @@
mIsMigratingNSSL = isMigrating;
}
+ void enableGraphOptimization() {
+ setOptimizationLevel(getOptimizationLevel() | OPTIMIZATION_GRAPH);
+ }
+
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
return TouchLogger.logDispatchTouch("NotificationsQuickSettingsContainer", ev,
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index ff0d78f8..d653cb4 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -70,6 +70,7 @@
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlags;
+import com.android.systemui.flags.Flags;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor;
import com.android.systemui.media.controls.pipeline.MediaDataManager;
@@ -1776,7 +1777,9 @@
// Dragging down on the lockscreen statusbar should prohibit other interactions
// immediately, otherwise we'll wait on the touchslop. This is to allow
// dragging down to expanded quick settings directly on the lockscreen.
- mPanelView.getParent().requestDisallowInterceptTouchEvent(true);
+ if (!mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ mPanelView.getParent().requestDisallowInterceptTouchEvent(true);
+ }
}
if (mExpansionAnimator != null) {
mInitialHeightOnTouch = mExpansionHeight;
@@ -1819,7 +1822,9 @@
&& Math.abs(h) > Math.abs(x - mInitialTouchX)
&& shouldQuickSettingsIntercept(
mInitialTouchX, mInitialTouchY, h)) {
- mPanelView.getParent().requestDisallowInterceptTouchEvent(true);
+ if (!mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ mPanelView.getParent().requestDisallowInterceptTouchEvent(true);
+ }
mShadeLog.onQsInterceptMoveQsTrackingEnabled(h);
setTracking(true);
traceQsJank(true, false);
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
index 9a356ad..19a4ee8 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
@@ -484,11 +484,13 @@
if (largeScreenActive) {
logInstantEvent("Large screen constraints set")
header.setTransition(LARGE_SCREEN_HEADER_TRANSITION_ID)
+ systemIconsHoverContainer.isClickable = true
systemIconsHoverContainer.setOnClickListener { shadeCollapseAction?.run() }
} else {
logInstantEvent("Small screen constraints set")
header.setTransition(HEADER_TRANSITION_ID)
systemIconsHoverContainer.setOnClickListener(null)
+ systemIconsHoverContainer.isClickable = false
}
header.jumpToState(header.startState)
updatePosition()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
index 1b790fd..cb21291 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
@@ -188,12 +188,6 @@
return super.onInterceptTouchEvent(ev);
}
- /**
- * Called by the TouchHandler when this view is tapped. This will be called for actual taps
- * only, i.e. taps that have been filtered by the FalsingManager.
- */
- public void onTap() {}
-
/** Sets the last action up time this view was touched. */
public void setLastActionUpTime(long eventTime) {
mLastActionUpTime = eventTime;
@@ -227,10 +221,6 @@
mBackgroundNormal.setState(getDrawableState());
}
- void setRippleAllowed(boolean allowed) {
- mBackgroundNormal.setPressedAllowed(allowed);
- }
-
private void updateOutlineAlpha() {
float alpha = NotificationStackScrollLayout.BACKGROUND_ALPHA_DIMMED;
alpha = (alpha + (1.0f - alpha) * mNormalBackgroundVisibilityAmount);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java
index 028cd18..ded5ee4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java
@@ -80,11 +80,7 @@
if (ev.getAction() == MotionEvent.ACTION_UP) {
// If this is a false tap, capture the even so it doesn't result in a click.
- boolean falseTap = mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY);
- if (!falseTap && v instanceof ActivatableNotificationView) {
- ((ActivatableNotificationView) v).onTap();
- }
- return falseTap;
+ return mFalsingManager.isFalseTap(FalsingManager.LOW_PENALTY);
}
return result;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 7fa955b..acece33 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -593,7 +593,6 @@
mPublicLayout.updateExpandButtons(true);
updateLimits();
updateShelfIconColor();
- updateRippleAllowed();
if (mUpdateSelfBackgroundOnUpdate) {
// Because this is triggered by UiMode change which we already propagated to children,
// we know that child rows will receive the same event, and will update their own
@@ -2570,31 +2569,8 @@
mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
}
}
- updateRippleAllowed();
}
- private void updateRippleAllowed() {
- boolean allowed = isOnKeyguard()
- || mEntry.getSbn().getNotification().contentIntent == null;
- setRippleAllowed(allowed);
- }
-
- @Override
- public void onTap() {
- // This notification will expand and animates into the content activity, so we disable the
- // ripple. We will restore its value once the tap/click is actually performed.
- if (mEntry.getSbn().getNotification().contentIntent != null) {
- setRippleAllowed(false);
- }
- }
-
- @Override
- public boolean performClick() {
- // We force-disabled the ripple in onTap. When this method is called, the code drawing the
- // ripple will already have been called so we can restore its value now.
- updateRippleAllowed();
- return super.performClick();
- }
@Override
public int getHeightWithoutLockscreenConstraints() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java
index 647505c..1fd4d12 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java
@@ -32,7 +32,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import com.android.internal.util.ArrayUtils;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
@@ -59,7 +58,6 @@
private int mExpandAnimationWidth = -1;
private int mExpandAnimationHeight = -1;
private int mDrawableAlpha = 255;
- private boolean mIsPressedAllowed;
public NotificationBackgroundView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -153,9 +151,17 @@
public void setTint(int tintColor) {
if (tintColor != 0) {
- mBackground.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP);
+ ColorStateList stateList = new ColorStateList(new int[][]{
+ new int[]{com.android.internal.R.attr.state_pressed},
+ new int[]{com.android.internal.R.attr.state_hovered},
+ new int[]{}},
+
+ new int[]{0, 0, tintColor}
+ );
+ mBackground.setTintMode(PorterDuff.Mode.SRC_ATOP);
+ mBackground.setTintList(stateList);
} else {
- mBackground.clearColorFilter();
+ mBackground.setTintList(null);
}
mTintColor = tintColor;
invalidate();
@@ -210,10 +216,6 @@
public void setState(int[] drawableState) {
if (mBackground != null && mBackground.isStateful()) {
- if (!mIsPressedAllowed) {
- drawableState = ArrayUtils.removeInt(drawableState,
- com.android.internal.R.attr.state_pressed);
- }
mBackground.setState(drawableState);
}
}
@@ -267,9 +269,12 @@
return;
}
if (mBackground instanceof LayerDrawable) {
- GradientDrawable gradientDrawable =
- (GradientDrawable) ((LayerDrawable) mBackground).getDrawable(0);
- gradientDrawable.setCornerRadii(mCornerRadii);
+ int numberOfLayers = ((LayerDrawable) mBackground).getNumberOfLayers();
+ for (int i = 0; i < numberOfLayers; i++) {
+ GradientDrawable gradientDrawable =
+ (GradientDrawable) ((LayerDrawable) mBackground).getDrawable(i);
+ gradientDrawable.setCornerRadii(mCornerRadii);
+ }
}
}
@@ -295,10 +300,6 @@
invalidate();
}
- public void setPressedAllowed(boolean allowed) {
- mIsPressedAllowed = allowed;
- }
-
@Override
public void dump(PrintWriter pw, @NonNull String[] args) {
pw.println("mDontModifyCorners: " + mDontModifyCorners);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
index 96547db..0c4ffe2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/PrecomputedTextViewFactory.kt
@@ -19,7 +19,6 @@
import android.content.Context
import android.util.AttributeSet
import android.view.View
-import android.widget.TextView
import com.android.internal.widget.ConversationLayout
import com.android.internal.widget.ImageFloatingTextView
import com.android.internal.widget.MessagingLayout
@@ -36,8 +35,6 @@
attrs: AttributeSet
): View? {
return when (name) {
- TextView::class.java.name,
- TextView::class.java.simpleName -> PrecomputedTextView(context, attrs)
ImageFloatingTextView::class.java.name ->
PrecomputedImageFloatingTextView(context, attrs)
MessagingLayout::class.java.name ->
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/ActivatableNotificationViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/ActivatableNotificationViewBinder.kt
index 54af107..9a54de1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/ActivatableNotificationViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/ActivatableNotificationViewBinder.kt
@@ -82,11 +82,7 @@
}
if (ev.action == MotionEvent.ACTION_UP) {
// If this is a false tap, capture the even so it doesn't result in a click.
- val falseTap: Boolean = falsingManager.isFalseTap(FalsingManager.LOW_PENALTY)
- if (!falseTap && v is ActivatableNotificationView) {
- v.onTap()
- }
- return falseTap
+ return falsingManager.isFalseTap(FalsingManager.LOW_PENALTY)
}
return result
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/SharedNotificationContainer.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/SharedNotificationContainer.kt
index 688843d..e52d604 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/SharedNotificationContainer.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/SharedNotificationContainer.kt
@@ -19,6 +19,7 @@
import android.content.Context
import android.util.AttributeSet
import android.view.View
+import androidx.constraintlayout.core.widgets.Optimizer
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
@@ -45,6 +46,7 @@
private val baseConstraintSet = ConstraintSet()
init {
+ optimizationLevel = optimizationLevel or Optimizer.OPTIMIZATION_GRAPH
baseConstraintSet.apply {
create(R.id.nssl_guideline, VERTICAL)
setGuidelinePercent(R.id.nssl_guideline, 0.5f)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index bbca234..fe95b23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -1545,7 +1545,9 @@
return (v, event) -> {
mAutoHideController.checkUserAutoHide(event);
mRemoteInputManager.checkRemoteInputOutside(event);
- mShadeController.onStatusBarTouch(event);
+ if (!mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)) {
+ mShadeController.onStatusBarTouch(event);
+ }
return getNotificationShadeWindowView().onTouchEvent(event);
};
}
@@ -2172,10 +2174,16 @@
// * When phone is unlocked: we still don't want to execute hiding of the keyguard
// as the animation could prepare 'fake AOD' interface (without actually
// transitioning to keyguard state) and this might reset the view states
+ // Log for b/290627350
+ Log.d(TAG, "!shouldBeKeyguard mStatusBarStateController.isKeyguardRequested() "
+ + mStatusBarStateController.isKeyguardRequested() + " keyguardForDozing "
+ + keyguardForDozing + " wakeAndUnlocking " + wakeAndUnlocking
+ + " isWakingAndOccluded " + isWakingAndOccluded);
if (!mScreenOffAnimationController.isKeyguardHideDelayed()
// If we're animating occluded, there's an activity launching over the keyguard
// UI. Wait to hide it until after the animation concludes.
&& !mKeyguardViewMediator.isOccludeAnimationPlaying()) {
+ Log.d(TAG, "hideKeyguardImpl " + forceStateChange);
return hideKeyguardImpl(forceStateChange);
}
}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 562d3a5..1d7c328 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -29,6 +29,7 @@
import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
import static android.telephony.SubscriptionManager.DATA_ROAMING_DISABLE;
import static android.telephony.SubscriptionManager.NAME_SOURCE_CARRIER_ID;
+
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
@@ -38,11 +39,17 @@
import static com.android.keyguard.KeyguardUpdateMonitor.DEFAULT_CANCEL_SIGNAL_TIMEOUT;
import static com.android.keyguard.KeyguardUpdateMonitor.HAL_POWER_PRESS_TIMEOUT;
import static com.android.keyguard.KeyguardUpdateMonitor.getCurrentUser;
+import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_ASLEEP;
+import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_AWAKE;
+import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_WAKING;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_OPENED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
+
import static com.google.common.truth.Truth.assertThat;
+
import static junit.framework.Assert.assertEquals;
+
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -139,6 +146,7 @@
import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dump.DumpManager;
+import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.settings.FakeDisplayTracker;
@@ -172,7 +180,6 @@
import java.util.List;
import java.util.Optional;
import java.util.Random;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@@ -276,6 +283,8 @@
private TaskStackChangeListeners mTaskStackChangeListeners;
@Mock
private IActivityTaskManager mActivityTaskManager;
+ @Mock
+ private WakefulnessLifecycle mWakefulness;
private List<FaceSensorPropertiesInternal> mFaceSensorProperties;
private List<FingerprintSensorPropertiesInternal> mFingerprintSensorProperties;
@@ -1363,7 +1372,7 @@
assertThat(mKeyguardUpdateMonitor.mUserFingerprintAuthenticated.size()).isEqualTo(1);
assertThat(mKeyguardUpdateMonitor.mUserFaceAuthenticated.size()).isEqualTo(1);
- mKeyguardUpdateMonitor.handleUserSwitching(10 /* user */, new CountDownLatch(0));
+ mKeyguardUpdateMonitor.handleUserSwitching(10 /* user */, () -> {});
assertThat(mKeyguardUpdateMonitor.mUserFingerprintAuthenticated.size()).isEqualTo(0);
assertThat(mKeyguardUpdateMonitor.mUserFaceAuthenticated.size()).isEqualTo(0);
}
@@ -2999,8 +3008,57 @@
// THEN face listening is stopped.
verify(faceCancel).cancel();
verify(callback).onBiometricRunningStateChanged(
- eq(false), eq(BiometricSourceType.FACE)); // beverlyt
+ eq(false), eq(BiometricSourceType.FACE));
+ }
+ @Test
+ public void onDisplayOff_whileAsleep_doesNotStopFaceAuth() throws RemoteException {
+ enableStopFaceAuthOnDisplayOff();
+ when(mWakefulness.getWakefulness()).thenReturn(WAKEFULNESS_ASLEEP);
+
+ // GIVEN device is listening for face
+ mKeyguardUpdateMonitor.setKeyguardShowing(true, false);
+ mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
+ mTestableLooper.processAllMessages();
+ verifyFaceAuthenticateCall();
+
+ final CancellationSignal faceCancel = spy(mKeyguardUpdateMonitor.mFaceCancelSignal);
+ mKeyguardUpdateMonitor.mFaceCancelSignal = faceCancel;
+ KeyguardUpdateMonitorCallback callback = mock(KeyguardUpdateMonitorCallback.class);
+ mKeyguardUpdateMonitor.registerCallback(callback);
+
+ // WHEN the default display state changes to OFF
+ triggerDefaultDisplayStateChangeToOff();
+
+ // THEN face listening is NOT stopped.
+ verify(faceCancel, never()).cancel();
+ verify(callback, never()).onBiometricRunningStateChanged(
+ eq(false), eq(BiometricSourceType.FACE));
+ }
+
+ @Test
+ public void onDisplayOff_whileWaking_doesNotStopFaceAuth() throws RemoteException {
+ enableStopFaceAuthOnDisplayOff();
+ when(mWakefulness.getWakefulness()).thenReturn(WAKEFULNESS_WAKING);
+
+ // GIVEN device is listening for face
+ mKeyguardUpdateMonitor.setKeyguardShowing(true, false);
+ mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
+ mTestableLooper.processAllMessages();
+ verifyFaceAuthenticateCall();
+
+ final CancellationSignal faceCancel = spy(mKeyguardUpdateMonitor.mFaceCancelSignal);
+ mKeyguardUpdateMonitor.mFaceCancelSignal = faceCancel;
+ KeyguardUpdateMonitorCallback callback = mock(KeyguardUpdateMonitorCallback.class);
+ mKeyguardUpdateMonitor.registerCallback(callback);
+
+ // WHEN the default display state changes to OFF
+ triggerDefaultDisplayStateChangeToOff();
+
+ // THEN face listening is NOT stopped.
+ verify(faceCancel, never()).cancel();
+ verify(callback, never()).onBiometricRunningStateChanged(
+ eq(false), eq(BiometricSourceType.FACE));
}
private void triggerDefaultDisplayStateChangeToOn() {
@@ -3307,6 +3365,7 @@
clearInvocations(mStatusBarStateController);
mKeyguardUpdateMonitor = new TestableKeyguardUpdateMonitor(mContext);
setupBiometrics(mKeyguardUpdateMonitor);
+ when(mWakefulness.getWakefulness()).thenReturn(WAKEFULNESS_AWAKE);
assertThat(mDisplayTracker.getDisplayCallbacks().size()).isEqualTo(1);
}
@@ -3387,7 +3446,8 @@
mPackageManager, mFaceManager, mFingerprintManager, mBiometricManager,
mFaceWakeUpTriggersConfig, mDevicePostureController,
Optional.of(mInteractiveToAuthProvider),
- mTaskStackChangeListeners, mActivityTaskManager, mDisplayTracker);
+ mTaskStackChangeListeners, mActivityTaskManager, mDisplayTracker,
+ mWakefulness);
setStrongAuthTracker(KeyguardUpdateMonitorTest.this.mStrongAuthTracker);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt
index d6b621e..7f4755d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt
@@ -23,8 +23,6 @@
import androidx.constraintlayout.widget.ConstraintSet
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
-import com.android.systemui.flags.FakeFeatureFlags
-import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.shared.model.KeyguardBlueprint
import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.keyguard.ui.view.KeyguardRootView
@@ -66,8 +64,6 @@
@Mock private lateinit var splitShadeGuidelines: SplitShadeGuidelines
@Mock private lateinit var aodNotificationIconsSection: AodNotificationIconsSection
- private val featureFlags = FakeFeatureFlags()
-
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
@@ -84,23 +80,13 @@
defaultNSSLSection,
splitShadeGuidelines,
aodNotificationIconsSection,
- featureFlags,
)
- featureFlags.set(Flags.LAZY_INFLATE_KEYGUARD, false)
}
@Test
fun replaceViews() {
val constraintLayout = ConstraintLayout(context, null)
underTest.replaceViews(null, constraintLayout)
- underTest.sections.forEach { verify(it, never()).addViews(constraintLayout) }
- }
-
- @Test
- fun replaceViews_lazyInflateFlagOn() {
- featureFlags.set(Flags.LAZY_INFLATE_KEYGUARD, true)
- val constraintLayout = ConstraintLayout(context, null)
- underTest.replaceViews(null, constraintLayout)
underTest.sections.forEach { verify(it).addViews(constraintLayout) }
}
@@ -110,7 +96,6 @@
val someSection = mock(KeyguardSection::class.java)
whenever(prevBlueprint.sections)
.thenReturn(underTest.sections.minus(defaultLockIconSection).plus(someSection))
- featureFlags.set(Flags.LAZY_INFLATE_KEYGUARD, true)
val constraintLayout = ConstraintLayout(context, null)
underTest.replaceViews(prevBlueprint, constraintLayout)
underTest.sections.minus(defaultLockIconSection).forEach {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordDialogTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordDialogTest.kt
deleted file mode 100644
index 03d9444..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordDialogTest.kt
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.screenrecord
-
-import android.testing.AndroidTestingRunner
-import android.testing.TestableLooper
-import android.view.View
-import androidx.test.filters.SmallTest
-import com.android.systemui.R
-import com.android.systemui.SysuiTestCase
-import com.android.systemui.animation.DialogLaunchAnimator
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
-import com.android.systemui.plugins.ActivityStarter
-import com.android.systemui.settings.UserContextProvider
-import com.google.common.truth.Truth.assertThat
-import org.junit.After
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.Mock
-import org.mockito.MockitoAnnotations
-import org.mockito.Mockito.`when` as whenever
-
-@SmallTest
-@RunWith(AndroidTestingRunner::class)
-@TestableLooper.RunWithLooper(setAsMainLooper = true)
-class ScreenRecordDialogTest : SysuiTestCase() {
-
- @Mock
- private lateinit var starter: ActivityStarter
- @Mock
- private lateinit var controller: RecordingController
- @Mock
- private lateinit var userContextProvider: UserContextProvider
- @Mock
- private lateinit var flags: FeatureFlags
- @Mock
- private lateinit var dialogLaunchAnimator: DialogLaunchAnimator
- @Mock
- private lateinit var onStartRecordingClicked: Runnable
-
- private lateinit var dialog: ScreenRecordDialog
-
- @Before
- fun setUp() {
- MockitoAnnotations.initMocks(this)
-
- dialog = ScreenRecordDialog(
- context, controller, starter, userContextProvider, flags, dialogLaunchAnimator,
- onStartRecordingClicked
- )
- }
-
- @After
- fun teardown() {
- if (::dialog.isInitialized) {
- dialog.dismiss()
- }
- }
-
- @Test
- fun testShowDialog_partialScreenSharingDisabled_appButtonIsNotVisible() {
- whenever(flags.isEnabled(Flags.WM_ENABLE_PARTIAL_SCREEN_SHARING)).thenReturn(false)
-
- dialog.show()
-
- val visibility = dialog.requireViewById<View>(R.id.button_app).visibility
- assertThat(visibility).isEqualTo(View.GONE)
- }
-
- @Test
- fun testShowDialog_partialScreenSharingEnabled_appButtonIsVisible() {
- whenever(flags.isEnabled(Flags.WM_ENABLE_PARTIAL_SCREEN_SHARING)).thenReturn(true)
-
- dialog.show()
-
- val visibility = dialog.requireViewById<View>(R.id.button_app).visibility
- assertThat(visibility).isEqualTo(View.VISIBLE)
- }
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogTest.kt
index ad6909d..a6c25be 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogTest.kt
@@ -24,7 +24,6 @@
import androidx.test.filters.SmallTest
import com.android.systemui.R
import com.android.systemui.SysuiTestCase
-import com.android.systemui.animation.DialogLaunchAnimator
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.plugins.ActivityStarter
@@ -36,8 +35,8 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
-import org.mockito.Mockito.`when` as whenever
import org.mockito.MockitoAnnotations
+import org.mockito.Mockito.`when` as whenever
@SmallTest
@RunWith(AndroidTestingRunner::class)
@@ -48,7 +47,6 @@
@Mock private lateinit var controller: RecordingController
@Mock private lateinit var userContextProvider: UserContextProvider
@Mock private lateinit var flags: FeatureFlags
- @Mock private lateinit var dialogLaunchAnimator: DialogLaunchAnimator
@Mock private lateinit var onStartRecordingClicked: Runnable
private lateinit var dialog: ScreenRecordPermissionDialog
@@ -63,7 +61,6 @@
UserHandle.of(0),
controller,
starter,
- dialogLaunchAnimator,
userContextProvider,
onStartRecordingClicked
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
index beb981d..1bb2ff8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
@@ -11,10 +11,13 @@
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.DumpManager
+import com.android.systemui.flags.FakeFeatureFlagsClassic
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.capture
import com.google.common.truth.Truth.assertThat
import java.util.concurrent.Executor
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -60,6 +63,9 @@
@Mock private lateinit var callback: UserTracker.Callback
@Captor private lateinit var captor: ArgumentCaptor<List<UserInfo>>
+ private val fakeFeatures = FakeFeatureFlagsClassic()
+ private val testDispatcher = StandardTestDispatcher()
+
private lateinit var tracker: UserTrackerImpl
@Before
@@ -68,12 +74,21 @@
`when`(context.user).thenReturn(UserHandle.SYSTEM)
`when`(context.createContextAsUser(ArgumentMatchers.any(), anyInt())).thenReturn(context)
-
- tracker = UserTrackerImpl(context, userManager, iActivityManager, dumpManager, handler)
}
@Test
- fun callsCallbackAndUpdatesProfilesWhenAnIntentReceived() {
+ fun callsCallbackAndUpdatesProfilesWhenAnIntentReceived() = runTest {
+ tracker =
+ UserTrackerImpl(
+ context,
+ { fakeFeatures },
+ userManager,
+ iActivityManager,
+ dumpManager,
+ this,
+ testDispatcher,
+ handler
+ )
tracker.initialize(0)
tracker.addCallback(callback, executor)
val profileID = tracker.userId + 10
diff --git a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplTest.kt
index aa98f08..52b25f8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplTest.kt
@@ -26,16 +26,25 @@
import android.os.IRemoteCallback
import android.os.UserHandle
import android.os.UserManager
-import android.testing.AndroidTestingRunner
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.DumpManager
+import com.android.systemui.flags.FakeFeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.capture
+import com.android.systemui.util.time.FakeSystemClock
import com.google.common.truth.Truth.assertThat
-import java.util.concurrent.Executor
+import com.google.common.truth.TruthJUnit.assume
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.junit.runners.Parameterized
import org.mockito.ArgumentCaptor
import org.mockito.ArgumentMatchers.any
import org.mockito.ArgumentMatchers.anyInt
@@ -43,28 +52,52 @@
import org.mockito.ArgumentMatchers.eq
import org.mockito.ArgumentMatchers.isNull
import org.mockito.Mock
+import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when`
import org.mockito.MockitoAnnotations
+import java.util.concurrent.Executor
+
+@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RunWith(Parameterized::class)
class UserTrackerImplTest : SysuiTestCase() {
+ companion object {
+
+ @JvmStatic
+ @Parameterized.Parameters
+ fun isBackgroundUserTrackerEnabled(): Iterable<Boolean> = listOf(true, false)
+ }
+
@Mock
private lateinit var context: Context
+
@Mock
private lateinit var userManager: UserManager
+
@Mock
private lateinit var iActivityManager: IActivityManager
+
@Mock
private lateinit var userSwitchingReply: IRemoteCallback
+
@Mock(stubOnly = true)
private lateinit var dumpManager: DumpManager
+
@Mock(stubOnly = true)
private lateinit var handler: Handler
+ @Parameterized.Parameter
+ @JvmField
+ var isBackgroundUserTrackerEnabled: Boolean = false
+
+ private val testScope = TestScope()
+ private val testDispatcher = StandardTestDispatcher(testScope.testScheduler)
private val executor = Executor(Runnable::run)
+ private val featureFlags = FakeFeatureFlagsClassic()
+
private lateinit var tracker: UserTrackerImpl
@Before
@@ -84,54 +117,65 @@
listOf(info)
}
- tracker = UserTrackerImpl(context, userManager, iActivityManager, dumpManager, handler)
+ featureFlags.set(Flags.USER_TRACKER_BACKGROUND_CALLBACKS, isBackgroundUserTrackerEnabled)
+ tracker =
+ UserTrackerImpl(
+ context,
+ { featureFlags },
+ userManager,
+ iActivityManager,
+ dumpManager,
+ testScope.backgroundScope,
+ testDispatcher,
+ handler,
+ )
}
@Test
- fun testNotInitialized() {
+ fun testNotInitialized() = testScope.runTest {
assertThat(tracker.initialized).isFalse()
}
@Test(expected = IllegalStateException::class)
- fun testGetUserIdBeforeInitThrowsException() {
+ fun testGetUserIdBeforeInitThrowsException() = testScope.runTest {
tracker.userId
}
@Test(expected = IllegalStateException::class)
- fun testGetUserHandleBeforeInitThrowsException() {
+ fun testGetUserHandleBeforeInitThrowsException() = testScope.runTest {
tracker.userHandle
}
@Test(expected = IllegalStateException::class)
- fun testGetUserContextBeforeInitThrowsException() {
+ fun testGetUserContextBeforeInitThrowsException() = testScope.runTest {
tracker.userContext
}
@Test(expected = IllegalStateException::class)
- fun testGetUserContentResolverBeforeInitThrowsException() {
+ fun testGetUserContentResolverBeforeInitThrowsException() = testScope.runTest {
tracker.userContentResolver
}
@Test(expected = IllegalStateException::class)
- fun testGetUserProfilesBeforeInitThrowsException() {
+ fun testGetUserProfilesBeforeInitThrowsException() = testScope.runTest {
tracker.userProfiles
}
@Test
- fun testInitialize() {
+ fun testInitialize() = testScope.runTest {
tracker.initialize(0)
assertThat(tracker.initialized).isTrue()
}
@Test
- fun testReceiverRegisteredOnInitialize() {
+ fun testReceiverRegisteredOnInitialize() = testScope.runTest {
tracker.initialize(0)
val captor = ArgumentCaptor.forClass(IntentFilter::class.java)
- verify(context).registerReceiverForAllUsers(
- eq(tracker), capture(captor), isNull(), eq(handler))
+ verify(context)
+ .registerReceiverForAllUsers(eq(tracker), capture(captor), isNull(), eq(handler))
with(captor.value) {
assertThat(countActions()).isEqualTo(6)
assertThat(hasAction(Intent.ACTION_USER_INFO_CHANGED)).isTrue()
@@ -144,7 +188,7 @@
}
@Test
- fun testInitialValuesSet() {
+ fun testInitialValuesSet() = testScope.runTest {
val testID = 4
tracker.initialize(testID)
@@ -161,7 +205,7 @@
}
@Test
- fun testUserSwitch() {
+ fun testUserSwitch() = testScope.runTest {
tracker.initialize(0)
val newID = 5
@@ -169,6 +213,7 @@
verify(iActivityManager).registerUserSwitchObserver(capture(captor), anyString())
captor.value.onBeforeUserSwitching(newID)
captor.value.onUserSwitching(newID, userSwitchingReply)
+ runCurrent()
verify(userSwitchingReply).sendResult(any())
verify(userManager).getProfiles(newID)
@@ -184,7 +229,7 @@
}
@Test
- fun testManagedProfileAvailable() {
+ fun testManagedProfileAvailable() = testScope.runTest {
tracker.initialize(0)
val profileID = tracker.userId + 10
@@ -209,7 +254,8 @@
assertThat(tracker.userProfiles.map { it.id }).containsExactly(tracker.userId, profileID)
}
- fun testManagedProfileUnavailable() {
+ @Test
+ fun testManagedProfileUnavailable() = testScope.runTest {
tracker.initialize(0)
val profileID = tracker.userId + 10
@@ -234,7 +280,8 @@
assertThat(tracker.userProfiles.map { it.id }).containsExactly(tracker.userId, profileID)
}
- fun testManagedProfileStartedAndRemoved() {
+ @Test
+ fun testManagedProfileStartedAndRemoved() = testScope.runTest {
tracker.initialize(0)
val profileID = tracker.userId + 10
@@ -271,7 +318,7 @@
}
@Test
- fun testCallbackNotCalledOnAdd() {
+ fun testCallbackNotCalledOnAdd() = testScope.runTest {
tracker.initialize(0)
val callback = TestCallback()
@@ -282,7 +329,7 @@
}
@Test
- fun testCallbackCalledOnUserChanging() {
+ fun testCallbackCalledOnUserChanging() = testScope.runTest {
tracker.initialize(0)
val callback = TestCallback()
tracker.addCallback(callback, executor)
@@ -293,15 +340,49 @@
verify(iActivityManager).registerUserSwitchObserver(capture(captor), anyString())
captor.value.onBeforeUserSwitching(newID)
captor.value.onUserSwitching(newID, userSwitchingReply)
- verify(userSwitchingReply).sendResult(any())
+ runCurrent()
+ verify(userSwitchingReply).sendResult(any())
assertThat(callback.calledOnUserChanging).isEqualTo(1)
assertThat(callback.lastUser).isEqualTo(newID)
assertThat(callback.lastUserContext?.userId).isEqualTo(newID)
}
@Test
- fun testCallbackCalledOnUserChanged() {
+ fun testAsyncCallbackWaitsUserToChange() = testScope.runTest {
+ // Skip this test for CountDownLatch variation. The problem is that there would be a
+ // deadlock if the callbacks processing runs on the same thread as the callback (which
+ // is blocked by the latch). Before the change it works because the callbacks are
+ // processed on a binder thread which is always distinct.
+ // This is the issue that this feature addresses.
+ assume().that(isBackgroundUserTrackerEnabled).isTrue()
+
+ tracker.initialize(0)
+ val callback = TestCallback()
+ val callbackExecutor = FakeExecutor(FakeSystemClock())
+ tracker.addCallback(callback, callbackExecutor)
+
+ val newID = 5
+
+ val captor = ArgumentCaptor.forClass(IUserSwitchObserver::class.java)
+ verify(iActivityManager).registerUserSwitchObserver(capture(captor), anyString())
+ captor.value.onBeforeUserSwitching(newID)
+ captor.value.onUserSwitching(newID, userSwitchingReply)
+
+ assertThat(callback.calledOnUserChanging).isEqualTo(0)
+ verify(userSwitchingReply, never()).sendResult(any())
+
+ FakeExecutor.exhaustExecutors(callbackExecutor)
+ runCurrent()
+ FakeExecutor.exhaustExecutors(callbackExecutor)
+ runCurrent()
+
+ assertThat(callback.calledOnUserChanging).isEqualTo(1)
+ verify(userSwitchingReply).sendResult(any())
+ }
+
+ @Test
+ fun testCallbackCalledOnUserChanged() = testScope.runTest {
tracker.initialize(0)
val callback = TestCallback()
tracker.addCallback(callback, executor)
@@ -312,6 +393,7 @@
verify(iActivityManager).registerUserSwitchObserver(capture(captor), anyString())
captor.value.onBeforeUserSwitching(newID)
captor.value.onUserSwitchComplete(newID)
+ runCurrent()
assertThat(callback.calledOnUserChanged).isEqualTo(1)
assertThat(callback.lastUser).isEqualTo(newID)
@@ -321,7 +403,7 @@
}
@Test
- fun testCallbackCalledOnUserInfoChanged() {
+ fun testCallbackCalledOnUserInfoChanged() = testScope.runTest {
tracker.initialize(0)
val callback = TestCallback()
tracker.addCallback(callback, executor)
@@ -331,18 +413,18 @@
val id = invocation.getArgument<Int>(0)
val info = UserInfo(id, "", UserInfo.FLAG_FULL)
val infoProfile = UserInfo(
- id + 10,
- "",
- "",
- UserInfo.FLAG_MANAGED_PROFILE,
- UserManager.USER_TYPE_PROFILE_MANAGED
+ id + 10,
+ "",
+ "",
+ UserInfo.FLAG_MANAGED_PROFILE,
+ UserManager.USER_TYPE_PROFILE_MANAGED
)
infoProfile.profileGroupId = id
listOf(info, infoProfile)
}
val intent = Intent(Intent.ACTION_USER_INFO_CHANGED)
- .putExtra(Intent.EXTRA_USER, UserHandle.of(profileID))
+ .putExtra(Intent.EXTRA_USER, UserHandle.of(profileID))
tracker.onReceive(context, intent)
@@ -352,7 +434,7 @@
}
@Test
- fun testCallbackRemoved() {
+ fun testCallbackRemoved() = testScope.runTest {
tracker.initialize(0)
val newID = 5
val profileID = newID + 10
@@ -364,6 +446,7 @@
val captor = ArgumentCaptor.forClass(IUserSwitchObserver::class.java)
verify(iActivityManager).registerUserSwitchObserver(capture(captor), anyString())
captor.value.onUserSwitching(newID, userSwitchingReply)
+ runCurrent()
verify(userSwitchingReply).sendResult(any())
captor.value.onUserSwitchComplete(newID)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
index 6dadd4c3..8be8178 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -16,7 +16,6 @@
package com.android.systemui.shade;
-import static com.android.keyguard.FaceAuthApiRequestReason.NOTIFICATION_PANEL_CLICKED;
import static com.android.keyguard.KeyguardClockSwitch.LARGE;
import static com.android.keyguard.KeyguardClockSwitch.SMALL;
import static com.android.systemui.shade.ShadeExpansionStateManagerKt.STATE_CLOSED;
@@ -59,6 +58,7 @@
import com.android.keyguard.FaceAuthApiRequestReason;
import com.android.systemui.DejankUtils;
import com.android.systemui.R;
+import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.shared.model.WakeSleepReason;
import com.android.systemui.keyguard.shared.model.WakefulnessModel;
import com.android.systemui.keyguard.shared.model.WakefulnessState;
@@ -834,6 +834,42 @@
}
@Test
+ public void switchesToBigClockInSplitShadeOn_landFlagOn_ForceSmallClock() {
+ when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(false);
+ mStatusBarStateController.setState(KEYGUARD);
+ enableSplitShade(/* enabled= */ false);
+ mNotificationPanelViewController.setDozing(false, false);
+ when(mFeatureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)).thenReturn(true);
+ when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
+ when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
+ when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
+ clearInvocations(mKeyguardStatusViewController);
+
+ enableSplitShade(/* enabled= */ true);
+ mNotificationPanelViewController.updateResources();
+
+ verify(mKeyguardStatusViewController).displayClock(SMALL, /* animate */ false);
+ }
+
+ @Test
+ public void switchesToBigClockInSplitShadeOn_landFlagOff_DontForceSmallClock() {
+ when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(false);
+ mStatusBarStateController.setState(KEYGUARD);
+ enableSplitShade(/* enabled= */ false);
+ mNotificationPanelViewController.setDozing(false, false);
+ when(mFeatureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)).thenReturn(false);
+ when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
+ when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
+ when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
+ clearInvocations(mKeyguardStatusViewController);
+
+ enableSplitShade(/* enabled= */ true);
+ mNotificationPanelViewController.updateResources();
+
+ verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ false);
+ }
+
+ @Test
public void testDisplaysSmallClockOnLockscreenInSplitShadeWhenMediaIsPlaying() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -1064,7 +1100,18 @@
mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
verify(mUpdateMonitor, never()).requestFaceAuth(anyString());
+ }
+ @Test
+ public void nsslFlagEnabled_allowOnlyExternalTouches() {
+ when(mFeatureFlags.isEnabled(Flags.MIGRATE_NSSL)).thenReturn(true);
+
+ // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
+ mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
+ verify(mQsController, never()).disallowTouches();
+
+ mNotificationPanelViewController.handleExternalInterceptTouch(mDownMotionEvent);
+ verify(mQsController).disallowTouches();
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
index 39fe498..3da5f6a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
@@ -48,6 +48,7 @@
import com.android.systemui.log.BouncerLogger
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.shade.NotificationShadeWindowView.InteractionEventHandler
+import com.android.systemui.statusbar.DragDownHelper
import com.android.systemui.statusbar.LockscreenShadeTransitionController
import com.android.systemui.statusbar.NotificationInsetsController
import com.android.systemui.statusbar.NotificationShadeDepthController
@@ -124,6 +125,7 @@
private lateinit var unfoldTransitionProgressProvider:
Optional<UnfoldTransitionProgressProvider>
@Mock lateinit var keyguardTransitionInteractor: KeyguardTransitionInteractor
+ @Mock lateinit var dragDownHelper: DragDownHelper
@Mock
lateinit var primaryBouncerToGoneTransitionViewModel: PrimaryBouncerToGoneTransitionViewModel
@Mock lateinit var keyEventInteractor: KeyEventInteractor
@@ -137,6 +139,8 @@
private lateinit var testScope: TestScope
+ private lateinit var featureFlags: FakeFeatureFlags
+
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
@@ -150,12 +154,13 @@
whenever(keyguardTransitionInteractor.lockscreenToDreamingTransition)
.thenReturn(emptyFlow<TransitionStep>())
- val featureFlags = FakeFeatureFlags()
+ featureFlags = FakeFeatureFlags()
featureFlags.set(Flags.TRACKPAD_GESTURE_COMMON, true)
featureFlags.set(Flags.TRACKPAD_GESTURE_FEATURES, false)
featureFlags.set(Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true)
featureFlags.set(Flags.REVAMPED_BOUNCER_MESSAGES, true)
featureFlags.set(Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false)
+ featureFlags.set(Flags.MIGRATE_NSSL, false)
testScope = TestScope()
fakeClock = FakeSystemClock()
@@ -206,6 +211,7 @@
keyEventInteractor,
)
underTest.setupExpandedStatusBar()
+ underTest.setDragDownHelper(dragDownHelper)
interactionEventHandlerCaptor = ArgumentCaptor.forClass(InteractionEventHandler::class.java)
verify(view).setInteractionEventHandler(interactionEventHandlerCaptor.capture())
@@ -347,9 +353,8 @@
testScope.runTest {
// GIVEN touch dispatcher in a state that returns true
underTest.setStatusBarViewController(phoneStatusBarViewController)
- whenever(keyguardUnlockAnimationController.isPlayingCannedUnlockAnimation()).thenReturn(
- true
- )
+ whenever(keyguardUnlockAnimationController.isPlayingCannedUnlockAnimation())
+ .thenReturn(true)
assertThat(interactionEventHandler.handleDispatchTouchEvent(DOWN_EVENT)).isTrue()
// WHEN launch animation is running for 2 seconds
@@ -381,6 +386,32 @@
}
@Test
+ fun shouldInterceptTouchEvent_notificationPanelViewControllerShouldIntercept() {
+ // GIVEN not dozing
+ whenever(sysuiStatusBarStateController.isDozing()).thenReturn(false)
+ // AND alternate bouncer doesn't want the touch
+ whenever(statusBarKeyguardViewManager.shouldInterceptTouchEvent(DOWN_EVENT))
+ .thenReturn(false)
+ // AND the lock icon doesn't want the touch
+ whenever(lockIconViewController.onInterceptTouchEvent(DOWN_EVENT)).thenReturn(false)
+ // AND the notification panel can accept touches
+ whenever(notificationPanelViewController.isFullyExpanded()).thenReturn(true)
+ whenever(dragDownHelper.isDragDownEnabled).thenReturn(true)
+ whenever(centralSurfaces.isBouncerShowing()).thenReturn(false)
+
+ // AND the drag down helper doesn't want the touch (to pull the shade down)
+ whenever(dragDownHelper.onInterceptTouchEvent(DOWN_EVENT)).thenReturn(false)
+
+ featureFlags.set(Flags.MIGRATE_NSSL, true)
+
+ // WHEN asked if should intercept touch
+ interactionEventHandler.shouldInterceptTouchEvent(DOWN_EVENT)
+
+ // Verify that NPVC gets a chance to use the touch
+ verify(notificationPanelViewController).handleExternalInterceptTouch(DOWN_EVENT)
+ }
+
+ @Test
fun testGetKeyguardMessageArea() =
testScope.runTest {
underTest.keyguardMessageArea
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
index 3031658..04c4b45 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
@@ -164,6 +164,7 @@
featureFlags.set(Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true)
featureFlags.set(Flags.REVAMPED_BOUNCER_MESSAGES, true)
featureFlags.set(Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false)
+ featureFlags.set(Flags.MIGRATE_NSSL, false)
testScope = TestScope()
controller =
NotificationShadeWindowViewController(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
index 36cf1d9..e9e6d31 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
@@ -101,7 +101,11 @@
MockitoAnnotations.initMocks(this)
fakeSystemClock = FakeSystemClock()
delayableExecutor = FakeExecutor(fakeSystemClock)
- featureFlags = FakeFeatureFlags().apply { set(Flags.MIGRATE_NSSL, false) }
+ featureFlags =
+ FakeFeatureFlags().apply {
+ set(Flags.MIGRATE_NSSL, false)
+ set(Flags.QS_CONTAINER_GRAPH_OPTIMIZER, false)
+ }
mContext.ensureTestableResources()
whenever(view.context).thenReturn(mContext)
whenever(view.resources).thenReturn(mContext.resources)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
index 090bee2..6801f2f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
@@ -100,7 +100,11 @@
MockitoAnnotations.initMocks(this)
fakeSystemClock = FakeSystemClock()
delayableExecutor = FakeExecutor(fakeSystemClock)
- featureFlags = FakeFeatureFlags().apply { set(Flags.MIGRATE_NSSL, true) }
+ featureFlags =
+ FakeFeatureFlags().apply {
+ set(Flags.MIGRATE_NSSL, true)
+ set(Flags.QS_CONTAINER_GRAPH_OPTIMIZER, true)
+ }
mContext.ensureTestableResources()
whenever(view.context).thenReturn(mContext)
whenever(view.resources).thenReturn(mContext.resources)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java b/packages/SystemUI/tests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java
index 88d853e..8f06e63 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shared/plugins/PluginInstanceTest.java
@@ -181,29 +181,30 @@
String ACTION = "testAction";
}
- public void assertInstances(Integer allocated, Integer created) {
- // Run the garbage collector to finalize and deallocate outstanding
- // instances. Since the GC doesn't always appear to want to run
- // completely when we ask, we ask it 10 times in a short loop.
- for (int i = 0; i < 10; i++) {
+ private void assertInstances(int allocated, int created) {
+ // If there are more than the expected number of allocated instances, then we run the
+ // garbage collector to finalize and deallocate any outstanding non-referenced instances.
+ // Since the GC doesn't always appear to want to run completely when we ask, we do this up
+ // to 10 times before failing the test.
+ for (int i = 0; mCounter.getAllocatedInstances() > allocated && i < 10; i++) {
System.runFinalization();
System.gc();
}
- mCounter.assertInstances(allocated, created);
+ assertEquals(allocated, mCounter.getAllocatedInstances());
+ assertEquals(created, mCounter.getCreatedInstances());
}
public static class RefCounter {
public final AtomicInteger mAllocatedInstances = new AtomicInteger();
public final AtomicInteger mCreatedInstances = new AtomicInteger();
- public void assertInstances(Integer allocated, Integer created) {
- if (allocated != null) {
- assertEquals(allocated.intValue(), mAllocatedInstances.get());
- }
- if (created != null) {
- assertEquals(created.intValue(), mCreatedInstances.get());
- }
+ public int getAllocatedInstances() {
+ return mAllocatedInstances.get();
+ }
+
+ public int getCreatedInstances() {
+ return mCreatedInstances.get();
}
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/settings/FakeUserTracker.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/FakeUserTracker.kt
index 4242c16..f5f924d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/settings/FakeUserTracker.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/FakeUserTracker.kt
@@ -22,7 +22,6 @@
import android.os.UserHandle
import android.test.mock.MockContentResolver
import com.android.systemui.util.mockito.mock
-import java.util.concurrent.CountDownLatch
import java.util.concurrent.Executor
/** A fake [UserTracker] to be used in tests. */
@@ -73,8 +72,7 @@
fun onUserChanging(userId: Int = _userId) {
val copy = callbacks.toList()
- val latch = CountDownLatch(copy.size)
- copy.forEach { it.onUserChanging(userId, userContext, latch) }
+ copy.forEach { it.onUserChanging(userId, userContext) {} }
}
fun onUserChanged(userId: Int = _userId) {
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 93fe0c9..553b085 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -97,6 +97,11 @@
import static android.os.Process.ZYGOTE_POLICY_FLAG_EMPTY;
import static com.android.internal.messages.nano.SystemMessageProto.SystemMessage.NOTE_FOREGROUND_SERVICE_BG_LAUNCH;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_DELEGATE;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NONE;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_START_FOREGROUND_SERVICE;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_START_SERVICE;
import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__DENIED;
import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER;
import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__EXIT;
@@ -122,6 +127,7 @@
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
import android.Manifest;
+import android.Manifest.permission;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -901,7 +907,10 @@
showFgsBgRestrictedNotificationLocked(r);
logFGSStateChangeLocked(r,
FOREGROUND_SERVICE_STATE_CHANGED__STATE__DENIED,
- 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
if (CompatChanges.isChangeEnabled(FGS_START_EXCEPTION_CHANGE_ID, callingUid)) {
throw new ForegroundServiceStartNotAllowedException(msg);
}
@@ -2066,6 +2075,7 @@
boolean alreadyStartedOp = false;
boolean stopProcStatsOp = false;
+ final boolean origFgRequired = r.fgRequired;
if (r.fgRequired) {
if (DEBUG_SERVICE || DEBUG_BACKGROUND_CHECK) {
Slog.i(TAG, "Service called startForeground() as required: " + r);
@@ -2117,6 +2127,9 @@
// Whether to extend the SHORT_SERVICE time out.
boolean extendShortServiceTimeout = false;
+ // Whether setFgsRestrictionLocked() is called in here. Only used for logging.
+ boolean fgsRestrictionRecalculated = false;
+
int fgsTypeCheckCode = FGS_TYPE_POLICY_CHECK_UNKNOWN;
if (!ignoreForeground) {
if (foregroundServiceType == FOREGROUND_SERVICE_TYPE_SHORT_SERVICE
@@ -2182,6 +2195,7 @@
r.appInfo.uid, r.intent.getIntent(), r, r.userId,
BackgroundStartPrivileges.NONE,
false /* isBindService */);
+ fgsRestrictionRecalculated = true;
if (!r.isFgsAllowedStart()) {
Slog.w(TAG_SERVICE, "FGS type change to/from SHORT_SERVICE: "
+ " BFSL DENIED.");
@@ -2246,6 +2260,7 @@
r.appInfo.uid, r.intent.getIntent(), r, r.userId,
BackgroundStartPrivileges.NONE,
false /* isBindService */);
+ fgsRestrictionRecalculated = true;
final String temp = "startForegroundDelayMs:" + delayMs;
if (r.mInfoAllowStartForeground != null) {
r.mInfoAllowStartForeground += "; " + temp;
@@ -2266,6 +2281,25 @@
r.appInfo.uid, r.intent.getIntent(), r, r.userId,
BackgroundStartPrivileges.NONE,
false /* isBindService */);
+ fgsRestrictionRecalculated = true;
+ }
+
+ // When startForeground() is called on a bound service, without having
+ // it started (i.e. no Context.startService() or startForegroundService() was
+ // called.)
+ // called on it, then we probably didn't call setFgsRestrictionLocked()
+ // in startService(). If fgsRestrictionRecalculated is false, then we
+ // didn't call setFgsRestrictionLocked() here either.
+ //
+ // In this situation, we call setFgsRestrictionLocked() with
+ // forBoundFgs = false, so we'd set the FGS allowed reason to the
+ // by-bindings fields, so we can put it in the log, without affecting the
+ // logic.
+ if (!fgsRestrictionRecalculated && !r.startRequested) {
+ setFgsRestrictionLocked(r.serviceInfo.packageName, r.app.getPid(),
+ r.appInfo.uid, r.intent.getIntent(), r, r.userId,
+ BackgroundStartPrivileges.NONE,
+ false /* isBindService */, true /* forBoundFgs */);
}
// If the foreground service is not started from TOP process, do not allow it to
@@ -2291,7 +2325,10 @@
ignoreForeground = true;
logFGSStateChangeLocked(r,
FOREGROUND_SERVICE_STATE_CHANGED__STATE__DENIED,
- 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
if (CompatChanges.isChangeEnabled(FGS_START_EXCEPTION_CHANGE_ID,
r.appInfo.uid)) {
throw new ForegroundServiceStartNotAllowedException(msg);
@@ -2331,7 +2368,10 @@
if (fgsTypeResult.second != null) {
logFGSStateChangeLocked(r,
FOREGROUND_SERVICE_STATE_CHANGED__STATE__DENIED,
- 0, FGS_STOP_REASON_UNKNOWN, fgsTypeResult.first);
+ 0, FGS_STOP_REASON_UNKNOWN, fgsTypeResult.first,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
throw fgsTypeResult.second;
}
}
@@ -2403,9 +2443,24 @@
AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE);
registerAppOpCallbackLocked(r);
mAm.updateForegroundServiceUsageStats(r.name, r.userId, true);
+
+ int fgsStartApi = FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NONE;
+ if (r.startRequested) {
+ if (origFgRequired) {
+ fgsStartApi =
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_START_FOREGROUND_SERVICE;
+ } else {
+ fgsStartApi =
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_START_SERVICE;
+ }
+ }
+
logFGSStateChangeLocked(r,
FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER,
- 0, FGS_STOP_REASON_UNKNOWN, fgsTypeCheckCode);
+ 0, FGS_STOP_REASON_UNKNOWN, fgsTypeCheckCode,
+ fgsStartApi,
+ fgsRestrictionRecalculated
+ );
synchronized (mFGSLogger) {
mFGSLogger.logForegroundServiceStart(r.appInfo.uid, 0, r);
}
@@ -2499,7 +2554,10 @@
r.mFgsExitTime > r.mFgsEnterTime
? (int) (r.mFgsExitTime - r.mFgsEnterTime) : 0,
FGS_STOP_REASON_STOP_FOREGROUND,
- FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
synchronized (mFGSLogger) {
mFGSLogger.logForegroundServiceStop(r.appInfo.uid, r);
@@ -3338,7 +3396,10 @@
FOREGROUND_SERVICE_STATE_CHANGED__STATE__TIMED_OUT,
nowUptime > sr.mFgsEnterTime ? (int) (nowUptime - sr.mFgsEnterTime) : 0,
FGS_STOP_REASON_UNKNOWN,
- FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
try {
sr.app.getThread().scheduleTimeoutService(sr, sr.getShortFgsInfo().getStartId());
} catch (RemoteException e) {
@@ -5705,7 +5766,10 @@
r.mFgsExitTime > r.mFgsEnterTime
? (int) (r.mFgsExitTime - r.mFgsEnterTime) : 0,
FGS_STOP_REASON_STOP_SERVICE,
- FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false /* fgsRestrictionRecalculated */
+ );
synchronized (mFGSLogger) {
mFGSLogger.logForegroundServiceStop(r.appInfo.uid, r);
}
@@ -7452,6 +7516,13 @@
}
}
+ private void setFgsRestrictionLocked(String callingPackage,
+ int callingPid, int callingUid, Intent intent, ServiceRecord r, int userId,
+ BackgroundStartPrivileges backgroundStartPrivileges, boolean isBindService) {
+ setFgsRestrictionLocked(callingPackage, callingPid, callingUid, intent, r, userId,
+ backgroundStartPrivileges, isBindService, /*forBoundFgs*/ false);
+ }
+
/**
* There are two FGS restrictions:
* In R, mAllowWhileInUsePermissionInFgs is to allow while-in-use permissions in foreground
@@ -7463,11 +7534,14 @@
* @param intent intent to start/bind service.
* @param r the service to start.
* @param isBindService True if it's called from bindService().
+ * @param forBoundFgs set to true if it's called from Service.startForeground() for a
+ * service that's not started but bound.
* @return true if allow, false otherwise.
*/
private void setFgsRestrictionLocked(String callingPackage,
int callingPid, int callingUid, Intent intent, ServiceRecord r, int userId,
- BackgroundStartPrivileges backgroundStartPrivileges, boolean isBindService) {
+ BackgroundStartPrivileges backgroundStartPrivileges, boolean isBindService,
+ boolean forBoundFgs) {
@ReasonCode int allowWIU;
@ReasonCode int allowStart;
@@ -7511,9 +7585,19 @@
r.mAllowWIUInBindService = allowWIU;
r.mAllowStartInBindService = allowStart;
} else {
- r.mAllowWhileInUsePermissionInFgsReasonNoBinding = allowWIU;
- r.mAllowStartForegroundNoBinding = allowStart;
-
+ if (!forBoundFgs) {
+ // This is for "normal" situation.
+ r.mAllowWhileInUsePermissionInFgsReasonNoBinding = allowWIU;
+ r.mAllowStartForegroundNoBinding = allowStart;
+ } else {
+ // This logic is only for logging, so we only update the "by-binding" fields.
+ if (r.mAllowWIUByBindings == REASON_DENIED) {
+ r.mAllowWIUByBindings = allowWIU;
+ }
+ if (r.mAllowStartByBindings == REASON_DENIED) {
+ r.mAllowStartByBindings = allowStart;
+ }
+ }
// Also do a binding client check, unless called from bindService().
if (r.mAllowWIUByBindings == REASON_DENIED) {
r.mAllowWIUByBindings =
@@ -8137,7 +8221,10 @@
*/
private void logFGSStateChangeLocked(ServiceRecord r, int state, int durationMs,
@FgsStopReason int fgsStopReason,
- @ForegroundServicePolicyCheckCode int fgsTypeCheckCode) {
+ @ForegroundServicePolicyCheckCode int fgsTypeCheckCode,
+ int fgsStartApi, // from ForegroundServiceStateChanged.FgsStartApi
+ boolean fgsRestrictionRecalculated
+ ) {
if (!ActivityManagerUtils.shouldSamplePackageForAtom(
r.packageName, mAm.mConstants.mFgsAtomSampleRate)) {
return;
@@ -8194,7 +8281,9 @@
r.mAllowWIUByBindings,
r.mAllowStartForegroundNoBinding,
r.mAllowStartInBindService,
- r.mAllowStartByBindings);
+ r.mAllowStartByBindings,
+ fgsStartApi,
+ fgsRestrictionRecalculated);
int event = 0;
if (state == FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER) {
@@ -8373,7 +8462,10 @@
}
logFGSStateChangeLocked(r,
FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__ENTER,
- 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN);
+ 0, FGS_STOP_REASON_UNKNOWN, FGS_TYPE_POLICY_CHECK_UNKNOWN,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_DELEGATE,
+ false /* fgsRestrictionRecalculated */
+ );
// Notify the caller.
if (connection != null) {
mAm.mHandler.post(() -> {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 50be128..cbc9ff1 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -16843,7 +16843,7 @@
for (int i = 0; i < N; i++) {
PendingTempAllowlist ptw = list[i];
mLocalDeviceIdleController.addPowerSaveTempWhitelistAppDirect(ptw.targetUid,
- ptw.duration, ptw.type, true, ptw.reasonCode, ptw.tag,
+ ptw.duration, ptw.type, false, ptw.reasonCode, ptw.tag,
ptw.callingUid);
}
}
diff --git a/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java b/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java
index f6859d1..e0a71d4 100644
--- a/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java
+++ b/services/core/java/com/android/server/am/ForegroundServiceTypeLoggerModule.java
@@ -27,6 +27,8 @@
import static android.app.ActivityManager.FOREGROUND_SERVICE_API_TYPE_USB;
import static android.os.Process.INVALID_UID;
+import static com.android.internal.util.FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA;
+
import android.annotation.IntDef;
import android.app.ActivityManager;
import android.app.ActivityManager.ForegroundServiceApiType;
@@ -520,7 +522,10 @@
r.mAllowWIUByBindings,
r.mAllowStartForegroundNoBinding,
r.mAllowStartInBindService,
- r.mAllowStartByBindings);
+ r.mAllowStartByBindings,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false
+ );
}
/**
@@ -578,7 +583,10 @@
0,
0,
0,
- 0);
+ 0,
+ FOREGROUND_SERVICE_STATE_CHANGED__FGS_START_API__FGSSTARTAPI_NA,
+ false
+ );
}
/**
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
index 6edbfb7..4df2581 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
@@ -57,6 +57,7 @@
@NonNull private final FaceManager mFaceManager;
@NonNull private final FingerprintManager mFingerprintManager;
+ private final boolean mEnabled;
private final float mThreshold;
private final int mModality;
@@ -80,6 +81,7 @@
public AuthenticationStatsCollector(@NonNull Context context, int modality,
@NonNull BiometricNotification biometricNotification) {
mContext = context;
+ mEnabled = context.getResources().getBoolean(R.bool.config_biometricFrrNotificationEnabled);
mThreshold = context.getResources()
.getFraction(R.fraction.config_biometricNotificationFrrThreshold, 1, 1);
mUserAuthenticationStatsMap = new HashMap<>();
@@ -110,6 +112,11 @@
/** Update total authentication and rejected attempts. */
public void authenticate(int userId, boolean authenticated) {
+ // Don't collect data if the feature is disabled.
+ if (!mEnabled) {
+ return;
+ }
+
// Don't collect data for single-modality devices or user has both biometrics enrolled.
if (isSingleModalityDevice()
|| (hasEnrolledFace(userId) && hasEnrolledFingerprint(userId))) {
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 52dafc2..5fec50e 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -580,7 +580,7 @@
IBinder mRequestedLaunchingTaskFragmentToken;
// Tracking splash screen status from previous activity
- boolean mSplashScreenStyleSolidColor = false;
+ boolean mAllowIconSplashScreen = true;
boolean mPauseSchedulePendingForPip = false;
@@ -2408,8 +2408,7 @@
@VisibleForTesting
boolean addStartingWindow(String pkg, int resolvedTheme, ActivityRecord from, boolean newTask,
boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot,
- boolean activityCreated, boolean isSimple,
- boolean activityAllDrawn) {
+ boolean activityCreated, boolean allowIcon, boolean activityAllDrawn) {
// If the display is frozen, we won't do anything until the actual window is
// displayed so there is no reason to put in the starting window.
if (!okToDisplay()) {
@@ -2444,8 +2443,8 @@
final int typeParameter = StartingSurfaceController
.makeStartingWindowTypeParameter(newTask, taskSwitch, processRunning,
- allowTaskSnapshot, activityCreated, isSimple, useLegacy, activityAllDrawn,
- type, packageName, mUserId);
+ allowTaskSnapshot, activityCreated, allowIcon, useLegacy,
+ activityAllDrawn, type, packageName, mUserId);
if (type == STARTING_WINDOW_TYPE_SNAPSHOT) {
if (isActivityTypeHome()) {
@@ -6747,7 +6746,7 @@
void onFirstWindowDrawn(WindowState win) {
firstWindowDrawn = true;
// stop tracking
- mSplashScreenStyleSolidColor = true;
+ mAllowIconSplashScreen = false;
if (mStartingWindow != null) {
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Finish starting %s"
@@ -6796,7 +6795,7 @@
void onStartingWindowDrawn() {
boolean wasTaskVisible = false;
if (task != null) {
- mSplashScreenStyleSolidColor = true;
+ mAllowIconSplashScreen = false;
wasTaskVisible = !setTaskHasBeenVisible();
}
@@ -7321,19 +7320,32 @@
}
/**
- * @return true if a solid color splash screen must be used
- * false when an icon splash screen can be used, but the final decision for whether to
- * use an icon or solid color splash screen will be made by WmShell.
+ * Checks whether an icon splash screen can be used in the starting window based on the
+ * preference in the {@code options} and this activity's theme, giving higher priority to the
+ * {@code options}'s preference.
+ *
+ * When no preference is specified, a default behaviour is defined:
+ * - if the activity is started from the home or shell app, an icon can be used
+ * - if the activity is started from SystemUI, an icon should not be used
+ * - if there is a launching activity, use its preference
+ * - if none of the above is met, only use an icon when the activity is started for the first
+ * time from a System app
+ *
+ * The returned value is sent to WmShell, which will make the final decision on what splash
+ * screen type will be used.
+ *
+ * @return true if an icon can be used in the splash screen
+ * false when an icon should not be used in the splash screen
*/
- private boolean shouldUseSolidColorSplashScreen(ActivityRecord sourceRecord,
+ private boolean canUseIconSplashScreen(ActivityRecord sourceRecord,
boolean startActivity, ActivityOptions options, int resolvedTheme) {
if (sourceRecord == null && !startActivity) {
- // Use simple style if this activity is not top activity. This could happen when adding
- // a splash screen window to the warm start activity which is re-create because top is
- // finishing.
+ // Shouldn't use an icon if this activity is not top activity. This could happen when
+ // adding a splash screen window to the warm start activity which is re-create because
+ // top is finishing.
final ActivityRecord above = task.getActivityAbove(this);
if (above != null) {
- return true;
+ return false;
}
}
@@ -7341,32 +7353,33 @@
final int optionsStyle = options != null ? options.getSplashScreenStyle() :
SplashScreen.SPLASH_SCREEN_STYLE_UNDEFINED;
if (optionsStyle == SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR) {
- return true;
+ return false;
} else if (optionsStyle == SplashScreen.SPLASH_SCREEN_STYLE_ICON
|| isIconStylePreferred(resolvedTheme)) {
- return false;
+ return true;
}
// Choose the default behavior when neither the ActivityRecord nor the activity theme have
// specified a splash screen style.
if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_HOME || launchedFromUid == Process.SHELL_UID) {
- return false;
- } else if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEMUI) {
return true;
+ } else if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEMUI) {
+ return false;
} else {
- // Need to check sourceRecord in case this activity is launched from a service.
+ // Need to check sourceRecord in case this activity is launched from a service or a
+ // trampoline activity.
if (sourceRecord == null) {
sourceRecord = searchCandidateLaunchingActivity();
}
if (sourceRecord != null) {
- return sourceRecord.mSplashScreenStyleSolidColor;
+ return sourceRecord.mAllowIconSplashScreen;
}
// Use an icon if the activity was launched from System for the first start.
- // Otherwise, must use solid color splash screen.
- return mLaunchSourceType != LAUNCH_SOURCE_TYPE_SYSTEM || !startActivity;
+ // Otherwise, can't use an icon splash screen.
+ return mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEM && startActivity;
}
}
@@ -7430,7 +7443,7 @@
final int resolvedTheme = evaluateStartingWindowTheme(prev, packageName, theme,
splashScreenTheme);
- mSplashScreenStyleSolidColor = shouldUseSolidColorSplashScreen(sourceRecord, startActivity,
+ mAllowIconSplashScreen = canUseIconSplashScreen(sourceRecord, startActivity,
startOptions, resolvedTheme);
final boolean activityCreated =
@@ -7442,7 +7455,7 @@
final boolean scheduled = addStartingWindow(packageName, resolvedTheme,
prev, newTask || newSingleActivity, taskSwitch, processRunning,
- allowTaskSnapshot(), activityCreated, mSplashScreenStyleSolidColor, allDrawn);
+ allowTaskSnapshot(), activityCreated, mAllowIconSplashScreen, allDrawn);
if (DEBUG_STARTING_WINDOW_VERBOSE && scheduled) {
Slog.d(TAG, "Scheduled starting window for " + this);
}
diff --git a/services/core/java/com/android/server/wm/StartingSurfaceController.java b/services/core/java/com/android/server/wm/StartingSurfaceController.java
index a55c232..a0517be 100644
--- a/services/core/java/com/android/server/wm/StartingSurfaceController.java
+++ b/services/core/java/com/android/server/wm/StartingSurfaceController.java
@@ -19,12 +19,12 @@
import static android.window.StartingWindowInfo.TYPE_PARAMETER_ACTIVITY_CREATED;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_ACTIVITY_DRAWN;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_ALLOW_HANDLE_SOLID_COLOR_SCREEN;
+import static android.window.StartingWindowInfo.TYPE_PARAMETER_ALLOW_ICON;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_ALLOW_TASK_SNAPSHOT;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_LEGACY_SPLASH_SCREEN;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_NEW_TASK;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_PROCESS_RUNNING;
import static android.window.StartingWindowInfo.TYPE_PARAMETER_TASK_SWITCH;
-import static android.window.StartingWindowInfo.TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN;
import static com.android.server.wm.ActivityRecord.STARTING_WINDOW_TYPE_SNAPSHOT;
import static com.android.server.wm.ActivityRecord.STARTING_WINDOW_TYPE_SPLASH_SCREEN;
@@ -102,7 +102,7 @@
static int makeStartingWindowTypeParameter(boolean newTask, boolean taskSwitch,
boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated,
- boolean isSolidColor, boolean useLegacy, boolean activityDrawn, int startingWindowType,
+ boolean allowIcon, boolean useLegacy, boolean activityDrawn, int startingWindowType,
String packageName, int userId) {
int parameter = 0;
if (newTask) {
@@ -120,8 +120,8 @@
if (activityCreated || startingWindowType == STARTING_WINDOW_TYPE_SNAPSHOT) {
parameter |= TYPE_PARAMETER_ACTIVITY_CREATED;
}
- if (isSolidColor) {
- parameter |= TYPE_PARAMETER_USE_SOLID_COLOR_SPLASH_SCREEN;
+ if (allowIcon) {
+ parameter |= TYPE_PARAMETER_ALLOW_ICON;
}
if (useLegacy) {
parameter |= TYPE_PARAMETER_LEGACY_SPLASH_SCREEN;
diff --git a/services/credentials/java/com/android/server/credentials/CredentialManagerService.java b/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
index 82d39d6..a4adf58 100644
--- a/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
+++ b/services/credentials/java/com/android/server/credentials/CredentialManagerService.java
@@ -35,7 +35,7 @@
import android.credentials.CreateCredentialRequest;
import android.credentials.CredentialOption;
import android.credentials.CredentialProviderInfo;
-import android.credentials.GetCandidateCredentialsRequest;
+import android.credentials.GetCandidateCredentialsException;
import android.credentials.GetCredentialException;
import android.credentials.GetCredentialRequest;
import android.credentials.IClearCredentialStateCallback;
@@ -303,9 +303,9 @@
ComponentName compName = ComponentName.unflattenFromString(serviceName);
if (compName == null) {
Slog.w(
- TAG,
- "Primary provider component name unflatten from string error: "
- + serviceName);
+ TAG,
+ "Primary provider component name unflatten from string error: "
+ + serviceName);
continue;
}
services.add(compName);
@@ -474,13 +474,55 @@
final class CredentialManagerServiceStub extends ICredentialManager.Stub {
@Override
public ICancellationSignal getCandidateCredentials(
- GetCandidateCredentialsRequest request,
+ GetCredentialRequest request,
IGetCandidateCredentialsCallback callback,
final String callingPackage) {
Slog.i(TAG, "starting getCandidateCredentials with callingPackage: "
+ callingPackage);
- // TODO(): Implement
- return CancellationSignal.createTransport();
+ ICancellationSignal cancelTransport = CancellationSignal.createTransport();
+
+ final int userId = UserHandle.getCallingUserId();
+ final int callingUid = Binder.getCallingUid();
+
+ // New request session, scoped for this request only.
+ final GetCandidateRequestSession session =
+ new GetCandidateRequestSession(
+ getContext(),
+ mSessionManager,
+ mLock,
+ userId,
+ callingUid,
+ callback,
+ request,
+ constructCallingAppInfo(callingPackage, userId, request.getOrigin()),
+ getEnabledProvidersForUser(userId),
+ CancellationSignal.fromTransport(cancelTransport)
+ );
+ addSessionLocked(userId, session);
+
+ List<ProviderSession> providerSessions =
+ initiateProviderSessions(
+ session,
+ request.getCredentialOptions().stream()
+ .map(CredentialOption::getType)
+ .collect(Collectors.toList()));
+
+ if (providerSessions.isEmpty()) {
+ try {
+ callback.onError(
+ GetCandidateCredentialsException.TYPE_NO_CREDENTIAL,
+ "No credentials available on this device.");
+ } catch (RemoteException e) {
+ Slog.i(
+ TAG,
+ "Issue invoking onError on IGetCredentialCallback "
+ + "callback: "
+ + e.getMessage());
+ }
+ }
+
+ invokeProviderSessions(providerSessions);
+ return cancelTransport;
}
@Override
@@ -737,7 +779,7 @@
@Override
public void setEnabledProviders(
- List<String> primaryProviders, List<String> providers, int userId,
+ List<String> primaryProviders, List<String> providers, int userId,
ISetEnabledProvidersCallback callback) {
final int callingUid = Binder.getCallingUid();
if (!hasWriteSecureSettingsPermission()) {
@@ -862,9 +904,9 @@
ApiName.GET_CREDENTIAL_PROVIDER_SERVICES,
ApiStatus.SUCCESS, callingUid);
return CredentialProviderInfoFactory
- .getCredentialProviderServices(
- mContext, userId, providerFilter, getEnabledProvidersForUser(userId),
- getPrimaryProvidersForUserId(mContext, userId));
+ .getCredentialProviderServices(
+ mContext, userId, providerFilter, getEnabledProvidersForUser(userId),
+ getPrimaryProvidersForUserId(mContext, userId));
}
@@ -894,13 +936,14 @@
private Set<ComponentName> getEnabledProvidersForUser(int userId) {
final int resolvedUserId = ActivityManager.handleIncomingUser(
- Binder.getCallingPid(), Binder.getCallingUid(),
- userId, false, false,
- "getEnabledProvidersForUser", null);
+ Binder.getCallingPid(), Binder.getCallingUid(),
+ userId, false, false,
+ "getEnabledProvidersForUser", null);
Set<ComponentName> enabledProviders = new HashSet<>();
String directValue = Settings.Secure.getStringForUser(
- mContext.getContentResolver(), Settings.Secure.CREDENTIAL_SERVICE, resolvedUserId);
+ mContext.getContentResolver(), Settings.Secure.CREDENTIAL_SERVICE,
+ resolvedUserId);
if (!TextUtils.isEmpty(directValue)) {
String[] components = directValue.split(":");
diff --git a/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java
new file mode 100644
index 0000000..6d9b7e8
--- /dev/null
+++ b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.credentials;
+
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.Context;
+import android.credentials.CredentialProviderInfo;
+import android.credentials.GetCandidateCredentialsException;
+import android.credentials.GetCandidateCredentialsResponse;
+import android.credentials.GetCredentialRequest;
+import android.credentials.IGetCandidateCredentialsCallback;
+import android.credentials.ui.GetCredentialProviderData;
+import android.credentials.ui.ProviderData;
+import android.credentials.ui.RequestInfo;
+import android.os.CancellationSignal;
+import android.os.RemoteException;
+import android.service.credentials.CallingAppInfo;
+import android.util.Slog;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Central session for a single getCandidateCredentials request. This class listens to the
+ * responses from providers, and updates the provider(s) state.
+ */
+public class GetCandidateRequestSession extends RequestSession<GetCredentialRequest,
+ IGetCandidateCredentialsCallback, GetCandidateCredentialsResponse>
+ implements ProviderSession.ProviderInternalCallback<GetCandidateCredentialsResponse> {
+ private static final String TAG = "GetCandidateRequestSession";
+
+ public GetCandidateRequestSession(
+ Context context, SessionLifetime sessionCallback,
+ Object lock, int userId, int callingUid,
+ IGetCandidateCredentialsCallback callback, GetCredentialRequest request,
+ CallingAppInfo callingAppInfo, Set<ComponentName> enabledProviders,
+ CancellationSignal cancellationSignal) {
+ super(context, sessionCallback, lock, userId, callingUid, request, callback,
+ RequestInfo.TYPE_GET, callingAppInfo, enabledProviders,
+ cancellationSignal, 0L);
+ }
+
+ /**
+ * Creates a new provider session, and adds it list of providers that are contributing to
+ * this session.
+ *
+ * @return the provider session created within this request session, for the given provider
+ * info.
+ */
+ @Override
+ @Nullable
+ public ProviderSession initiateProviderSession(CredentialProviderInfo providerInfo,
+ RemoteCredentialService remoteCredentialService) {
+ ProviderGetSession providerGetCandidateSessions = ProviderGetSession
+ .createNewSession(mContext, mUserId, providerInfo,
+ this, remoteCredentialService);
+ if (providerGetCandidateSessions != null) {
+ Slog.d(TAG, "In startProviderSession - provider session created and "
+ + "being added for: " + providerInfo.getComponentName());
+ mProviders.put(providerGetCandidateSessions.getComponentName().flattenToString(),
+ providerGetCandidateSessions);
+ }
+ return providerGetCandidateSessions;
+ }
+
+ /**
+ * Even though there is no UI involved, this is called when all providers are ready
+ * in our current flow. Eventually can completely separate UI and non UI flows.
+ */
+ @Override
+ protected void launchUiWithProviderData(ArrayList<ProviderData> providerDataList) {
+ if (providerDataList == null || providerDataList.isEmpty()) {
+ respondToClientWithErrorAndFinish(
+ GetCandidateCredentialsException.TYPE_NO_CREDENTIAL,
+ "No credentials found");
+ return;
+ }
+
+ List<GetCredentialProviderData> candidateProviderDataList = new ArrayList<>();
+ for (ProviderData providerData : providerDataList) {
+ candidateProviderDataList.add((GetCredentialProviderData) (providerData));
+ }
+ respondToClientWithResponseAndFinish(new GetCandidateCredentialsResponse(
+ candidateProviderDataList));
+ }
+
+ @Override
+ protected void invokeClientCallbackSuccess(GetCandidateCredentialsResponse response)
+ throws RemoteException {
+ mClientCallback.onResponse(response);
+ }
+
+ @Override
+ protected void invokeClientCallbackError(String errorType, String errorMsg)
+ throws RemoteException {
+ mClientCallback.onError(errorType, errorMsg);
+ }
+
+ @Override
+ public void onFinalErrorReceived(ComponentName componentName, String errorType,
+ String message) {
+ // Not applicable for session without UI
+ }
+
+ @Override
+ public void onUiCancellation(boolean isUserCancellation) {
+ // Not applicable for session without UI
+ }
+
+ @Override
+ public void onUiSelectorInvocationFailure() {
+ // Not applicable for session without UI
+ }
+
+ @Override
+ public void onProviderStatusChanged(ProviderSession.Status status,
+ ComponentName componentName, ProviderSession.CredentialsSource source) {
+ Slog.d(TAG, "in onStatusChanged with status: " + status + ", and source: " + source);
+
+ // For any other status, we check if all providers are done and then invoke UI if needed
+ if (!isAnyProviderPending()) {
+ // If all provider responses have been received, we can either need the UI,
+ // or we need to respond with error. The only other case is the entry being
+ // selected after the UI has been invoked which has a separate code path.
+ if (isUiInvocationNeeded()) {
+ Slog.d(TAG, "in onProviderStatusChanged - isUiInvocationNeeded");
+ getProviderDataAndInitiateUi();
+ } else {
+ respondToClientWithErrorAndFinish(
+ GetCandidateCredentialsException.TYPE_NO_CREDENTIAL,
+ "No credentials available");
+ }
+ }
+ }
+
+ @Override
+ public void onFinalResponseReceived(ComponentName componentName,
+ GetCandidateCredentialsResponse response) {
+ // Not applicable for session without UI
+ }
+}
diff --git a/services/credentials/java/com/android/server/credentials/ProviderGetSession.java b/services/credentials/java/com/android/server/credentials/ProviderGetSession.java
index 3c1432a..3eb6718 100644
--- a/services/credentials/java/com/android/server/credentials/ProviderGetSession.java
+++ b/services/credentials/java/com/android/server/credentials/ProviderGetSession.java
@@ -119,6 +119,42 @@
return null;
}
+ /** Creates a new provider session to be used by the request session. */
+ @Nullable
+ public static ProviderGetSession createNewSession(
+ Context context,
+ @UserIdInt int userId,
+ CredentialProviderInfo providerInfo,
+ GetCandidateRequestSession getRequestSession,
+ RemoteCredentialService remoteCredentialService) {
+ android.credentials.GetCredentialRequest filteredRequest =
+ filterOptions(providerInfo.getCapabilities(),
+ getRequestSession.mClientRequest,
+ providerInfo);
+ if (filteredRequest != null) {
+ Map<String, CredentialOption> beginGetOptionToCredentialOptionMap =
+ new HashMap<>();
+ return new ProviderGetSession(
+ context,
+ providerInfo,
+ getRequestSession,
+ userId,
+ remoteCredentialService,
+ constructQueryPhaseRequest(
+ filteredRequest, getRequestSession.mClientAppInfo,
+ getRequestSession.mClientRequest.alwaysSendAppInfoToProvider(),
+ beginGetOptionToCredentialOptionMap),
+ filteredRequest,
+ getRequestSession.mClientAppInfo,
+ beginGetOptionToCredentialOptionMap,
+ getRequestSession.mHybridService
+ );
+ }
+ Slog.i(TAG, "Unable to create provider session for: "
+ + providerInfo.getComponentName());
+ return null;
+ }
+
private static BeginGetCredentialRequest constructQueryPhaseRequest(
android.credentials.GetCredentialRequest filteredRequest,
CallingAppInfo callingAppInfo,
@@ -192,7 +228,7 @@
public ProviderGetSession(Context context,
CredentialProviderInfo info,
- ProviderInternalCallback<GetCredentialResponse> callbacks,
+ ProviderInternalCallback callbacks,
int userId, RemoteCredentialService remoteCredentialService,
BeginGetCredentialRequest beginGetRequest,
android.credentials.GetCredentialRequest completeGetRequest,
diff --git a/services/permission/java/com/android/server/permission/access/permission/PermissionService.kt b/services/permission/java/com/android/server/permission/access/permission/PermissionService.kt
index 8279600..1e052c0 100644
--- a/services/permission/java/com/android/server/permission/access/permission/PermissionService.kt
+++ b/services/permission/java/com/android/server/permission/access/permission/PermissionService.kt
@@ -1753,10 +1753,19 @@
}
override fun addOnPermissionsChangeListener(listener: IOnPermissionsChangeListener) {
+ context.enforceCallingOrSelfPermission(
+ Manifest.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS, "addOnPermissionsChangeListener"
+ )
+
onPermissionsChangeListeners.addListener(listener)
}
override fun removeOnPermissionsChangeListener(listener: IOnPermissionsChangeListener) {
+ context.enforceCallingOrSelfPermission(
+ Manifest.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS,
+ "removeOnPermissionsChangeListener"
+ )
+
onPermissionsChangeListeners.removeListener(listener)
}
diff --git a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
index 3ab2547..3cf57a3 100644
--- a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
+++ b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
@@ -1445,6 +1445,192 @@
.isEqualTo(expectedNewFlags)
}
+ @Test
+ fun testOnPackageAdded_runtimeExistingImplicitPermissions_sourceFlagsNotInherited() {
+ val oldImplicitPermissionFlags = PermissionFlags.USER_FIXED
+ testInheritImplicitPermissionStates(
+ implicitPermissionFlags = oldImplicitPermissionFlags,
+ isNewInstallAndNewPermission = false
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = oldImplicitPermissionFlags or PermissionFlags.IMPLICIT_GRANTED or
+ PermissionFlags.APP_OP_REVOKED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a permission that is" +
+ " implicit, existing and runtime, it should not inherit the runtime flags from" +
+ " the source permission. Hence the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_nonRuntimeNewImplicitPermissions_sourceFlagsNotInherited() {
+ testInheritImplicitPermissionStates(
+ implicitPermissionProtectionLevel = PermissionInfo.PROTECTION_NORMAL
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a permission that is" +
+ " implicit, new and non-runtime, it should not inherit the runtime flags from" +
+ " the source permission. Hence the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_runtimeNewImplicitPermissions_sourceFlagsInherited() {
+ val sourceRuntimeFlags = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.USER_SET
+ testInheritImplicitPermissionStates(sourceRuntimeFlags = sourceRuntimeFlags)
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = sourceRuntimeFlags or PermissionFlags.IMPLICIT_GRANTED or
+ PermissionFlags.IMPLICIT
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a permission that is" +
+ " implicit, new and runtime, it should inherit the runtime flags from" +
+ " the source permission. Hence the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ @Test
+ fun testOnPackageAdded_grantingNewFromRevokeImplicitPermissions_onlySourceFlagsInherited() {
+ val sourceRuntimeFlags = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.USER_SET
+ testInheritImplicitPermissionStates(
+ implicitPermissionFlags = PermissionFlags.POLICY_FIXED,
+ sourceRuntimeFlags = sourceRuntimeFlags,
+ isAnySourcePermissionNonRuntime = false
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+ val expectedNewFlags = sourceRuntimeFlags or PermissionFlags.IMPLICIT
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a permission that is" +
+ " implicit, existing, runtime and revoked, it should only inherit runtime flags" +
+ " from source permission. Hence the actual permission flags $actualFlags should" +
+ " match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ /**
+ * If it's a media implicit permission (one of RETAIN_IMPLICIT_FLAGS_PERMISSIONS), we want to
+ * remove the IMPLICIT flag so that they will be granted when they are no longer implicit.
+ * (instead of revoking it)
+ */
+ @Test
+ fun testOnPackageAdded_mediaImplicitPermissions_getsImplicitFlagRemoved() {
+ val sourceRuntimeFlags = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.USER_SET
+ testInheritImplicitPermissionStates(
+ implicitPermissionName = PERMISSION_ACCESS_MEDIA_LOCATION,
+ sourceRuntimeFlags = sourceRuntimeFlags
+ )
+
+ val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_ACCESS_MEDIA_LOCATION)
+ val expectedNewFlags = sourceRuntimeFlags or PermissionFlags.IMPLICIT_GRANTED
+ assertWithMessage(
+ "After onPackageAdded() is called for a package that requests a media permission that" +
+ " is implicit, new and runtime, it should inherit the runtime flags from" +
+ " the source permission and have the IMPLICIT flag removed. Hence the actual" +
+ " permission flags $actualFlags should match the expected flags $expectedNewFlags"
+ )
+ .that(actualFlags)
+ .isEqualTo(expectedNewFlags)
+ }
+
+ private fun testInheritImplicitPermissionStates(
+ implicitPermissionName: String = PERMISSION_NAME_0,
+ implicitPermissionFlags: Int = 0,
+ implicitPermissionProtectionLevel: Int = PermissionInfo.PROTECTION_DANGEROUS,
+ sourceRuntimeFlags: Int = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.USER_SET,
+ isAnySourcePermissionNonRuntime: Boolean = true,
+ isNewInstallAndNewPermission: Boolean = true
+ ) {
+ val implicitPermission = mockParsedPermission(
+ implicitPermissionName,
+ PACKAGE_NAME_0,
+ protectionLevel = implicitPermissionProtectionLevel,
+ )
+ // For source from non-runtime in order to grant by implicit
+ val sourcePermission1 = mockParsedPermission(
+ PERMISSION_NAME_1,
+ PACKAGE_NAME_0,
+ protectionLevel = if (isAnySourcePermissionNonRuntime) {
+ PermissionInfo.PROTECTION_NORMAL
+ } else {
+ PermissionInfo.PROTECTION_DANGEROUS
+ }
+ )
+ // For inheriting runtime flags
+ val sourcePermission2 = mockParsedPermission(
+ PERMISSION_NAME_2,
+ PACKAGE_NAME_0,
+ protectionLevel = PermissionInfo.PROTECTION_DANGEROUS,
+ )
+ val permissionOwnerPackageState = mockPackageState(
+ APP_ID_0,
+ mockAndroidPackage(
+ PACKAGE_NAME_0,
+ permissions = listOf(implicitPermission, sourcePermission1, sourcePermission2)
+ )
+ )
+ val installedPackageState = mockPackageState(
+ APP_ID_1,
+ mockAndroidPackage(
+ PACKAGE_NAME_1,
+ requestedPermissions = setOf(
+ implicitPermissionName,
+ PERMISSION_NAME_1,
+ PERMISSION_NAME_2
+ ),
+ implicitPermissions = setOf(implicitPermissionName)
+ )
+ )
+ oldState.mutateExternalState().setImplicitToSourcePermissions(
+ MutableIndexedMap<String, IndexedListSet<String>>().apply {
+ put(implicitPermissionName, MutableIndexedListSet<String>().apply {
+ add(PERMISSION_NAME_1)
+ add(PERMISSION_NAME_2)
+ })
+ }
+ )
+ addPackageState(permissionOwnerPackageState)
+ addPermission(implicitPermission)
+ addPermission(sourcePermission1)
+ addPermission(sourcePermission2)
+ if (!isNewInstallAndNewPermission) {
+ addPackageState(installedPackageState)
+ setPermissionFlags(APP_ID_1, USER_ID_0, implicitPermissionName, implicitPermissionFlags)
+ }
+ setPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_2, sourceRuntimeFlags)
+
+ mutateState {
+ if (isNewInstallAndNewPermission) {
+ addPackageState(installedPackageState)
+ setPermissionFlags(
+ APP_ID_1,
+ USER_ID_0,
+ implicitPermissionName,
+ implicitPermissionFlags,
+ newState
+ )
+ }
+ with(appIdPermissionPolicy) {
+ onPackageAdded(installedPackageState)
+ }
+ }
+ }
+
/**
* Setup simple package states for testing evaluatePermissionState().
* permissionOwnerPackageState is definer of permissionName with APP_ID_0.
@@ -1734,6 +1920,7 @@
private const val PERMISSION_NAME_0 = "permissionName0"
private const val PERMISSION_NAME_1 = "permissionName1"
+ private const val PERMISSION_NAME_2 = "permissionName2"
private const val PERMISSION_READ_EXTERNAL_STORAGE =
Manifest.permission.READ_EXTERNAL_STORAGE
private const val PERMISSION_POST_NOTIFICATIONS =
@@ -1742,6 +1929,8 @@
Manifest.permission.BLUETOOTH_CONNECT
private const val PERMISSION_ACCESS_BACKGROUND_LOCATION =
Manifest.permission.ACCESS_BACKGROUND_LOCATION
+ private const val PERMISSION_ACCESS_MEDIA_LOCATION =
+ Manifest.permission.ACCESS_MEDIA_LOCATION
private const val USER_ID_0 = 0
}
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
index a11a8f5..d2e83e9 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
@@ -87,6 +87,8 @@
public void setUp() {
when(mContext.getResources()).thenReturn(mResources);
+ when(mResources.getBoolean(eq(R.bool.config_biometricFrrNotificationEnabled)))
+ .thenReturn(true);
when(mResources.getFraction(eq(R.fraction.config_biometricNotificationFrrThreshold),
anyInt(), anyInt())).thenReturn(FRR_THRESHOLD);
@@ -110,7 +112,6 @@
0 /* modality */, mBiometricNotification);
}
-
@Test
public void authenticate_authenticationSucceeded_mapShouldBeUpdated() {
// Assert that the user doesn't exist in the map initially.
@@ -342,4 +343,32 @@
// Assert that notification count has been updated.
assertThat(authenticationStats.getEnrollmentNotifications()).isEqualTo(1);
}
+
+ @Test
+ public void authenticate_featureDisabled_mapMustNotBeUpdated() {
+ // Disable the feature.
+ when(mResources.getBoolean(eq(R.bool.config_biometricFrrNotificationEnabled)))
+ .thenReturn(false);
+ AuthenticationStatsCollector authenticationStatsCollector =
+ new AuthenticationStatsCollector(mContext, 0 /* modality */,
+ mBiometricNotification);
+
+ authenticationStatsCollector.setAuthenticationStatsForUser(USER_ID_1,
+ new AuthenticationStats(USER_ID_1, 500 /* totalAttempts */,
+ 400 /* rejectedAttempts */, 0 /* enrollmentNotifications */,
+ 0 /* modality */));
+
+ authenticationStatsCollector.authenticate(USER_ID_1, false /* authenticated */);
+
+ // Assert that no notification should be sent.
+ verify(mBiometricNotification, never()).sendFaceEnrollNotification(any());
+ verify(mBiometricNotification, never()).sendFpEnrollNotification(any());
+ // Assert that data hasn't been updated.
+ AuthenticationStats authenticationStats = authenticationStatsCollector
+ .getAuthenticationStatsForUser(USER_ID_1);
+ assertThat(authenticationStats.getTotalAttempts()).isEqualTo(500);
+ assertThat(authenticationStats.getRejectedAttempts()).isEqualTo(400);
+ assertThat(authenticationStats.getEnrollmentNotifications()).isEqualTo(0);
+ assertThat(authenticationStats.getFrr()).isWithin(0f).of(0.8f);
+ }
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
index ae58700..8ec3ac6 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
@@ -2871,14 +2871,14 @@
.setTask(sourceRecord.getTask()).build();
secondRecord.showStartingWindow(null /* prev */, true /* newTask */, false,
true /* startActivity */, sourceRecord);
- assertFalse(secondRecord.mSplashScreenStyleSolidColor);
+ assertTrue(secondRecord.mAllowIconSplashScreen);
secondRecord.onStartingWindowDrawn();
final ActivityRecord finalRecord = new ActivityBuilder(mAtm)
.setTask(sourceRecord.getTask()).build();
finalRecord.showStartingWindow(null /* prev */, true /* newTask */, false,
true /* startActivity */, secondRecord);
- assertTrue(finalRecord.mSplashScreenStyleSolidColor);
+ assertFalse(finalRecord.mAllowIconSplashScreen);
}
@Test
diff --git a/tools/lint/fix/soong_lint_fix.py b/tools/lint/fix/soong_lint_fix.py
index acc0ad0..b42f9ee 100644
--- a/tools/lint/fix/soong_lint_fix.py
+++ b/tools/lint/fix/soong_lint_fix.py
@@ -64,27 +64,27 @@
class SoongLintFix:
"""
- This class creates a command line tool that will
- apply lint fixes to the platform via the necessary
- combination of soong and shell commands.
+ This class creates a command line tool that will apply lint fixes to the
+ platform via the necessary combination of soong and shell commands.
- It breaks up these operations into a few "private" methods
- that are intentionally exposed so experimental code can tweak behavior.
+ It breaks up these operations into a few "private" methods that are
+ intentionally exposed so experimental code can tweak behavior.
- The entry point, `run`, will apply lint fixes using the
- intermediate `suggested-fixes` directory that soong creates during its
- invocation of lint.
+ The entry point, `run`, will apply lint fixes using the intermediate
+ `suggested-fixes` directory that soong creates during its invocation of
+ lint.
Basic usage:
```
from soong_lint_fix import SoongLintFix
- SoongLintFix().run()
+ opts = SoongLintFixOptions()
+ opts.parse_args(sys.argv)
+ SoongLintFix(opts).run()
```
"""
- def __init__(self):
- self._parser = _setup_parser()
- self._args = None
+ def __init__(self, opts):
+ self._opts = opts
self._kwargs = None
self._modules = []
@@ -96,19 +96,18 @@
self._find_modules()
self._lint()
- if not self._args.no_fix:
+ if not self._opts.no_fix:
self._fix()
- if self._args.print:
+ if self._opts.print:
self._print()
def _setup(self):
- self._args = self._parser.parse_args()
env = os.environ.copy()
- if self._args.check:
- env["ANDROID_LINT_CHECK"] = self._args.check
- if self._args.lint_module:
- env["ANDROID_LINT_CHECK_EXTRA_MODULES"] = self._args.lint_module
+ if self._opts.check:
+ env["ANDROID_LINT_CHECK"] = self._opts.check
+ if self._opts.lint_module:
+ env["ANDROID_LINT_CHECK_EXTRA_MODULES"] = self._opts.lint_module
self._kwargs = {
"env": env,
@@ -131,7 +130,7 @@
with open(f"{ANDROID_PRODUCT_OUT}/module-info.json") as f:
module_info = json.load(f)
- for module_name in self._args.modules:
+ for module_name in self._opts.modules:
module = SoongModule(module_name)
module.find(module_info)
self._modules.append(module)
@@ -169,6 +168,20 @@
print(f.read())
+class SoongLintFixOptions:
+ """Options for SoongLintFix"""
+
+ def __init__(self):
+ self.modules = []
+ self.check = None
+ self.lint_module = None
+ self.no_fix = False
+ self.print = False
+
+ def parse_args(self, args=None):
+ _setup_parser().parse_args(args, self)
+
+
def _setup_parser():
parser = argparse.ArgumentParser(description="""
This is a python script that applies lint fixes to the platform:
@@ -199,4 +212,6 @@
return parser
if __name__ == "__main__":
- SoongLintFix().run()
+ opts = SoongLintFixOptions()
+ opts.parse_args(sys.argv)
+ SoongLintFix(opts).run()
diff --git a/tools/lint/utils/Android.bp b/tools/lint/utils/Android.bp
index 75e8d68..439c86d 100644
--- a/tools/lint/utils/Android.bp
+++ b/tools/lint/utils/Android.bp
@@ -43,3 +43,9 @@
"AndroidUtilsLintChecker",
],
}
+
+python_binary_host {
+ name: "enforce_permission_counter",
+ srcs: ["enforce_permission_counter.py"],
+ libs: ["soong_lint_fix"],
+}
diff --git a/tools/lint/utils/enforce_permission_counter.py b/tools/lint/utils/enforce_permission_counter.py
new file mode 100644
index 0000000..b5c2ffe
--- /dev/null
+++ b/tools/lint/utils/enforce_permission_counter.py
@@ -0,0 +1,82 @@
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import re
+
+import soong_lint_fix
+
+# Libraries that constitute system_server.
+# It is non-trivial to keep in sync with services/Android.bp as some
+# module are post-processed (e.g, services.core).
+TARGETS = [
+ "services.core.unboosted",
+ "services.accessibility",
+ "services.appprediction",
+ "services.appwidget",
+ "services.autofill",
+ "services.backup",
+ "services.companion",
+ "services.contentcapture",
+ "services.contentsuggestions",
+ "services.coverage",
+ "services.devicepolicy",
+ "services.midi",
+ "services.musicsearch",
+ "services.net",
+ "services.people",
+ "services.print",
+ "services.profcollect",
+ "services.restrictions",
+ "services.searchui",
+ "services.smartspace",
+ "services.systemcaptions",
+ "services.translation",
+ "services.texttospeech",
+ "services.usage",
+ "services.usb",
+ "services.voiceinteraction",
+ "services.wallpapereffectsgeneration",
+ "services.wifi",
+]
+
+
+class EnforcePermissionMigratedCounter:
+ """Wrapper around lint_fix to count the number of AIDL methods annotated."""
+ def run(self):
+ opts = soong_lint_fix.SoongLintFixOptions()
+ opts.check = "AnnotatedAidlCounter"
+ opts.lint_module = "AndroidUtilsLintChecker"
+ opts.no_fix = True
+ opts.modules = TARGETS
+
+ self.linter = soong_lint_fix.SoongLintFix(opts)
+ self.linter.run()
+ self.parse_lint_reports()
+
+ def parse_lint_reports(self):
+ counts = { "unannotated": 0, "enforced": 0, "notRequired": 0 }
+ for module in self.linter._modules:
+ with open(module.lint_report, "r") as f:
+ content = f.read()
+ keys = dict(re.findall(r'(\w+)=(\d+)', content))
+ for key in keys:
+ counts[key] += int(keys[key])
+ print(counts)
+ total = sum(counts.values())
+ annotated_percent = (1 - (counts["unannotated"] / total)) * 100
+ print("Annotated methods = %.2f%%" % (annotated_percent))
+
+
+if __name__ == "__main__":
+ EnforcePermissionMigratedCounter().run()