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

Commit 1471f530 authored by Mark Harman's avatar Mark Harman
Browse files

Fix some warnings.

parent 860007b3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3703,7 +3703,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
            // allow for possibility that the time has passed since taking the photo
            boolean matched = false;
            for(int i=0;i<=max_time_s && !matched;i++) {
                Date test_date = new Date(date.getTime() - 1000*i);
                Date test_date = new Date(date.getTime() - 1000L *i);
                String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(test_date);
                String expected_filename = "IMG_" + timeStamp + suffix + ".jpg";
                Log.d(TAG, "expected name: " + expected_filename);
@@ -12464,7 +12464,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        // now need to take exif orientation into account, as some devices or camera apps store the orientation in the exif tag,
        // which getBitmap() doesn't account for
        ParcelFileDescriptor parcelFileDescriptor = null;
        FileDescriptor fileDescriptor = null;
        FileDescriptor fileDescriptor;
        try {
            ExifInterface exif = null;
            if( uri != null ) {
+2 −2
Original line number Diff line number Diff line
@@ -683,12 +683,12 @@ public class ImageSaver extends Thread {
                false,
                0,
                save_base,
                new ArrayList<byte[]>(),
                new ArrayList<>(),
                null,
                image_capture_intent, image_capture_intent_uri,
                using_camera2,
                image_format, image_quality,
                do_auto_stabilise, level_angle, want_gyro_matrices ? new ArrayList<float []>() : null,
                do_auto_stabilise, level_angle, want_gyro_matrices ? new ArrayList<>() : null,
                is_front_facing,
                mirror,
                current_date,
+5 −3
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ import android.location.LocationProvider;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import android.util.Log;

@@ -119,7 +121,7 @@ public class LocationSupplier {
            return location;
        }

        public void onLocationChanged(Location location) {
        public void onLocationChanged(@NonNull Location location) {
            if( MyDebug.LOG )
                Log.d(TAG, "onLocationChanged");
            this.test_has_received_location = true;
@@ -156,10 +158,10 @@ public class LocationSupplier {
            }
        }

        public void onProviderEnabled(String provider) {
        public void onProviderEnabled(@NonNull String provider) {
        }

        public void onProviderDisabled(String provider) {
        public void onProviderDisabled(@NonNull String provider) {
            if( MyDebug.LOG )
                Log.d(TAG, "onProviderDisabled");
            this.location = null;
+1 −3
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@ import android.Manifest;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -349,7 +347,7 @@ public class MainActivity extends Activity {
        mainUI.closeExposureUI();

        // set up the camera and its preview
        preview = new Preview(applicationInterface, ((ViewGroup) this.findViewById(R.id.preview)));
        preview = new Preview(applicationInterface, (this.findViewById(R.id.preview)));
        if( MyDebug.LOG )
            Log.d(TAG, "onCreate: time after creating preview: " + (System.currentTimeMillis() - debug_time));

+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
                int intent_duration_limit = main_activity.getIntent().getIntExtra(MediaStore.EXTRA_DURATION_LIMIT, 0);
                if( MyDebug.LOG )
                    Log.d(TAG, "intent_duration_limit: " + intent_duration_limit);
                return intent_duration_limit * 1000;
                return intent_duration_limit * 1000L;
            }
        }

Loading