Пример #1
0
 public void debug(boolean enable) {
   HomeUtils.DEBUG = enable;
   File file = new File(HomeUtils.get3DHomePath() + File.separator + ".debug");
   if (enable) {
     if (!file.exists()) {
       try {
         file.createNewFile();
       } catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
       }
     }
     Toast.makeText(HomeManager.getInstance().getContext(), "Open debug!!!", Toast.LENGTH_SHORT)
         .show();
     SELoadResThread.getInstance().process(mDetectMemoryTask, 10000);
   } else {
     if (file.exists()) {
       file.delete();
     }
     Toast.makeText(HomeManager.getInstance().getContext(), "Close debug!!!", Toast.LENGTH_SHORT)
         .show();
     SELoadResThread.getInstance().cancel(mDetectMemoryTask);
   }
   SESceneManager.setDebug_JNI(enable);
 }
Пример #2
0
 public void init(Context context) {
   File file = new File(HomeUtils.get3DHomePath() + File.separator + ".debug");
   if (file.exists()) {
     HomeUtils.DEBUG = true;
   }
   System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
   SESceneManager.getInstance().initEngine(context);
   SESceneManager.getInstance().enableLight(true);
   SESceneManager.setDebug_JNI(HomeUtils.DEBUG);
   createOrUpgradeDB();
   LauncherModel.getInstance().loadAllData(false);
   mTimeCallBacks = new ArrayList<TimeChangeCallBack>();
   mAppWidgetManager = AppWidgetManager.getInstance(context);
   mAppIconBackgroundType = SettingsActivity.getAppIconBackgroundType(getContext());
   mShowAppShef = SettingsActivity.getShowShelfSetting(getContext());
   mShowDeskObjectShef = SettingsActivity.getShowDeskObjectShelfSetting(getContext());
   mShowAllIndicator = SettingsActivity.isEnableWallIndicator(getContext());
   mShowHelpDialog = !SettingsActivity.getHelpStatus(getContext());
   mCurSceneOrientation = SceneOrientation.AUTO_PORT;
 }