1 2 /* 3 * Copyright (C) 2021 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package android.app; 19 20 import android.app.LocaleConfig; 21 import android.os.LocaleList; 22 23 /** 24 * Internal interface used to control app-specific locales. 25 * 26 * <p>Use the {@link android.app.LocaleManager} class rather than going through 27 * this Binder interface directly. See {@link android.app.LocaleManager} for 28 * more complete documentation. 29 * 30 * @hide 31 */ 32 interface ILocaleManager { 33 /** 34 * Sets a specified app’s app-specific UI locales. 35 */ setApplicationLocales(String packageName, int userId, in LocaleList locales, boolean fromDelegate)36 void setApplicationLocales(String packageName, int userId, in LocaleList locales, boolean fromDelegate); 37 38 /** 39 * Returns the specified app's app-specific locales. 40 */ getApplicationLocales(String packageName, int userId)41 LocaleList getApplicationLocales(String packageName, int userId); 42 43 /** 44 * Returns the current system locales. 45 */ getSystemLocales()46 LocaleList getSystemLocales(); 47 setOverrideLocaleConfig(String packageName, int userId, in LocaleConfig localeConfig)48 void setOverrideLocaleConfig(String packageName, int userId, in LocaleConfig localeConfig); 49 getOverrideLocaleConfig(String packageName, int userId)50 LocaleConfig getOverrideLocaleConfig(String packageName, int userId); 51 } 52