@Override
 protected void onResume() {
   super.onResume();
   checkEula();
   _broadcastReceiver =
       new BroadcastReceiver() {
         @Override
         public void onReceive(Context ctx, Intent intent) {
           if (intent.getAction().compareTo(Intent.ACTION_TIME_TICK) == 0) {
             updateCurrentBgInfo();
           }
         }
       };
   newDataReceiver =
       new BroadcastReceiver() {
         @Override
         public void onReceive(Context ctx, Intent intent) {
           holdViewport.set(0, 0, 0, 0);
           setupCharts();
           updateCurrentBgInfo();
         }
       };
   registerReceiver(_broadcastReceiver, new IntentFilter(Intent.ACTION_TIME_TICK));
   registerReceiver(newDataReceiver, new IntentFilter(Intents.ACTION_NEW_BG_ESTIMATE_NO_DATA));
   holdViewport.set(0, 0, 0, 0);
   setupCharts();
   updateCurrentBgInfo();
 }
  @Override
  protected void onResume() {
    super.onResume();

    // xdrip start
    extendedGraphBuilder = new ExtendedGraphBuilder(getApplicationContext());

    _broadcastReceiver =
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context ctx, Intent intent) {
            if (intent.getAction().compareTo(Intent.ACTION_TIME_TICK) == 0) {
              setupCharts();
              displayCurrentInfo();
              holdViewport.set(0, 0, 0, 0);
            }
          }
        };
    newDataReceiver =
        new BroadcastReceiver() {
          @Override
          public void onReceive(Context ctx, Intent intent) {
            setupCharts();
            displayCurrentInfo();
            holdViewport.set(0, 0, 0, 0);
          }
        };
    registerReceiver(_broadcastReceiver, new IntentFilter(Intent.ACTION_TIME_TICK));
    registerReceiver(newDataReceiver, new IntentFilter(Intents.ACTION_NEW_BG));
    setupCharts();
    displayCurrentInfo();
    holdViewport.set(0, 0, 0, 0);
    // xdrip end
  }