AOSP/Calendar - DayView fully converted with bp file

This is the fully converted and touched-up Kotlin
file after the converted was run once. Only one
import statement was translated over to the
converted file. The rest were deleted. Moreover,
the "override" modifier had to be manually added
various times to avoid compilation errors. There
were also many type mismatches that had to corrected
to allow Calendar to successfully build. Regarding
runtime errors, a null pointer exception that was
causing the Calendar app to crash was corrected by
making a certain variables nullable. The converter
also seemed to automatically cast certain numberical
types with the "as" keyword. For example, "as Long"
and "as Int" were the source of other runtime
exceptions that caused the app to crash. Invoking
".toInt()" and "toLong()" corrected this issue. A
few minor tweaks had to made to DayFragment in order
to accommodate for the changes made in DayView.

Test: manual - build tests, unit tests, and
    CTS tests were conducted using the following
    commands:
    $ make Calendar
    $ make CalendarTests -j
    $ adb install -r -t -d out/target/product/bonito/
    testcases/CalendarTests/arm64/CalendarTests.apk
            Success

    $ adb shell am instrument -w com.android.calendar.tests
        com.android.calendar.FormatDateRangeTest:.
	com.android.calendar.UtilsTests:..................
	com.android.calendar.WeekNumberTest:.
	com.android.calendar.widget.CalendarAppWidgetServiceTest:..
	Test results for InstrumentationTestRunner=......................
	Time: 0.157

     General CTS Tests:
    $ tools/cts-tradefed
    cts-tf > run cts -m CtsProviderTestCases

================= Results ==================
=============== Consumed Time ==============
    arm64-v8a CtsProviderTestCases: 6m 14s
Total aggregated tests run time: 6m 14s
============== TOP 1 Slow Modules ==============
    arm64-v8a CtsProviderTestCases: 1.01 tests/sec [376 tests / 374028 msec]
============== Modules Preparation Times ==============
    arm64-v8a CtsProviderTestCases => prep = 12179 ms || clean = 2877 ms
Total preparation time: 12s  ||  Total tear down time: 2s
=======================================================
=============== Summary ===============
Total Run time: 8m 6s
1/1 modules completed
Total Tests       : 376
PASSED            : 362
FAILED            : 0
IGNORED           : 6
ASSUMPTION_FAILURE: 8
============== End of Results ==============

Change-Id: Ieaf65157b9b748b7a9f540edc0922bb6fabae949
3 files changed