File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
app/src/main/kotlin/com/fernandocejas/sample Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- @file:Suppress(" NOTHING_TO_INLINE" )
16+ @file:Suppress(" NOTHING_TO_INLINE" , " EXTENSION_SHADOWED_BY_MEMBER " )
1717
1818package com.fernandocejas.sample.core.platform
1919
Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ class NetworkHandler
4444 else -> false
4545 }
4646 } else {
47- val nwInfo = connectivityManager.activeNetworkInfo ? : return false
48- return nwInfo.isConnected
47+ @Suppress(" DEPRECATION" ) val networkInfo =
48+ connectivityManager.activeNetworkInfo ? : return false
49+ @Suppress(" DEPRECATION" )
50+ return networkInfo.isConnected
4951 }
5052 }
5153}
Original file line number Diff line number Diff line change @@ -46,12 +46,13 @@ class MovieDetailsFragment : BaseFragment() {
4646 companion object {
4747 private const val PARAM_MOVIE = " param_movie"
4848
49- fun forMovie (movie : MovieView ): MovieDetailsFragment {
49+ fun forMovie (movie : MovieView ? ): MovieDetailsFragment {
5050 val movieDetailsFragment = MovieDetailsFragment ()
51- val arguments = Bundle ()
52- arguments.putParcelable(PARAM_MOVIE , movie)
53- movieDetailsFragment.arguments = arguments
54-
51+ movie?.let {
52+ val arguments = Bundle ()
53+ arguments.putParcelable(PARAM_MOVIE , it)
54+ movieDetailsFragment.arguments = arguments
55+ }
5556 return movieDetailsFragment
5657 }
5758 }
You can’t perform that action at this time.
0 commit comments