Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab50a9a authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Allow to call .application on an Application object

Bug: 155019930
Test: Built
Change-Id: Icddecc5a15b583013930ccb5ca70d1a99423eb57
Merged-In: Icddecc5a15b583013930ccb5ca70d1a99423eb57
parent 06f626aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import java.util.concurrent.Executors
 * Gets an [Application] instance from a regular [Context]
 */
val Context.application: Application get() = when (this) {
    is Application -> this
    is Activity -> application
    is Service -> application
    is ContextWrapper -> baseContext.application