google-developer-training / android-advanced

Solution apps for the apps that students create as they work through the Advanced Android Development training course created by Google Developer Training.
Other
1.14k stars 1.09k forks source link

Some "missing" comments and typos #1

Open bobtal opened 6 years ago

bobtal commented 6 years ago

In https://github.com/google-developer-training/android-advanced/blob/master/SensorListeners/app/src/main/java/com/example/android/sensorlisteners/MainActivity.java

switch (sensorType) {
            // Event came from the light sensor.
            case Sensor.TYPE_LIGHT:
                // Set the light sensor text view to the light sensor string
                // from the resources, with the placeholder filled in.
                mTextSensorLight.setText(getResources().getString(
                    R.string.label_light, currentValue));
                break;
            // Event came from the proximity sensor. <-- this comment is "missing" 
            case Sensor.TYPE_PROXIMITY:
                // Set the proximity sensor text view to the light sensor <-- typo here, should be proximity instead of light
                // string from the resources, with the placeholder filled in.
                mTextSensorProximity.setText(getResources().getString(
                    R.string.label_proximity, currentValue));
                break;
            default:
                // do nothing
        }