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

Commit 220cd77d authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2

parents e3b80c83 426431ad
Loading
Loading
Loading
Loading
+320 −1
Original line number Original line Diff line number Diff line
@@ -15208,6 +15208,325 @@
 visibility="public"
 visibility="public"
>
>
</field>
</field>
<field name="TextAppearance_Holo"
 type="int"
 transient="false"
 volatile="false"
 value="16974075"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_DialogWindowTitle"
 type="int"
 transient="false"
 volatile="false"
 value="16974103"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Inverse"
 type="int"
 transient="false"
 volatile="false"
 value="16974076"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Large"
 type="int"
 transient="false"
 volatile="false"
 value="16974077"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Large_Inverse"
 type="int"
 transient="false"
 volatile="false"
 value="16974078"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Medium"
 type="int"
 transient="false"
 volatile="false"
 value="16974079"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Medium_Inverse"
 type="int"
 transient="false"
 volatile="false"
 value="16974080"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_SearchResult_Subtitle"
 type="int"
 transient="false"
 volatile="false"
 value="16974084"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_SearchResult_Title"
 type="int"
 transient="false"
 volatile="false"
 value="16974083"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Small"
 type="int"
 transient="false"
 volatile="false"
 value="16974081"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Small_Inverse"
 type="int"
 transient="false"
 volatile="false"
 value="16974082"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget"
 type="int"
 transient="false"
 volatile="false"
 value="16974085"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_ActionBar_Subtitle"
 type="int"
 transient="false"
 volatile="false"
 value="16974099"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_ActionBar_Title"
 type="int"
 transient="false"
 volatile="false"
 value="16974098"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_ActionMode_Subtitle"
 type="int"
 transient="false"
 volatile="false"
 value="16974101"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_ActionMode_Title"
 type="int"
 transient="false"
 volatile="false"
 value="16974100"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_Button"
 type="int"
 transient="false"
 volatile="false"
 value="16974086"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_DropDownHint"
 type="int"
 transient="false"
 volatile="false"
 value="16974091"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_DropDownItem"
 type="int"
 transient="false"
 volatile="false"
 value="16974092"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_EditText"
 type="int"
 transient="false"
 volatile="false"
 value="16974094"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_IconMenu_Item"
 type="int"
 transient="false"
 volatile="false"
 value="16974087"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_PopupMenu"
 type="int"
 transient="false"
 volatile="false"
 value="16974095"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_PopupMenu_Large"
 type="int"
 transient="false"
 volatile="false"
 value="16974096"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_PopupMenu_Small"
 type="int"
 transient="false"
 volatile="false"
 value="16974097"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_TabWidget"
 type="int"
 transient="false"
 volatile="false"
 value="16974088"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_TextView"
 type="int"
 transient="false"
 volatile="false"
 value="16974089"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_TextView_PopupMenu"
 type="int"
 transient="false"
 volatile="false"
 value="16974090"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_Widget_TextView_SpinnerItem"
 type="int"
 transient="false"
 volatile="false"
 value="16974093"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Holo_WindowTitle"
 type="int"
 transient="false"
 volatile="false"
 value="16974102"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TextAppearance_Inverse"
<field name="TextAppearance_Inverse"
 type="int"
 type="int"
 transient="false"
 transient="false"
@@ -144465,7 +144784,7 @@
 type="int"
 type="int"
 transient="false"
 transient="false"
 volatile="false"
 volatile="false"
 value="10000"
 value="13"
 static="true"
 static="true"
 final="true"
 final="true"
 deprecated="not deprecated"
 deprecated="not deprecated"
+2 −2
Original line number Original line Diff line number Diff line
@@ -232,7 +232,7 @@ public class Build {
        public static final int HONEYCOMB_MR1 = 12;
        public static final int HONEYCOMB_MR1 = 12;
        
        
        /**
        /**
         * Current development version.
         * June 2011: Android 3.2.
         *
         *
         * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve
         * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve
         * screen compatibility mode, etc.</p>
         * screen compatibility mode, etc.</p>
@@ -244,7 +244,7 @@ public class Build {
         * large as the current screen will provide the user with a UI to
         * large as the current screen will provide the user with a UI to
         * switch them in to screen size compatibility mode.</p>
         * switch them in to screen size compatibility mode.</p>
         */
         */
        public static final int HONEYCOMB_MR2 = CUR_DEVELOPMENT;
        public static final int HONEYCOMB_MR2 = 13;
    }
    }
    
    
    /** The type of build, like "user" or "eng". */
    /** The type of build, like "user" or "eng". */
+29 −0
Original line number Original line Diff line number Diff line
@@ -1670,5 +1670,34 @@
  <public type="style" name="Widget.Holo.Light.ActionBar.TabView" />
  <public type="style" name="Widget.Holo.Light.ActionBar.TabView" />
  <public type="style" name="Widget.Holo.Light.ActionBar.TabText" />
  <public type="style" name="Widget.Holo.Light.ActionBar.TabText" />
  <public type="style" name="Widget.Holo.Light.ActionBar.TabBar" />
  <public type="style" name="Widget.Holo.Light.ActionBar.TabBar" />
  <public type="style" name="TextAppearance.Holo" />
  <public type="style" name="TextAppearance.Holo.Inverse" />
  <public type="style" name="TextAppearance.Holo.Large" />
  <public type="style" name="TextAppearance.Holo.Large.Inverse" />
  <public type="style" name="TextAppearance.Holo.Medium" />
  <public type="style" name="TextAppearance.Holo.Medium.Inverse" />
  <public type="style" name="TextAppearance.Holo.Small" />
  <public type="style" name="TextAppearance.Holo.Small.Inverse" />
  <public type="style" name="TextAppearance.Holo.SearchResult.Title" />
  <public type="style" name="TextAppearance.Holo.SearchResult.Subtitle" />
  <public type="style" name="TextAppearance.Holo.Widget" />
  <public type="style" name="TextAppearance.Holo.Widget.Button" />
  <public type="style" name="TextAppearance.Holo.Widget.IconMenu.Item" />
  <public type="style" name="TextAppearance.Holo.Widget.TabWidget" />
  <public type="style" name="TextAppearance.Holo.Widget.TextView" />
  <public type="style" name="TextAppearance.Holo.Widget.TextView.PopupMenu" />
  <public type="style" name="TextAppearance.Holo.Widget.DropDownHint" />
  <public type="style" name="TextAppearance.Holo.Widget.DropDownItem" />
  <public type="style" name="TextAppearance.Holo.Widget.TextView.SpinnerItem" />
  <public type="style" name="TextAppearance.Holo.Widget.EditText" />
  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu" />
  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu.Large" />
  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu.Small" />
  <public type="style" name="TextAppearance.Holo.Widget.ActionBar.Title" />
  <public type="style" name="TextAppearance.Holo.Widget.ActionBar.Subtitle" />
  <public type="style" name="TextAppearance.Holo.Widget.ActionMode.Title" />
  <public type="style" name="TextAppearance.Holo.Widget.ActionMode.Subtitle" />
  <public type="style" name="TextAppearance.Holo.WindowTitle" />
  <public type="style" name="TextAppearance.Holo.DialogWindowTitle" />


</resources>
</resources>
+2 −1
Original line number Original line Diff line number Diff line
@@ -1988,7 +1988,8 @@ public:
                                  String16* outName,
                                  String16* outName,
                                  const String16* defType = NULL,
                                  const String16* defType = NULL,
                                  const String16* defPackage = NULL,
                                  const String16* defPackage = NULL,
                                  const char** outErrorMsg = NULL);
                                  const char** outErrorMsg = NULL,
                                  bool* outPublicOnly = NULL);


    static bool stringToInt(const char16_t* s, size_t len, Res_value* outValue);
    static bool stringToInt(const char16_t* s, size_t len, Res_value* outValue);
    static bool stringToFloat(const char16_t* s, size_t len, Res_value* outValue);
    static bool stringToFloat(const char16_t* s, size_t len, Res_value* outValue);
+30 −2
Original line number Original line Diff line number Diff line
@@ -2499,6 +2499,9 @@ uint32_t ResTable::identifierForName(const char16_t* name, size_t nameLen,
                    goto nope;
                    goto nope;
                }
                }
            }
            }
            if (outTypeSpecFlags) {
                *outTypeSpecFlags = ResTable_typeSpec::SPEC_PUBLIC;
            }
            return m->id;
            return m->id;
nope:
nope:
            ;
            ;
@@ -2513,6 +2516,9 @@ nope:
                         index);
                         index);
                    return 0;
                    return 0;
                }
                }
                if (outTypeSpecFlags) {
                    *outTypeSpecFlags = ResTable_typeSpec::SPEC_PUBLIC;
                }
                return  Res_MAKEARRAY(index);
                return  Res_MAKEARRAY(index);
            }
            }
        }
        }
@@ -2523,6 +2529,8 @@ nope:
        return 0;
        return 0;
    }
    }


    bool fakePublic = false;

    // Figure out the package and type we are looking in...
    // Figure out the package and type we are looking in...


    const char16_t* packageEnd = NULL;
    const char16_t* packageEnd = NULL;
@@ -2534,7 +2542,13 @@ nope:
        else if (*p == '/') typeEnd = p;
        else if (*p == '/') typeEnd = p;
        p++;
        p++;
    }
    }
    if (*name == '@') name++;
    if (*name == '@') {
        name++;
        if (*name == '*') {
            fakePublic = true;
            name++;
        }
    }
    if (name >= nameEnd) {
    if (name >= nameEnd) {
        return 0;
        return 0;
    }
    }
@@ -2639,6 +2653,9 @@ nope:
                if (dtohl(entry->key.index) == (size_t)ei) {
                if (dtohl(entry->key.index) == (size_t)ei) {
                    if (outTypeSpecFlags) {
                    if (outTypeSpecFlags) {
                        *outTypeSpecFlags = typeConfigs->typeSpecFlags[i];
                        *outTypeSpecFlags = typeConfigs->typeSpecFlags[i];
                        if (fakePublic) {
                            *outTypeSpecFlags |= ResTable_typeSpec::SPEC_PUBLIC;
                        }
                    }
                    }
                    return Res_MAKEID(group->id-1, ti, i);
                    return Res_MAKEID(group->id-1, ti, i);
                }
                }
@@ -2655,7 +2672,8 @@ bool ResTable::expandResourceRef(const uint16_t* refStr, size_t refLen,
                                 String16* outName,
                                 String16* outName,
                                 const String16* defType,
                                 const String16* defType,
                                 const String16* defPackage,
                                 const String16* defPackage,
                                 const char** outErrorMsg)
                                 const char** outErrorMsg,
                                 bool* outPublicOnly)
{
{
    const char16_t* packageEnd = NULL;
    const char16_t* packageEnd = NULL;
    const char16_t* typeEnd = NULL;
    const char16_t* typeEnd = NULL;
@@ -2672,6 +2690,16 @@ bool ResTable::expandResourceRef(const uint16_t* refStr, size_t refLen,
    p = refStr;
    p = refStr;
    if (*p == '@') p++;
    if (*p == '@') p++;


    if (outPublicOnly != NULL) {
        *outPublicOnly = true;
    }
    if (*p == '*') {
        p++;
        if (outPublicOnly != NULL) {
            *outPublicOnly = false;
        }
    }

    if (packageEnd) {
    if (packageEnd) {
        *outPackage = String16(p, packageEnd-p);
        *outPackage = String16(p, packageEnd-p);
        p = packageEnd+1;
        p = packageEnd+1;
Loading