mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
use constant APPLICATION_ID instead of method call
This commit is contained in:
parent
89c103ab4c
commit
451d2a271e
4 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue