use constant APPLICATION_ID instead of method call

This commit is contained in:
Eric House 2019-03-03 11:38:19 -08:00
parent 89c103ab4c
commit 451d2a271e
4 changed files with 5 additions and 5 deletions

View file

@ -621,7 +621,7 @@ public class DictUtils {
File storage = Environment.getExternalStorageDirectory();
if ( null != storage ) {
String packdir = String.format( "Android/data/%s/files/",
context.getPackageName() );
BuildConfig.APPLICATION_ID );
result = new File( storage.getPath(), packdir );
if ( !result.exists() ) {
result.mkdirs();

View file

@ -1580,7 +1580,7 @@ public class GamesListDelegate extends ListDelegateBase
case R.id.games_menu_rateme:
String str = String.format( "market://details?id=%s",
m_activity.getPackageName() );
BuildConfig.APPLICATION_ID );
try {
startActivity( new Intent( Intent.ACTION_VIEW, Uri.parse( str ) ) );
} catch ( android.content.ActivityNotFoundException anf ) {

View file

@ -113,7 +113,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
{
JSONObject params = new JSONObject();
PackageManager pm = context.getPackageManager();
String packageName = context.getPackageName();
String packageName = BuildConfig.APPLICATION_ID;
int versionCode;
try {
versionCode = pm.getPackageInfo( packageName, 0 ).versionCode;

View file

@ -514,7 +514,7 @@ public class Utils {
if ( null == s_appVersion ) {
try {
int version = context.getPackageManager()
.getPackageInfo(context.getPackageName(), 0)
.getPackageInfo(BuildConfig.APPLICATION_ID, 0)
.versionCode;
s_appVersion = new Integer( version );
} catch ( Exception e ) {
@ -558,7 +558,7 @@ public class Utils {
public static boolean isGooglePlayApp( Context context )
{
PackageManager pm = context.getPackageManager();
String packageName = context.getPackageName();
String packageName = BuildConfig.APPLICATION_ID;
String installer = pm.getInstallerPackageName( packageName );
boolean result = "com.google.android.feedback".equals( installer )
|| "com.android.vending".equals( installer );