test_class.declarator: PREF_NAME = "RateThisApp"
test_class.modifier: private static final
test_class.original_string: private static final String PREF_NAME = "RateThisApp";
test_class.type: String
test_class.var_name: PREF_NAME
test_class.declarator: KEY_INSTALL_DATE = "rta_install_date"
test_class.modifier: private static final
test_class.original_string: private static final String KEY_INSTALL_DATE = "rta_install_date";
test_class.type: String
test_class.var_name: KEY_INSTALL_DATE
test_class.declarator: KEY_LAUNCH_TIMES = "rta_launch_times"
test_class.modifier: private static final
test_class.original_string: private static final String KEY_LAUNCH_TIMES = "rta_launch_times";
test_class.type: String
test_class.var_name: KEY_LAUNCH_TIMES
test_class.declarator: KEY_OPT_OUT = "rta_opt_out"
test_class.modifier: private static final
test_class.original_string: private static final String KEY_OPT_OUT = "rta_opt_out";
test_class.type: String
test_class.var_name: KEY_OPT_OUT
test_class.declarator: KEY_ASK_LATER_DATE = "rta_ask_later_date"
test_class.modifier: private static final
test_class.original_string: private static final String KEY_ASK_LATER_DATE = "rta_ask_later_date";
test_class.type: String
test_class.var_name: KEY_ASK_LATER_DATE
test_class.file: ratethisapp/src/test/java/com/kobakei/ratethisapp/RateThisAppTest.java
test_class.identifier: RateThisAppTest
test_case.body: @Test
      public void onStart_isSuccess() {
          Context context = RuntimeEnvironment.application.getApplicationContext();
  
          RateThisApp.onStart(context);
  
          SharedPreferences sharedPreferences = RuntimeEnvironment.application.getSharedPreferences(
                  PREF_NAME, Context.MODE_PRIVATE);
  
          // check if install date is stored
          long expectedInstallDate = 0L;
          PackageManager packMan = context.getPackageManager();
          try {
              PackageInfo pkgInfo = packMan.getPackageInfo(context.getPackageName(), 0);
              expectedInstallDate = new Date(pkgInfo.firstInstallTime).getTime();
          } catch (PackageManager.NameNotFoundException e) {
              e.printStackTrace();
          }
          Assert.assertEquals(expectedInstallDate, sharedPreferences.getLong(KEY_INSTALL_DATE, 0L));
  
          // check if launch time is incremented
          Assert.assertEquals(1, sharedPreferences.getInt(KEY_LAUNCH_TIMES, 0));
      }
test_case.class_method_signature: RateThisAppTest.onStart_isSuccess()
test_case.full_signature: @Test public void onStart_isSuccess()
test_case.identifier: onStart_isSuccess
test_case.invocations: getApplicationContext onStart getSharedPreferences getPackageManager getPackageInfo getPackageName getTime printStackTrace assertEquals getLong assertEquals getInt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void onStart_isSuccess()
focal_class.declarator: TAG = RateThisApp.class.getSimpleName()
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = RateThisApp.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: PREF_NAME = "RateThisApp"
focal_class.modifier: private static final
focal_class.original_string: private static final String PREF_NAME = "RateThisApp";
focal_class.type: String
focal_class.var_name: PREF_NAME
focal_class.declarator: KEY_INSTALL_DATE = "rta_install_date"
focal_class.modifier: private static final
focal_class.original_string: private static final String KEY_INSTALL_DATE = "rta_install_date";
focal_class.type: String
focal_class.var_name: KEY_INSTALL_DATE
focal_class.declarator: KEY_LAUNCH_TIMES = "rta_launch_times"
focal_class.modifier: private static final
focal_class.original_string: private static final String KEY_LAUNCH_TIMES = "rta_launch_times";
focal_class.type: String
focal_class.var_name: KEY_LAUNCH_TIMES
focal_class.declarator: KEY_OPT_OUT = "rta_opt_out"
focal_class.modifier: private static final
focal_class.original_string: private static final String KEY_OPT_OUT = "rta_opt_out";
focal_class.type: String
focal_class.var_name: KEY_OPT_OUT
focal_class.declarator: KEY_ASK_LATER_DATE = "rta_ask_later_date"
focal_class.modifier: private static final
focal_class.original_string: private static final String KEY_ASK_LATER_DATE = "rta_ask_later_date";
focal_class.type: String
focal_class.var_name: KEY_ASK_LATER_DATE
focal_class.declarator: mInstallDate = new Date()
focal_class.modifier: private static
focal_class.original_string: private static Date mInstallDate = new Date();
focal_class.type: Date
focal_class.var_name: mInstallDate
focal_class.declarator: mLaunchTimes = 0
focal_class.modifier: private static
focal_class.original_string: private static int mLaunchTimes = 0;
focal_class.type: int
focal_class.var_name: mLaunchTimes
focal_class.declarator: mOptOut = false
focal_class.modifier: private static
focal_class.original_string: private static boolean mOptOut = false;
focal_class.type: boolean
focal_class.var_name: mOptOut
focal_class.declarator: mAskLaterDate = new Date()
focal_class.modifier: private static
focal_class.original_string: private static Date mAskLaterDate = new Date();
focal_class.type: Date
focal_class.var_name: mAskLaterDate
focal_class.declarator: sConfig = new Config()
focal_class.modifier: private static
focal_class.original_string: private static Config sConfig = new Config();
focal_class.type: Config
focal_class.var_name: sConfig
focal_class.declarator: sCallback = null
focal_class.modifier: private static
focal_class.original_string: private static Callback sCallback = null;
focal_class.type: Callback
focal_class.var_name: sCallback
focal_class.declarator: sDialogRef = null
focal_class.modifier: private static
focal_class.original_string: private static WeakReference<AlertDialog> sDialogRef = null;
focal_class.type: WeakReference<AlertDialog>
focal_class.var_name: sDialogRef
focal_class.declarator: DEBUG = false
focal_class.modifier: public static final
focal_class.original_string: public static final boolean DEBUG = false;
focal_class.type: boolean
focal_class.var_name: DEBUG
focal_class.file: ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java
focal_class.identifier: RateThisApp
focal_class.class_method_signature: RateThisApp.init(Config config)
focal_class.full_signature: public static void init(Config config)
focal_class.identifier: init
focal_class.modifiers: public static
focal_class.parameters: (Config config)
focal_class.return: void
focal_class.signature: void init(Config config)
focal_class.class_method_signature: RateThisApp.setCallback(Callback callback)
focal_class.full_signature: public static void setCallback(Callback callback)
focal_class.identifier: setCallback
focal_class.modifiers: public static
focal_class.parameters: (Callback callback)
focal_class.return: void
focal_class.signature: void setCallback(Callback callback)
focal_class.class_method_signature: RateThisApp.onCreate(Context context)
focal_class.full_signature: public static void onCreate(Context context)
focal_class.identifier: onCreate
focal_class.modifiers: public static
focal_class.parameters: (Context context)
focal_class.return: void
focal_class.signature: void onCreate(Context context)
focal_class.class_method_signature: RateThisApp.onStart(Context context)
focal_class.full_signature: @Deprecated public static void onStart(Context context)
focal_class.identifier: onStart
focal_class.modifiers: @Deprecated public static
focal_class.parameters: (Context context)
focal_class.return: void
focal_class.signature: void onStart(Context context)
focal_class.class_method_signature: RateThisApp.showRateDialogIfNeeded(final Context context)
focal_class.full_signature: public static boolean showRateDialogIfNeeded(final Context context)
focal_class.identifier: showRateDialogIfNeeded
focal_class.modifiers: public static
focal_class.parameters: (final Context context)
focal_class.return: boolean
focal_class.signature: boolean showRateDialogIfNeeded(final Context context)
focal_class.class_method_signature: RateThisApp.showRateDialogIfNeeded(final Context context, int themeId)
focal_class.full_signature: public static boolean showRateDialogIfNeeded(final Context context, int themeId)
focal_class.identifier: showRateDialogIfNeeded
focal_class.modifiers: public static
focal_class.parameters: (final Context context, int themeId)
focal_class.return: boolean
focal_class.signature: boolean showRateDialogIfNeeded(final Context context, int themeId)
focal_class.class_method_signature: RateThisApp.shouldShowRateDialog()
focal_class.full_signature: public static boolean shouldShowRateDialog()
focal_class.identifier: shouldShowRateDialog
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean shouldShowRateDialog()
focal_class.class_method_signature: RateThisApp.showRateDialog(final Context context)
focal_class.full_signature: public static void showRateDialog(final Context context)
focal_class.identifier: showRateDialog
focal_class.modifiers: public static
focal_class.parameters: (final Context context)
focal_class.return: void
focal_class.signature: void showRateDialog(final Context context)
focal_class.class_method_signature: RateThisApp.showRateDialog(final Context context, int themeId)
focal_class.full_signature: public static void showRateDialog(final Context context, int themeId)
focal_class.identifier: showRateDialog
focal_class.modifiers: public static
focal_class.parameters: (final Context context, int themeId)
focal_class.return: void
focal_class.signature: void showRateDialog(final Context context, int themeId)
focal_class.class_method_signature: RateThisApp.stopRateDialog(final Context context)
focal_class.full_signature: public static void stopRateDialog(final Context context)
focal_class.identifier: stopRateDialog
focal_class.modifiers: public static
focal_class.parameters: (final Context context)
focal_class.return: void
focal_class.signature: void stopRateDialog(final Context context)
focal_class.class_method_signature: RateThisApp.getLaunchCount(final Context context)
focal_class.full_signature: public static int getLaunchCount(final Context context)
focal_class.identifier: getLaunchCount
focal_class.modifiers: public static
focal_class.parameters: (final Context context)
focal_class.return: int
focal_class.signature: int getLaunchCount(final Context context)
focal_class.class_method_signature: RateThisApp.showRateDialog(final Context context, AlertDialog.Builder builder)
focal_class.full_signature: private static void showRateDialog(final Context context, AlertDialog.Builder builder)
focal_class.identifier: showRateDialog
focal_class.modifiers: private static
focal_class.parameters: (final Context context, AlertDialog.Builder builder)
focal_class.return: void
focal_class.signature: void showRateDialog(final Context context, AlertDialog.Builder builder)
focal_class.class_method_signature: RateThisApp.clearSharedPreferences(Context context)
focal_class.full_signature: private static void clearSharedPreferences(Context context)
focal_class.identifier: clearSharedPreferences
focal_class.modifiers: private static
focal_class.parameters: (Context context)
focal_class.return: void
focal_class.signature: void clearSharedPreferences(Context context)
focal_class.class_method_signature: RateThisApp.setOptOut(final Context context, boolean optOut)
focal_class.full_signature: private static void setOptOut(final Context context, boolean optOut)
focal_class.identifier: setOptOut
focal_class.modifiers: private static
focal_class.parameters: (final Context context, boolean optOut)
focal_class.return: void
focal_class.signature: void setOptOut(final Context context, boolean optOut)
focal_class.class_method_signature: RateThisApp.storeInstallDate(final Context context, SharedPreferences.Editor editor)
focal_class.full_signature: private static void storeInstallDate(final Context context, SharedPreferences.Editor editor)
focal_class.identifier: storeInstallDate
focal_class.modifiers: private static
focal_class.parameters: (final Context context, SharedPreferences.Editor editor)
focal_class.return: void
focal_class.signature: void storeInstallDate(final Context context, SharedPreferences.Editor editor)
focal_class.class_method_signature: RateThisApp.storeAskLaterDate(final Context context)
focal_class.full_signature: private static void storeAskLaterDate(final Context context)
focal_class.identifier: storeAskLaterDate
focal_class.modifiers: private static
focal_class.parameters: (final Context context)
focal_class.return: void
focal_class.signature: void storeAskLaterDate(final Context context)
focal_class.class_method_signature: RateThisApp.printStatus(final Context context)
focal_class.full_signature: private static void printStatus(final Context context)
focal_class.identifier: printStatus
focal_class.modifiers: private static
focal_class.parameters: (final Context context)
focal_class.return: void
focal_class.signature: void printStatus(final Context context)
focal_class.class_method_signature: RateThisApp.log(String message)
focal_class.full_signature: private static void log(String message)
focal_class.identifier: log
focal_class.modifiers: private static
focal_class.parameters: (String message)
focal_class.return: void
focal_class.signature: void log(String message)
focal_method.body: @Deprecated
      public static void onStart(Context context) {
          onCreate(context);
      }
focal_method.class_method_signature: RateThisApp.onStart(Context context)
focal_method.full_signature: @Deprecated public static void onStart(Context context)
focal_method.identifier: onStart
focal_method.invocations: onCreate
focal_method.modifiers: @Deprecated public static
focal_method.parameters: (Context context)
focal_method.return: void
focal_method.signature: void onStart(Context context)