api-impl: add misc stubs/impls

This commit is contained in:
Mis012
2024-06-22 14:22:37 +02:00
parent da90302946
commit df074bd2b4
6 changed files with 572 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package android.content.res;
import android.content.pm.ActivityInfo;
// import android.text.TextUtils;
import android.os.LocaleList;
import android.view.View;
import java.util.Locale;
@@ -1446,6 +1447,34 @@ public final class Configuration implements Comparable<Configuration> {
return result;
}
/**
* Get the locale list. This is the preferred way for getting the locales (instead of using
* the direct accessor to {@link #locale}, which would only provide the primary locale).
*
* @return The locale list.
*/
public LocaleList getLocales() {
return new LocaleList();
/*fixUpLocaleList();
return mLocaleList;*/
}
/**
* Set the locale list. This is the preferred way for setting up the locales (instead of using
* the direct accessor or {@link #setLocale(Locale)}). This will also set the layout direction
* according to the first locale in the list.
*
* Note that the layout direction will always come from the first locale in the locale list,
* even if the locale is not supported by the resources (the resources may only support
* another locale further down the list which has a different direction).
*
* @param locales The locale list. If null, an empty LocaleList will be assigned.
*/
public void setLocales(LocaleList locales) {
/*mLocaleList = locales == null ? LocaleList.getEmptyLocaleList() : locales;
locale = mLocaleList.get(0);
setLayoutDirection(locale);*/
}
/**
* Set the locale. This is the preferred way for setting up the locale (instead of using the
* direct accessor). This will also set the userLocale and layout direction according to