Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 836d0bdc authored by mrulhania's avatar mrulhania
Browse files

Add "contentSensitivity" xml attribute for View

Bug: 322886920
Test: atest CtsSensitiveContentProtectionTestCases
Change-Id: I8545806f2c50e244a82a79c164d036474c073d35
parent e9d40b30
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -653,6 +653,7 @@ package android {
    field public static final int contentInsetRight = 16843862; // 0x1010456
    field public static final int contentInsetStart = 16843859; // 0x1010453
    field public static final int contentInsetStartWithNavigation = 16844066; // 0x1010522
    field @FlaggedApi("android.view.flags.sensitive_content_app_protection_api") public static final int contentSensitivity;
    field public static final int contextClickable = 16844007; // 0x10104e7
    field public static final int contextDescription = 16844078; // 0x101052e
    field public static final int contextPopupMenuStyle = 16844033; // 0x1010501
+3 −0
Original line number Diff line number Diff line
@@ -6364,6 +6364,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                case R.styleable.View_handwritingBoundsOffsetBottom:
                    mHandwritingBoundsOffsetBottom = a.getDimension(attr, 0);
                    break;
                case R.styleable.View_contentSensitivity:
                    setContentSensitivity(a.getInt(attr, CONTENT_SENSITIVITY_AUTO));
                    break;
            }
        }
+12 −0
Original line number Diff line number Diff line
@@ -3641,6 +3641,18 @@
             <p> The default value is 40dp for {@link android.widget.TextView} and
             {@link android.widget.EditText}, and 0dp for all other views. -->
        <attr name="handwritingBoundsOffsetBottom" format="dimension" />
        <!-- Sets whether this view renders sensitive content. -->
        <!-- @FlaggedApi("android.view.flags.sensitive_content_app_protection_api") -->
        <attr name="contentSensitivity">
            <!-- Let the Android System use its heuristics to determine if the view renders
             sensitive content. -->
            <enum name="auto" value="0" />
            <!-- This view renders sensitive content. -->
            <enum name="sensitive" value="0x1" />
            <!-- This view doesn't render sensitive content. -->
            <enum name="notSensitive" value="0x2" />
        </attr>
    </declare-styleable>
    <!-- Attributes that can be assigned to a tag for a particular View. -->
+2 −0
Original line number Diff line number Diff line
@@ -155,6 +155,8 @@
    <public name="languageSettingsActivity"/>
    <!-- @FlaggedApi("com.android.text.flags.fix_line_height_for_locale") -->
    <public name="useLocalePreferredLineHeightForMinimum"/>
    <!-- @FlaggedApi("android.view.flags.sensitive_content_app_protection_api") -->
    <public name="contentSensitivity" />
  </staging-public-group>

  <staging-public-group type="id" first-id="0x01bc0000">