Esempio n. 1
0
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
          mLoggerService = ILoggerService.Stub.asInterface(service);
          try {
            mLoggerService.setOppacity(mOppacity);
            mLoggerService.setVerticalLogLinesWeight(mVerticalLogLinesWeight);
            mLoggerService.setVerticalLogLinesOffset(mVerticalLogLinesOffset);
            mLoggerService.setHorizontalLogLinesWeight(mHorizontalLogLinesWeight);
            mLoggerService.setHorizontalLogLinesOffset(mHorizontalLogLinesOffset);
            mLoggerService.setFontsize(mFontSize);
            mLoggerService.setFontColor(mFontColor);
            mLoggerService.enableGrep(mGrepEnable);
            mLoggerService.setGrepText(mGrepText);
            mLoggerService.setSelectedContents(mDisplayContents);

            mLoggerService.startLogger();
          } catch (RemoteException e) {
            e.printStackTrace();
          }
        }
Esempio n. 2
0
  private void startLogger() {
    if (mLoggerService == null) {
      bindService(
          new Intent(getApplicationContext(), LoggerService.class),
          mLoggerServiceConnection,
          Context.BIND_AUTO_CREATE);
    }

    if (mLoggerService != null) {
      try {
        mLoggerService.setOppacity(mOppacity);
        mLoggerService.setVerticalLogLinesWeight(mVerticalLogLinesWeight);
        mLoggerService.setVerticalLogLinesOffset(mVerticalLogLinesOffset);
        mLoggerService.setHorizontalLogLinesWeight(mHorizontalLogLinesWeight);
        mLoggerService.setHorizontalLogLinesOffset(mHorizontalLogLinesOffset);

        mLoggerService.startLogger();
      } catch (RemoteException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
  }