Skip to content

Commit 096b32e

Browse files
committed
Merge branch 'master' into reactive
Change-Id: Ia588e113ea34034d2fad5a7d409981b1de779162
2 parents 255c453 + 82de919 commit 096b32e

File tree

90 files changed

+548
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+548
-462
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ android:
1010
jdk:
1111
- oraclejdk8
1212
script:
13-
- cd todoapp
1413
- ./gradlew test
1514
before_cache:
1615
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

app/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
44
apply plugin: "androidx.navigation.safeargs.kotlin"
55

6-
repositories {
7-
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
8-
}
9-
106
android {
117
compileSdkVersion rootProject.compileSdkVersion
128

139
defaultConfig {
14-
applicationId "com.example.android.architecture.blueprints.todomvvmlivekotlin"
10+
applicationId "com.example.android.architecture.blueprints.master"
1511
minSdkVersion rootProject.minSdkVersion
1612
targetSdkVersion rootProject.targetSdkVersion
1713
versionCode 1

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/AppNavigationTest.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017, The Android Open Source Project
2+
* Copyright (C) 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -186,19 +186,19 @@ class AppNavigationTest {
186186

187187
// Confirm that if we click "<-" once, we end up back at the task details page
188188
onView(
189-
withContentDescription(
190-
activityScenario
191-
.getToolbarNavigationContentDescription()
192-
)
189+
withContentDescription(
190+
activityScenario
191+
.getToolbarNavigationContentDescription()
192+
)
193193
).perform(click())
194194
onView(withId(R.id.task_detail_title)).check(matches(isDisplayed()))
195195

196196
// Confirm that if we click "<-" a second time, we end up back at the home screen
197197
onView(
198-
withContentDescription(
199-
activityScenario
200-
.getToolbarNavigationContentDescription()
201-
)
198+
withContentDescription(
199+
activityScenario
200+
.getToolbarNavigationContentDescription()
201+
)
202202
).perform(click())
203203
onView(withId(R.id.tasksContainer)).check(matches(isDisplayed()))
204204
}

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksActivityTest.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ class TasksActivityTest {
180180
onView(withId(R.id.task_detail_complete)).perform(click())
181181

182182
// Click on the navigation up button to go back to the list
183-
onView(withContentDescription(
184-
activityScenario.getToolbarNavigationContentDescription())
183+
onView(
184+
withContentDescription(
185+
activityScenario.getToolbarNavigationContentDescription()
186+
)
185187
).perform(click())
186188

187189
// Check that the task is marked as completed
@@ -205,8 +207,10 @@ class TasksActivityTest {
205207
onView(withId(R.id.task_detail_complete)).perform(click())
206208

207209
// Click on the navigation up button to go back to the list
208-
onView(withContentDescription(
209-
activityScenario.getToolbarNavigationContentDescription())
210+
onView(
211+
withContentDescription(
212+
activityScenario.getToolbarNavigationContentDescription()
213+
)
210214
).perform(click())
211215

212216
// Check that the task is marked as active
@@ -232,8 +236,10 @@ class TasksActivityTest {
232236
onView(withId(R.id.task_detail_complete)).perform(click())
233237

234238
// Click on the navigation up button to go back to the list
235-
onView(withContentDescription(
236-
activityScenario.getToolbarNavigationContentDescription())
239+
onView(
240+
withContentDescription(
241+
activityScenario.getToolbarNavigationContentDescription()
242+
)
237243
).perform(click())
238244

239245
// Check that the task is marked as active
@@ -259,8 +265,10 @@ class TasksActivityTest {
259265
onView(withId(R.id.task_detail_complete)).perform(click())
260266

261267
// Click on the navigation up button to go back to the list
262-
onView(withContentDescription(
263-
activityScenario.getToolbarNavigationContentDescription())
268+
onView(
269+
withContentDescription(
270+
activityScenario.getToolbarNavigationContentDescription()
271+
)
264272
).perform(click())
265273

266274
// Check that the task is marked as active

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/TestUtils.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (C) 2019 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.android.architecture.blueprints.todoapp.tasks
218

319
import android.app.Activity
@@ -13,4 +29,4 @@ fun <T : Activity> ActivityScenario<T>.getToolbarNavigationContentDescription()
1329
it.findViewById<Toolbar>(R.id.toolbar).navigationContentDescription as String
1430
}
1531
return description
16-
}
32+
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright (C) 2015 The Android Open Source Project
3+
~ Copyright (C) 2019 The Android Open Source Project
44
~
55
~ Licensed under the Apache License, Version 2.0 (the "License");
66
~ you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616
-->
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
xmlns:tools="http://schemas.android.com/tools"
2019
package="com.example.android.architecture.blueprints.todoapp">
2120

2221
<application

app/src/main/java/com/example/android/architecture/blueprints/todoapp/Event.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017, The Android Open Source Project
2+
* Copyright (C) 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,4 +55,4 @@ class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Obser
5555
onEventUnhandledContent(it)
5656
}
5757
}
58-
}
58+
}

app/src/main/java/com/example/android/architecture/blueprints/todoapp/ScrollChildSwipeRefreshLayout.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017, The Android Open Source Project
2+
* Copyright (C) 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
2929
* define which view controls this behavior.
3030
*/
3131
class ScrollChildSwipeRefreshLayout @JvmOverloads constructor(
32-
context: Context,
33-
attrs: AttributeSet? = null
32+
context: Context,
33+
attrs: AttributeSet? = null
3434
) : SwipeRefreshLayout(context, attrs) {
3535

3636
var scrollUpChild: View? = null
3737

3838
override fun canChildScrollUp() =
39-
scrollUpChild?.canScrollVertically(-1) ?: super.canChildScrollUp()
39+
scrollUpChild?.canScrollVertically(-1) ?: super.canChildScrollUp()
4040
}

app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoApplication.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (C) 2019 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.example.android.architecture.blueprints.todoapp
218

319
import android.app.Application
@@ -21,4 +37,4 @@ class TodoApplication : Application() {
2137
super.onCreate()
2238
if (BuildConfig.DEBUG) Timber.plant(DebugTree())
2339
}
24-
}
40+
}

app/src/main/java/com/example/android/architecture/blueprints/todoapp/ViewModelFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import com.example.android.architecture.blueprints.todoapp.tasks.TasksViewModel
2828
*/
2929
@Suppress("UNCHECKED_CAST")
3030
class ViewModelFactory constructor(
31-
private val tasksRepository: TasksRepository
31+
private val tasksRepository: TasksRepository
3232
) : ViewModelProvider.NewInstanceFactory() {
3333

3434
override fun <T : ViewModel> create(modelClass: Class<T>) =

0 commit comments

Comments
 (0)