@Override
  public void onCreate() {

    super.onCreate();
    // MultiDex.install(this);

  }
예제 #2
0
  @Override
  public void onCreate() {
    super.onCreate();
    instance = this;

    SyncCtrl.startSyncExecutionDataTask();
  }
예제 #3
0
  @Override
  public void onCreate() {
    super.onCreate();
    Log.d("MoxtraApplication", "onCreate");

    CustomizeUISettings.setUISettings();
    // Must be initialize before any activity starts if use asynchronous mode to initialize
    // MXAccountManager .
    //        MXApplicationManager.getInstance().initialize(getApplicationContext());
    int mode =
        PreferenceUtils.getInstance(this)
            .getInt(
                LoginActivity.PERFERENCE_MXACCOUNTMANAGER_INITIAL_TYPE, LoginActivity.SYNC_MODE);
    try {
      if (mode == LoginActivity.ASYNC_MODE) {
        MXAccountManager.createInstance(
            getApplicationContext(), "uNisxXhvxZI", "gAUoJMpSE38", true, null);
      } else {
        MXAccountManager.createInstance(
            getApplicationContext(), "uNisxXhvxZI", "gAUoJMpSE38", true);
      }
    } catch (MXSDKException.InvalidParameter invalidParameter) {
      invalidParameter.printStackTrace();
    }

    Log.d("MoxtraApplication", "onCreate end");
  }
예제 #4
0
 @Override
 public void onCreate() {
   super.onCreate();
   context = getApplicationContext();
   ACRA.init(this);
   appSingleton = this;
   deviceCheck();
   // SSLCertificateHandler.nuke();
 }
 @Override
 public void onCreate() {
   super.onCreate();
   objectGraph =
       ObjectGraph.create(
           new Object[] {
             new AppModule(MovieCheckApplication.this), new ApiModule(), new DaoModule()
           });
 }
예제 #6
0
 @Override
 public void onCreate() {
   super.onCreate();
   mInstance = this;
   preferences = getSharedPreferences("POLICY_CHECK", Context.MODE_PRIVATE);
   //        Firebase.setAndroidContext(this);
   /* Enable disk persistence  */
   if (!FirebaseApp.getApps(this).isEmpty()) {
     FirebaseDatabase.getInstance().setPersistenceEnabled(true);
   }
 }
예제 #7
0
 @Override
 public void onCreate() {
   super.onCreate();
   Tinker.init(this);
   Tinker.setBackgroundPolicy(
       new Tinker.BackgroundPolicy() {
         @Override
         public boolean isReadyForFix() {
           return true;
         }
       });
 }
  @Override
  protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);

    CalligraphyConfig.initDefault(
        new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/RobotoCondensed-Regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build());

    MultiDex.install(this);
  }
  @Override
  public void onCreate() {
    super.onCreate();

    Fabric.with(this, new Crashlytics());
    Application.application = this;
    CarpaccioLogger.ENABLE_LOG = true;

    this.betaSeriesComponent =
        DaggerBetaSeriesComponent.builder()
            .contextModule(ContextModule.with(getApplicationContext())) // in case we need a context
            .build();

    betaSeriesComponent.unseenManager().load();
  }
예제 #10
0
 @Override
 protected void attachBaseContext(Context context) {
   super.attachBaseContext(context);
   MultiDex.install(this);
 }
 @Override
 public void onCreate() {
   super.onCreate();
   FacebookSdk.sdkInitialize(this);
 }
 @Override
 public void onLowMemory() {
   final DependencyHolder holder = DependencyHolder.get(this);
   super.onLowMemory();
 }
 @Override
 public void onTrimMemory(int level) {
   super.onTrimMemory(level);
 }
  @Override
  public void onCreate() {
    if (BuildConfig.DEBUG) {
      StrictModeUtils.detectAllVmPolicy();
    }
    super.onCreate();
    initDebugMode();
    initBugReport();
    mHandler = new Handler();
    initializeAsyncTask();
    initAccountColor(this);

    final PackageManager pm = getPackageManager();
    final ComponentName main = new ComponentName(this, MainActivity.class);
    final ComponentName main2 = new ComponentName(this, MainHondaJOJOActivity.class);
    final boolean mainDisabled =
        pm.getComponentEnabledSetting(main) != PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
    final boolean main2Disabled =
        pm.getComponentEnabledSetting(main2) != PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
    final boolean noEntry = mainDisabled && main2Disabled;
    if (noEntry) {
      pm.setComponentEnabledSetting(
          main, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
    } else if (!mainDisabled) {
      pm.setComponentEnabledSetting(
          main2, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
    }
    if (!Utils.isComposeNowSupported(this)) {
      final ComponentName assist = new ComponentName(this, AssistLauncherActivity.class);
      pm.setComponentEnabledSetting(
          assist, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
    }

    migrateUsageStatisticsPreferences();
    startRefreshServiceIfNeeded(this);

    reloadConnectivitySettings();

    DependencyHolder holder = DependencyHolder.get(this);
    registerActivityLifecycleCallbacks(holder.getActivityTracker());

    final IntentFilter packageFilter = new IntentFilter();
    packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
    packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
    packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
    packageFilter.addAction(Intent.ACTION_PACKAGE_REPLACED);
    registerReceiver(
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context context, Intent intent) {
            final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
            final String[] packages = getPackageManager().getPackagesForUid(uid);
            DependencyHolder holder = DependencyHolder.get(context);
            final ExternalThemeManager manager = holder.getExternalThemeManager();
            if (ArrayUtils.contains(packages, manager.getEmojiPackageName())) {
              manager.reloadEmojiPreferences();
            }
          }
        },
        packageFilter);
  }
예제 #15
0
 protected void attachBaseContext(Context base) {
   super.attachBaseContext(base);
   MultiDex.install(this);
 }
예제 #16
0
  @Override
  public void onTerminate() {
    super.onTerminate();

    SyncCtrl.stopSyncExecutionDataTask();
  }