Files
frameworks_base/libs/androidfw/tests/data/overlayable/R.h
Ryan Mitchell 75e20dda2b Encoding of <overlayable> and <policy>
This change defines two new chunks for encoding overlayable information.
RES_TABLE_OVERLAYABLE_POLICY_TYPE contains flags that represent
restrictions enforced on overlays that try to overlay a specific set of
resource ids. The chunk header is followed by ResTable_ref for each id
that belongs to the policy type. A policy chunk will be created for
every unique combination of policies that are defined in overlayable
declarations.

RES_TABLE_OVERLAYABLE_TYPE holds policy blocks. Since <overlayable>
does not currently have any attributes, only one overlayable block is
encoded in an APK.

This change also removes the SPEC_OVERLAYABLE flag because the runtime
does not use the flag, and the overlayable chunk encoding renders it
obsolete.

Bug: 110869880
Bug: 117545186
Test: libandroidfw_tests and aapt2_tests
Change-Id: I45ae9bf4176699f14c85e2b7a2e8560185d8a0b8
2018-12-04 16:45:26 -08:00

43 lines
1.1 KiB
C++

/*
* Copyright (C) 2018 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 TESTS_DATA_OVERLAYABLE_R_H_
#define TESTS_DATA_OVERLAYABLE_R_H_
#include <cstdint>
namespace com {
namespace android {
namespace overlayable {
struct R {
struct string {
enum : uint32_t {
not_overlayable = 0x7f010000,
overlayable1 = 0x7f010001,
overlayable2 = 0x7f010002,
overlayable3 = 0x7f010003,
overlayable4 = 0x7f010004,
};
};
};
} // namespace overlayable
} // namespace android
} // namespace com
#endif /* TESTS_DATA_OVERLAYABLE_R_H_ */