Projects >> MyExpenses >>9e1038a680c919feadebeb3172d2840286d14560

Chunk
Conflicting content
    item.setEnabled(enabled);
    item.getIcon().setAlpha(enabled ? 255 : 90);
  }
<<<<<<< HEAD
  public static PreferenceObfuscator getLicenseStatusPrefs(Context ctx) {
    String PREFS_FILE = "license_status";
    String deviceId = Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);
    SharedPreferences sp = ctx.getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE);
    byte[] SALT = new byte[] {
        -1, -124, -4, -59, -52, 1, -97, -32, 38, 59, 64, 13, 45, -104, -3, -92, -56, -49, 65, -25
    };
    return new PreferenceObfuscator(
        sp, new AESObfuscator(SALT, ctx.getPackageName(), deviceId));
  }
  /**
   * @param ctx
   * @return -1 if we have a permanent license confirmed, otherwise the number of retrys returned from the licensing service
   */
  public static int getContribStatusInfo(Context ctx) {
    PreferenceObfuscator p = getLicenseStatusPrefs(ctx);
    if (p.getString(MyApplication.PREFKEY_LICENSE_STATUS,"0").equals("1"))
      return -1;
    else
      return Integer.parseInt(p.getString(
          MyApplication.PREFKEY_LICENSE_RETRY_COUNT,"0"));
  }
  public static boolean doesPackageExist(Context context,String targetPackage) {
    try {
      context.getPackageManager().getPackageInfo(targetPackage,PackageManager.GET_META_DATA);
        } catch (NameNotFoundException e) {
     return false;
     }
     return true;
=======

  public static DateFormat localizedYearlessDateFormat() {
    Locale l = Locale.getDefault();
    String yearlessPattern = ((SimpleDateFormat)DateFormat.getDateInstance(DateFormat.SHORT,l))
        .toPattern().replaceAll("\\W?[Yy]+\\W?", "");
    return new SimpleDateFormat(yearlessPattern, l);
>>>>>>> 5a2e5cfeabd56843e8b95515a2b1d6ad5a50d61f
  }
}
Solution content
    item.setEnabled(enabled);
    item.getIcon().setAlpha(enabled ? 255 : 90);
  }
  public static PreferenceObfuscator getLicenseStatusPrefs(Context ctx) {
    String PREFS_FILE = "license_status";
    String deviceId = Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);
    SharedPreferences sp = ctx.getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE);
    byte[] SALT = new byte[] {
        -1, -124, -4, -59, -52, 1, -97, -32, 38, 59, 64, 13, 45, -104, -3, -92, -56, -49, 65, -25
    };
    return new PreferenceObfuscator(
        sp, new AESObfuscator(SALT, ctx.getPackageName(), deviceId));
  }
  /**
   * @param ctx
   * @return -1 if we have a permanent license confirmed, otherwise the number of retrys returned from the licensing service
   */
  public static int getContribStatusInfo(Context ctx) {
    PreferenceObfuscator p = getLicenseStatusPrefs(ctx);
    if (p.getString(MyApplication.PREFKEY_LICENSE_STATUS,"0").equals("1"))
      return -1;
    else
      return Integer.parseInt(p.getString(
          MyApplication.PREFKEY_LICENSE_RETRY_COUNT,"0"));
  }
  public static boolean doesPackageExist(Context context,String targetPackage) {
    try {
      context.getPackageManager().getPackageInfo(targetPackage,PackageManager.GET_META_DATA);
        } catch (NameNotFoundException e) {
     return false;
     }
     return true;
  }

  public static DateFormat localizedYearlessDateFormat() {
    Locale l = Locale.getDefault();
    String yearlessPattern = ((SimpleDateFormat)DateFormat.getDateInstance(DateFormat.SHORT,l))
        .toPattern().replaceAll("\\W?[Yy]+\\W?", "");
    return new SimpleDateFormat(yearlessPattern, l);
  }
}
File
Utils.java
Developer's decision
Concatenation
Kind of conflict
Comment
Method declaration
Method invocation
Method signature
Return statement
Try statement
Variable