When shared libraries are assigned package ids in a different order than compile order, bag resources that use attributes from both multiple libraries will not be sorted in ascending attribute id order. This change detects when the attribute ids are not in order and sorts the bag entries accordingly. The change is designed to be less invasive. Deduping the GetBag logic should probably be spun off in a separate bug. Bug: 147674078 Test: libandroidfw_tests Change-Id: Id8ce8e9c7ef294fcc312b77468136067d392dbd0
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2014 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.
|
|
*/
|
|
|
|
#ifndef TEST_DATA_LIB_R_H_
|
|
#define TEST_DATA_LIB_R_H_
|
|
|
|
#include <cstdint>
|
|
|
|
namespace com {
|
|
namespace android {
|
|
namespace libclient {
|
|
|
|
struct R {
|
|
struct attr {
|
|
enum : uint32_t {
|
|
foo = 0x7f010000, // default
|
|
bar = 0x7f010001, // default
|
|
};
|
|
};
|
|
|
|
struct style {
|
|
enum : uint32_t {
|
|
Theme = 0x7f020000, // default
|
|
ThemeMultiLib = 0x7f020001, // default
|
|
};
|
|
};
|
|
|
|
struct string {
|
|
enum : uint32_t {
|
|
foo_one = 0x7f030000, // default
|
|
foo_two = 0x7f030001, // default
|
|
};
|
|
};
|
|
};
|
|
|
|
} // namespace libclient
|
|
} // namespace android
|
|
} // namespace com
|
|
|
|
#endif // TEST_DATA_R_H_
|