Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mkulesh committed Oct 28, 2020
1 parent d80f761 commit 06acfde
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 22 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.mkulesh.mmd"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 29
versionCode 10
versionName "1.10"
setProperty("archivesBaseName", "mmd-v" + versionName)
Expand All @@ -22,7 +22,7 @@ android {
lintOptions {
checkReleaseBuilds false
abortOnError false
disable "RtlHardcoded", "RtlSymmetry", "RtlEnabled", "ApplySharedPref", "PrivateResource", "SetTextI18n", "DefaultLocale"
disable "RtlHardcoded", "RtlSymmetry", "RtlEnabled", "ApplySharedPref", "PrivateResource", "SetTextI18n", "DefaultLocale", "ClickableViewAccessibility"
}

compileOptions {
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/com/mkulesh/mmd/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.mkulesh.mmd;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
Expand Down Expand Up @@ -82,7 +81,6 @@ public class MainActivity extends AppCompatActivity
R.drawable.snow_flake, R.drawable.ufo_cartoon_style, R.drawable.whirlpool
};

@SuppressLint("RestrictedApi")
@Override
protected void onCreate(Bundle savedInstanceState)
{
Expand Down Expand Up @@ -219,7 +217,6 @@ public boolean onOptionsItemSelected(@NonNull MenuItem menuItem)
* Navigation drawer
*********************************************************/

@SuppressLint("RestrictedApi")
private BaseFragment getVisibleFragment()
{
FragmentManager fragmentManager = MainActivity.this.getSupportFragmentManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

package com.mkulesh.mmd.config;

import android.annotation.SuppressLint;

@SuppressLint("ExportedPreferenceActivity")
public class WallpaperSettingsActivity extends SettingsActivity
{

Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/com/mkulesh/mmd/fragments/Experiment.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Experiment implements Runnable, Parcelable
* State attributes to be stored in Parcel
*/
static final String PARCELABLE_ID = "Experiment";
private AtomSet atomSet = new AtomSet(); // set of the atoms, must be always handled as synchronized
private final AtomSet atomSet; // set of the atoms, must be always handled as synchronized

/**
* Parcelable interface
Expand All @@ -44,7 +44,7 @@ private Experiment(Parcel in)
{
super();
ViewUtils.Debug(this, "created from parcel");
readFromParcel(in);
atomSet = in.readParcelable(AtomSet.class.getClassLoader());
}

@Override
Expand All @@ -59,11 +59,6 @@ public void writeToParcel(Parcel dest, int flags)
dest.writeParcelable(atomSet, flags);
}

private void readFromParcel(Parcel in)
{
atomSet = in.readParcelable(AtomSet.class.getClassLoader());
}

public static final Parcelable.Creator<Experiment> CREATOR = new Parcelable.Creator<Experiment>()
{
public Experiment createFromParcel(Parcel in)
Expand Down Expand Up @@ -103,6 +98,7 @@ public Experiment(Context context)
super();
this.context = context;
ViewUtils.Debug(this, "created from scratch");
atomSet = new AtomSet();
readParameters(context);
}

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/mkulesh/mmd/model/AtomSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@ public AtomSet(AtomSet set)
atomRadius = set.atomRadius;
atomMass = set.atomMass;
gravity = set.gravity;
thermalChange = set.thermalChange;
timeStep = set.timeStep;
energyNorm = set.energyNorm;
boundaryCondition = set.boundaryCondition;
ePotenz = set.ePotenz;
eKinetic = set.eKinetic;
temperature = set.temperature;
atomImage = set.atomImage;
pauseHandler = set.pauseHandler;
calculationTime = set.calculationTime;
solver = null;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/mkulesh/mmd/utils/ViewUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.mkulesh.mmd.utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
Expand Down Expand Up @@ -78,7 +77,6 @@ public static Bitmap drawViewToBitmap(View view, Rect infoRect)
/**
* Procedure hows toast that contains description of the given button
*/
@SuppressLint("RtlHardcoded")
public static boolean showButtonDescription(Context context, View button)
{
CharSequence contentDesc = button.getContentDescription();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.mkulesh.mmd.widgets;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
Expand All @@ -40,7 +39,6 @@ public FloatingButtonsSet(Context context, AttributeSet attrs)
prepare();
}

@SuppressLint("RtlHardcoded")
private void prepare()
{
setOrientation(HORIZONTAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.mkulesh.mmd.widgets;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
Expand Down Expand Up @@ -80,7 +79,6 @@ protected synchronized void onMeasure(int widthMeasureSpec, int heightMeasureSpe
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
}

@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event)
{
Expand Down

0 comments on commit 06acfde

Please sign in to comment.