diff options
author | jingjiangli <jingjiangli@google.com> | 2022-04-16 17:19:10 -0700 |
---|---|---|
committer | Jingjiang Li <jingjiangli@google.com> | 2022-04-17 03:11:44 +0000 |
commit | fc79486b6ca81071f3e5ad6cd16012efeaf88bd5 (patch) | |
tree | 557c284bd7bfdbdacd04c80947c5c357d2702238 | |
parent | d1bf84e1d1f9791f51ab9b74e7712c5a3a2bbbb6 (diff) | |
download | TvSettings-fc79486b6ca81071f3e5ad6cd16012efeaf88bd5.tar.gz |
Stub out an AppLanguageActivity to respond to APP_LOCALE_SETTINGS action with data scheme.
Bug: b/215228833
Test: adb shell am start -a android.settings.APP_LOCALE_SETTINGS
Change-Id: I1270813cd6798dab83892ec34c3b1657f6669487
-rw-r--r-- | Settings/AndroidManifest.xml | 14 | ||||
-rw-r--r-- | Settings/src/com/android/tv/settings/system/AppLanguageActivity.java | 31 |
2 files changed, 44 insertions, 1 deletions
diff --git a/Settings/AndroidManifest.xml b/Settings/AndroidManifest.xml index 62c92415e..5288c86e3 100644 --- a/Settings/AndroidManifest.xml +++ b/Settings/AndroidManifest.xml @@ -665,6 +665,19 @@ </activity> <activity + android:name=".system.AppLanguageActivity" + android:configChanges="keyboard|keyboardHidden|navigation|locale" + android:excludeFromRecents="true" + android:exported="true" + android:theme="@style/TvSettingsActivityTheme"> + <intent-filter> + <action android:name="android.settings.APP_LOCALE_SETTINGS"/> + <category android:name="android.intent.category.DEFAULT"/> + <data android:scheme="package" /> + </intent-filter> + </activity> + + <activity android:name=".system.LanguageActivity" android:configChanges="keyboard|keyboardHidden|navigation|locale" android:excludeFromRecents="true" @@ -672,7 +685,6 @@ android:theme="@style/TvSettingsActivityTheme"> <intent-filter> <action android:name="android.settings.LOCALE_SETTINGS"/> - <action android:name="android.settings.APP_LOCALE_SETTINGS"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> diff --git a/Settings/src/com/android/tv/settings/system/AppLanguageActivity.java b/Settings/src/com/android/tv/settings/system/AppLanguageActivity.java new file mode 100644 index 000000000..500a08f15 --- /dev/null +++ b/Settings/src/com/android/tv/settings/system/AppLanguageActivity.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2022 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.settings.system; + +import androidx.fragment.app.Fragment; + +import com.android.tv.settings.TvSettingsActivity; + +public class AppLanguageActivity extends TvSettingsActivity { + + @Override + protected Fragment createSettingsFragment() { + return com.android.tv.settings.overlay.FlavorUtils.getFeatureFactory( + this).getSettingsFragmentProvider() + .newSettingsFragment(LanguageFragment.class.getName(), null); + } +} |