Skip to content

Commit

Permalink
LIBcc30706
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderLS committed Jul 6, 2018
1 parent b260bee commit 2dbc36a
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 19 deletions.
12 changes: 12 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

import androidx.annotation.NonNull;

import static com.vorlonsoft.android.rate.Constants.Date.DAY_IN_MILLIS;
import static com.vorlonsoft.android.rate.Constants.Utils.TAG;
import static com.vorlonsoft.android.rate.PreferenceHelper.get365DayPeriodDialogLaunchTimes;
import static com.vorlonsoft.android.rate.PreferenceHelper.getCustomEventCount;
import static com.vorlonsoft.android.rate.PreferenceHelper.getDialogFirstLaunchTime;
Expand All @@ -41,8 +43,6 @@
import static com.vorlonsoft.android.rate.StoreType.INTENT;
import static com.vorlonsoft.android.rate.StoreType.OTHER;
import static com.vorlonsoft.android.rate.StoreType.YANDEX;
import static com.vorlonsoft.android.rate.Utils.DAY_IN_MILLIS;
import static com.vorlonsoft.android.rate.Utils.TAG;

public final class AppRate {

Expand Down
28 changes: 28 additions & 0 deletions library/src/main/java/com/vorlonsoft/android/rate/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.vorlonsoft.android.rate;

final class Constants {

private Constants() {
throw new AssertionError();
}

final class Date {

static final long DAY_IN_MILLIS = 86400000L;

static final short YEAR_IN_DAYS = (short) 365;

private Date() {
throw new AssertionError();
}
}

final class Utils {

static final String TAG = "ANDROIDRATE";

private Utils() {
throw new AssertionError();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import androidx.annotation.Nullable;

import static com.vorlonsoft.android.rate.Constants.Utils.TAG;
import static com.vorlonsoft.android.rate.IntentHelper.createIntentsForStore;
import static com.vorlonsoft.android.rate.PreferenceHelper.setIsAgreeShowDialog;
import static com.vorlonsoft.android.rate.PreferenceHelper.setRemindInterval;
Expand All @@ -33,7 +34,6 @@
import static com.vorlonsoft.android.rate.StoreType.SLIDEME;
import static com.vorlonsoft.android.rate.StoreType.TENCENT;
import static com.vorlonsoft.android.rate.StoreType.YANDEX;
import static com.vorlonsoft.android.rate.Utils.TAG;
import static com.vorlonsoft.android.rate.Utils.getDialogBuilder;

public class DefaultDialogManager implements DialogManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import static com.vorlonsoft.android.rate.Constants.Utils.TAG;
import static com.vorlonsoft.android.rate.StoreType.AMAZON;
import static com.vorlonsoft.android.rate.StoreType.APPLE;
import static com.vorlonsoft.android.rate.StoreType.BAZAAR;
Expand All @@ -27,7 +28,6 @@
import static com.vorlonsoft.android.rate.StoreType.YANDEX;
import static com.vorlonsoft.android.rate.UriHelper.getStoreUri;
import static com.vorlonsoft.android.rate.UriHelper.getStoreWebUri;
import static com.vorlonsoft.android.rate.Utils.TAG;
import static com.vorlonsoft.android.rate.Utils.isPackagesExists;

final class IntentHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

import java.util.Date;

import static com.vorlonsoft.android.rate.Utils.DAY_IN_MILLIS;
import static com.vorlonsoft.android.rate.Utils.YEAR_IN_DAYS;
import static com.vorlonsoft.android.rate.Constants.Date.DAY_IN_MILLIS;
import static com.vorlonsoft.android.rate.Constants.Date.YEAR_IN_DAYS;

final class PreferenceHelper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import static java.lang.annotation.RetentionPolicy.SOURCE;

public final class StoreType {

@SuppressWarnings("WeakerAccess")
public static final int AMAZON = 0; // Amazon Appstore
@SuppressWarnings("WeakerAccess")
Expand Down
8 changes: 2 additions & 6 deletions library/src/main/java/com/vorlonsoft/android/rate/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

final class Utils {

static final long DAY_IN_MILLIS = 86400000L;
import static com.vorlonsoft.android.rate.Constants.Utils.TAG;

static final short YEAR_IN_DAYS = (short) 365;

static final String TAG = "ANDROIDRATE";
final class Utils {

private Utils() {
throw new AssertionError();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
//import android.content.res.Resources;
//import android.os.Build;
/* uncomment to test other locales - end */

import android.os.Bundle;
import android.util.Log;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;

import com.vorlonsoft.android.rate.AppRate;
import com.vorlonsoft.android.rate.StoreType;

Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
~ // Licensed under The MIT License (MIT)
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
4 changes: 2 additions & 2 deletions sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
~ // Licensed under The MIT License (MIT)
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>

0 comments on commit 2dbc36a

Please sign in to comment.