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

Commit f49bfc46 authored by Mark Harman's avatar Mark Harman
Browse files

Fix Android warnings.

parent a0d4bd87
Loading
Loading
Loading
Loading
+18 −30
Original line number Diff line number Diff line
@@ -637,7 +637,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
    /* Ensures that the flash mode changes as expected when switching between photo and video modes.
     */
    public void testFlashVideoMode() throws InterruptedException {
    public void testFlashVideoMode() {
        Log.d(TAG, "testFlashVideoMode");
        setToDefault();
@@ -1537,7 +1537,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
     * that record audio permission is granted!
     * Also tests content descriptions of <> buttons on the popup menu.
     */
    public void testSwitchVideo() throws InterruptedException {
    public void testSwitchVideo() {
        Log.d(TAG, "testSwitchVideo");
        setToDefault();
@@ -1792,7 +1792,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        return files == null ? 0 : files.length;
    }
    public void subTestContinuousPictureFocusRepeat() throws InterruptedException {
    private void subTestContinuousPictureFocusRepeat() throws InterruptedException {
        Log.d(TAG, "subTestContinuousPictureFocusRepeat");
        if( !mPreview.supportsFocus() ) {
@@ -3313,7 +3313,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
    /** Test taking photo with JPEG + DNG (RAW) and repeat mode.
     */
    public void testTakePhotoRawRepeat() throws InterruptedException {
    public void testTakePhotoRawRepeat() {
        Log.d(TAG, "testTakePhotoRawRepeat");
        setToDefault();
@@ -6030,7 +6030,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
    /** Tests that video resolutions are stored separately for high speed fps, for Camera2.
     */
    public void testVideoFPSHighSpeed() throws InterruptedException {
    public void testVideoFPSHighSpeed() {
        Log.d(TAG, "testVideoFPSHighSpeed");
        setToDefault();
@@ -6698,37 +6698,25 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        // wait until flash off
        long time_s = System.currentTimeMillis();
        for(;;) {
            if( !mPreview.getCameraController().getFlashValue().equals("flash_torch") ) {
                break;
            }
        while (mPreview.getCameraController().getFlashValue().equals("flash_torch")) {
            assertTrue(System.currentTimeMillis() - time_s <= 200);
        }
        // wait until flash on
        time_s = System.currentTimeMillis();
        for(;;) {
            if( mPreview.getCameraController().getFlashValue().equals("flash_torch") ) {
                break;
            }
        while (!mPreview.getCameraController().getFlashValue().equals("flash_torch")) {
            assertTrue(System.currentTimeMillis() - time_s <= 1100);
        }
        // wait until flash off
        time_s = System.currentTimeMillis();
        for(;;) {
            if( !mPreview.getCameraController().getFlashValue().equals("flash_torch") ) {
                break;
            }
        while (mPreview.getCameraController().getFlashValue().equals("flash_torch")) {
            assertTrue(System.currentTimeMillis() - time_s <= 200);
        }
        // wait until flash on
        time_s = System.currentTimeMillis();
        for(;;) {
            if( mPreview.getCameraController().getFlashValue().equals("flash_torch") ) {
                break;
            }
        while (!mPreview.getCameraController().getFlashValue().equals("flash_torch")) {
            assertTrue(System.currentTimeMillis() - time_s <= 1100);
        }
@@ -7724,7 +7712,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
    /* Tests we can stamp date/time and location to photo.
     * May fail on devices without mobile network, especially if we don't even have wifi.
     */
    public void testPhotoStamp() throws IOException {
    public void testPhotoStamp() {
        Log.d(TAG, "testPhotoStamp");
        setToDefault();
@@ -7825,7 +7813,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
    /* Tests we can stamp custom text to photo.
     */
    public void testCustomTextStamp() throws IOException {
    public void testCustomTextStamp() {
        Log.d(TAG, "testCustomTextStamp");
        setToDefault();
@@ -8174,7 +8162,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
     * OrientationEventListener.enable() (from Preview.cameraOpened()) when called too many times.
     * Note, takes a while (over 1m) to run, test may look like it's hung whilst running!
     */
    public void testSwitchCameraRepeat2() throws InterruptedException {
    public void testSwitchCameraRepeat2() {
        Log.d(TAG, "testSwitchCameraRepeat2");
        setToDefault();
@@ -9460,7 +9448,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        }
    }
    public void subTestTakePhotoContinuousBurst(boolean is_slow) throws InterruptedException {
    private void subTestTakePhotoContinuousBurst(boolean is_slow) throws InterruptedException {
        Log.d(TAG, "subTestTakePhotoContinuousBurst");
        // count initial files in folder
@@ -14132,7 +14120,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
     * @throws IOException
     * @throws InterruptedException
     */
    public void testPanorama1() throws IOException, InterruptedException {
    public void testPanorama1() throws IOException {
        Log.d(TAG, "testPanorama1");
        setToDefault();
+2 −2
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public class ImageSaver extends Thread {
			RAW,
			DUMMY
		}
		Type type;
		final Type type;
		enum ProcessType {
			NORMAL,
			HDR,
@@ -141,7 +141,7 @@ public class ImageSaver extends Thread {
		final double geo_direction;
		final String custom_tag_artist;
		final String custom_tag_copyright;
		int sample_factor = 1; // sampling factor for thumbnail, higher means lower quality
		final int sample_factor; // sampling factor for thumbnail, higher means lower quality
		
		Request(Type type,
			ProcessType process_type,
+2 −2
Original line number Diff line number Diff line
@@ -1182,7 +1182,7 @@ public class MainActivity extends Activity {
        applicationInterface.getImageSaver().waitUntilDone();
    }

    public boolean longClickedTakePhoto() {
    private boolean longClickedTakePhoto() {
		if( MyDebug.LOG )
			Log.d(TAG, "longClickedTakePhoto");
		// need to check whether fast burst is supported (including for the current resolution),
@@ -2258,7 +2258,7 @@ public class MainActivity extends Activity {
		magnetic_accuracy_dialog = null; // if the magnetic accuracy was opened, it must have been closed now
    }
    
    public void setWindowFlagsForSettings() {
    private void setWindowFlagsForSettings() {
		setWindowFlagsForSettings(true);
    }

+1 −1
Original line number Diff line number Diff line
@@ -493,7 +493,7 @@ public class MyApplicationInterface extends BasicApplicationInterface {
	@Override
	public String getRecordVideoOutputFormatPref() {
    	return sharedPreferences.getString(PreferenceKeys.VideoFormatPreferenceKey, "preference_video_output_format_default");
	};
	}

    @Override
    public String getVideoBitratePref() {
+1 −1
Original line number Diff line number Diff line
@@ -1552,7 +1552,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements OnShared
		}
	}

	void loadSettings() {
	private void loadSettings() {
        if( MyDebug.LOG )
            Log.d(TAG, "loadSettings");
		AlertDialog.Builder alertDialog = new AlertDialog.Builder(MyPreferenceFragment.this.getActivity());
Loading