Skip to content

Commit f9a4af9

Browse files
committed
Minor fixes
- Removed unnecessary resetting of title for editable GuidedActions - Removed extra blank line in TvTestingGuidedStepFragment - Added singleTask launch mode to TvLauncherActivity Change-Id: I6ff1345440e92a04fe9ec99414d05fe467c9f76d
1 parent eb9678b commit f9a4af9

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

mediacontroller/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<activity
5757
android:name=".MediaAppTestingActivity"
58-
android:exported = "true"
58+
android:exported="true"
5959
android:launchMode="singleTask">
6060

6161
<intent-filter>
@@ -66,6 +66,7 @@
6666
<activity
6767
android:name=".tv.TvLauncherActivity"
6868
android:configChanges="keyboard|keyboardHidden"
69+
android:launchMode="singleTask"
6970
android:theme="@style/AppTheme.TV">
7071

7172
<intent-filter>
@@ -76,9 +77,9 @@
7677

7778
<activity
7879
android:name=".tv.TvTestingActivity"
80+
android:configChanges="orientation|keyboard|keyboardHidden"
7981
android:exported="true"
8082
android:launchMode="singleTask"
81-
android:configChanges="orientation|keyboard|keyboardHidden"
8283
android:theme="@style/AppTheme.TV">
8384

8485
<intent-filter>

mediacontroller/src/main/java/com/example/android/mediacontroller/tv/TvTestingGuidedStepFragment.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,22 @@ class TvTestingGuidedStepFragment : GuidedStepSupportFragment() {
172172
query = action?.editTitle.toString()
173173
when (action?.id) {
174174
PLAY_FROM_SEARCH_TEST -> {
175-
action.title = getString(R.string.play_search_test_title)
176175
action.description = getQueryTestDesc(R.string.play_search_test_desc, query)
177176
runPlayFromSearchTest(query, it, ::logTestUpdate)
178177
}
179178
PLAY_FROM_MEDIA_ID_TEST -> {
180-
action.title = getString(R.string.play_media_id_test_title)
181179
action.description = getQueryTestDesc(R.string.play_media_id_test_desc, query)
182180
runPlayFromMediaIdTest(query, it, ::logTestUpdate)
183181
}
184182
PLAY_FROM_URI_TEST -> {
185-
action.title = getString(R.string.play_uri_test_title)
186183
action.description = getQueryTestDesc(R.string.play_uri_test_desc, query)
187184
runPlayFromUriTest(query, it, ::logTestUpdate)
188185
}
189186
SKIP_TO_ITEM_TEST -> {
190-
action.title = getString(R.string.skip_item_test_title)
191187
action.description = getQueryTestDesc(R.string.skip_item_test_desc, query)
192188
runSkipToItemTest(query, it, ::logTestUpdate)
193189
}
194190
SEEK_TO_TEST -> {
195-
action.title = getString(R.string.seek_test_title)
196191
action.description = getQueryTestDesc(R.string.seek_test_desc, query)
197192
runSeekToTest(query, it, ::logTestUpdate)
198193
}
@@ -213,23 +208,18 @@ class TvTestingGuidedStepFragment : GuidedStepSupportFragment() {
213208
query = ""
214209
when (action?.id) {
215210
PLAY_FROM_SEARCH_TEST -> {
216-
action.title = getString(R.string.play_search_test_title)
217211
action.description = getQueryTestDesc(R.string.play_search_test_desc)
218212
}
219213
PLAY_FROM_MEDIA_ID_TEST -> {
220-
action.title = getString(R.string.play_media_id_test_title)
221214
action.description = getQueryTestDesc(R.string.play_media_id_test_desc)
222215
}
223216
PLAY_FROM_URI_TEST -> {
224-
action.title = getString(R.string.play_uri_test_title)
225217
action.description = getQueryTestDesc(R.string.play_uri_test_desc)
226218
}
227219
SKIP_TO_ITEM_TEST -> {
228-
action.title = getString(R.string.skip_item_test_title)
229220
action.description = getQueryTestDesc(R.string.skip_item_test_desc)
230221
}
231222
SEEK_TO_TEST -> {
232-
action.title = getString(R.string.seek_test_title)
233223
action.description = getQueryTestDesc(R.string.seek_test_desc)
234224
}
235225
else -> Toast.makeText(
@@ -268,7 +258,6 @@ class TvTestingGuidedStepFragment : GuidedStepSupportFragment() {
268258
}
269259
}
270260
}
271-
272261
}
273262

274263
private fun logTestUpdate(logTag: String, message: String) {

0 commit comments

Comments
 (0)