diff options
author | Nick Chalko <nchalko@google.com> | 2019-07-01 19:28:32 -0700 |
---|---|---|
committer | Nick Chalko <nchalko@google.com> | 2019-07-08 11:22:13 -0700 |
commit | d976f4e0b4a2e929a8395fd77cc86c42a1d8a794 (patch) | |
tree | 397d565a11b9c536928a7d1f298f6cab261b8bc0 /common | |
parent | 558dbc9e4bcf80f6d36be40ec1927ecadf890bf0 (diff) | |
download | TV-d976f4e0b4a2e929a8395fd77cc86c42a1d8a794.tar.gz |
Add flags for hiding new message translation.
The flag will be retired when the translation is available.
PiperOrigin-RevId: 256082692
Change-Id: I7578365688dcc2d8c888b77e3e0e665c283f998f
Diffstat (limited to 'common')
-rwxr-xr-x | common/src/com/android/tv/common/flags/MessagesFlags.java | 37 | ||||
-rw-r--r-- | common/src/com/android/tv/common/flags/impl/DefaultMessagesFlags.java | 34 |
2 files changed, 71 insertions, 0 deletions
diff --git a/common/src/com/android/tv/common/flags/MessagesFlags.java b/common/src/com/android/tv/common/flags/MessagesFlags.java new file mode 100755 index 00000000..b5411d78 --- /dev/null +++ b/common/src/com/android/tv/common/flags/MessagesFlags.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2019 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.tv.common.flags; + +/** + * Message flags. + * + * <p>Used to hide new messages until all translations are ready. + * + * <p>Production releases never include the messages protected by these flags. + */ +public interface MessagesFlags { + + /** + * Whether or not this feature is compiled into this build. + * + * <p>This returns true by default, unless the is_compiled_selector parameter was set during + * code generation. + */ + boolean compiled(); + + /** Use setup_sources_description2 */ + boolean setupSourcesDescription2(); +} diff --git a/common/src/com/android/tv/common/flags/impl/DefaultMessagesFlags.java b/common/src/com/android/tv/common/flags/impl/DefaultMessagesFlags.java new file mode 100644 index 00000000..091f422f --- /dev/null +++ b/common/src/com/android/tv/common/flags/impl/DefaultMessagesFlags.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019 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.tv.common.flags.impl; + +/** + * Default flag values for {@link + * com.android.tv.common.flags.MessagesFlags}. + */ +public final class DefaultMessagesFlags + implements com.android.tv.common.flags.MessagesFlags { + + @Override + public boolean compiled() { + return true; + } + + @Override + public boolean setupSourcesDescription2() { + return false; + } +} |