Tabnine Logo
Log.e
Code IndexAdd Tabnine to your IDE (free)

How to use
e
method
in
io.vov.vitamio.utils.Log

Best Java code snippets using io.vov.vitamio.utils.Log.e (Showing top 20 results out of 315)

origin: curtis2/SuperVideoPlayer

public static int getVersionCode(Context ctx) {
  int version = 0;
  try {
    version = ctx.getPackageManager().getPackageInfo(ctx.getApplicationInfo().packageName, 0).versionCode;
  } catch (Exception e) {
    Log.e("getVersionInt", e);
  }
  return version;
}
origin: curtis2/SuperVideoPlayer

private static byte[] generateKey(String input) {
  try {
    byte[] bytesOfMessage = input.getBytes("UTF-8");
    MessageDigest md = MessageDigest.getInstance("SHA256");
    return md.digest(bytesOfMessage);
  } catch (Exception e) {
    Log.e("generateKey", e);
    return null;
  }
}
origin: curtis2/SuperVideoPlayer

private void setupCrypto(SecretKey key) {
  byte[] iv = new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };
  AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv);
  try {
    ecipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
  } catch (Exception e) {
    ecipher = null;
    Log.e("setupCrypto", e);
  }
}
origin: curtis2/SuperVideoPlayer

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public void setWindowLayoutType() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    try {
      mAnchor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
      Method setWindowLayoutType = PopupWindow.class.getMethod("setWindowLayoutType", new Class[]{int.class});
      setWindowLayoutType.invoke(mWindow, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG);
    } catch (Exception e) {
      Log.e("setWindowLayoutType", e);
    }
  }
}
origin: curtis2/SuperVideoPlayer

private PublicKey readKeyFromStream(InputStream keyStream) throws IOException {
  ObjectInputStream oin = new ObjectInputStream(new BufferedInputStream(keyStream));
  try {
    PublicKey pubKey = (PublicKey) oin.readObject();
    return pubKey;
  } catch (Exception e) {
    Log.e("readKeyFromStream", e);
    return null;
  } finally {
    oin.close();
  }
}
origin: curtis2/SuperVideoPlayer

private void closeFD() {
 if (mFD != null) {
  try {
   mFD.close();
  } catch (IOException e) {
   Log.e("closeFD", e);
  }
  mFD = null;
 }
}

origin: curtis2/SuperVideoPlayer

public String encrypt(String plaintext) {
  if (ecipher == null)
    return "";
  try {
    byte[] ciphertext = ecipher.doFinal(plaintext.getBytes("UTF-8"));
    return Base64.encodeToString(ciphertext, Base64.NO_WRAP);
  } catch (Exception e) {
    Log.e("encryp", e);
    return "";
  }
}
origin: curtis2/SuperVideoPlayer

public static int convertToInt(String str) throws NumberFormatException {
  int s, e;
  for (s = 0; s < str.length(); s++)
    if (Character.isDigit(str.charAt(s)))
      break;
  for (e = str.length(); e > 0; e--)
    if (Character.isDigit(str.charAt(e - 1)))
      break;
  if (e > s) {
    try {
      return Integer.parseInt(str.substring(s, e));
    } catch (NumberFormatException ex) {
      Log.e("convertToInt", ex);
      throw new NumberFormatException();
    }
  } else {
    throw new NumberFormatException();
  }
}
origin: curtis2/SuperVideoPlayer

public String rsaEncrypt(InputStream keyStream, byte[] data) {
  try {
    PublicKey pubKey = readKeyFromStream(keyStream);
    Cipher cipher = Cipher.getInstance("RSA/ECB/NoPadding");
    cipher.init(Cipher.ENCRYPT_MODE, pubKey);
    byte[] cipherData = cipher.doFinal(data);
    return Base64.encodeToString(cipherData, Base64.NO_WRAP);
  } catch (Exception e) {
    Log.e("rsaEncrypt", e);
    return "";
  }
}
origin: curtis2/SuperVideoPlayer

public Uri scanSingleFile(String path, String mimeType) {
 try {
  prescan(path);
  File file = new File(path);
  long lastModifiedSeconds = file.lastModified() / 1000;
  return mClient.doScanFile(path, lastModifiedSeconds, file.length(), true);
 } catch (RemoteException e) {
  Log.e("RemoteException in MediaScanner.scanFile()", e);
  return null;
 }
}
origin: curtis2/SuperVideoPlayer

public Crypto(String key) {
  try {
    SecretKeySpec skey = new SecretKeySpec(generateKey(key), "AES");
    setupCrypto(skey);
  } catch (Exception e) {
    Log.e("Crypto", e);
  }
}
origin: curtis2/SuperVideoPlayer

private static Bitmap getMiniThumbFromFile(Cursor c, Uri baseUri, ContentResolver cr, BitmapFactory.Options options) {
 Bitmap bitmap = null;
 Uri thumbUri = null;
 try {
  long thumbId = c.getLong(0);
  thumbUri = ContentUris.withAppendedId(baseUri, thumbId);
  ParcelFileDescriptor pfdInput = cr.openFileDescriptor(thumbUri, "r");
  bitmap = BitmapFactory.decodeFileDescriptor(pfdInput.getFileDescriptor(), null, options);
  pfdInput.close();
 } catch (FileNotFoundException ex) {
  Log.e("getMiniThumbFromFile", ex);
 } catch (IOException ex) {
  Log.e("getMiniThumbFromFile", ex);
 } catch (OutOfMemoryError ex) {
  Log.e("getMiniThumbFromFile", ex);
 }
 return bitmap;
}
origin: curtis2/SuperVideoPlayer

private RandomAccessFile miniThumbDataFile() {
 if (mMiniThumbFile == null) {
  removeOldFile();
  String path = randomAccessFilePath(MINI_THUMB_DATA_FILE_VERSION);
  File directory = new File(path).getParentFile();
  if (!directory.isDirectory()) {
   if (!directory.mkdirs())
    Log.e("Unable to create .thumbnails directory %s", directory.toString());
  }
  File f = new File(path);
  try {
   mMiniThumbFile = new RandomAccessFile(f, "rw");
  } catch (IOException ex) {
   try {
    mMiniThumbFile = new RandomAccessFile(f, "r");
   } catch (IOException ex2) {
   }
  }
  if (mMiniThumbFile != null)
   mChannel = mMiniThumbFile.getChannel();
 }
 return mMiniThumbFile;
}
origin: curtis2/SuperVideoPlayer

public Uri doScanFile(String path, long lastModified, long fileSize, boolean scanAlways) {
 Uri result = null;
 try {
  FileCacheEntry entry = beginFile(path, lastModified, fileSize);
  if (entry != null && (entry.mLastModifiedChanged || scanAlways)) {
   if (processFile(path, null)) {
    result = endFile(entry);
   } else {
    if (mCaseInsensitivePaths)
     mFileCache.remove(path.toLowerCase());
    else
     mFileCache.remove(path);
   }
  }
 } catch (RemoteException e) {
  Log.e("RemoteException in MediaScanner.scanFile()", e);
 }
 return result;
}
origin: curtis2/SuperVideoPlayer

private static void postEventFromNative(Object mediaplayer_ref, int what, int arg1, int arg2, Object obj) {
 MediaPlayer mp = (MediaPlayer) (mediaplayer_ref);
 if (mp == null)
  return;
 try {
   //synchronized (mp.mEventHandler) {
   if (mp.mEventHandler != null) {
    Message m = mp.mEventHandler.obtainMessage(what, arg1, arg2, obj);
    mp.mEventHandler.sendMessage(m);
   }
 } catch (Exception e) {
   Log.e("exception: " + e);
 }
}
origin: curtis2/SuperVideoPlayer

private void updateSub(int subType, byte[] bytes, String encoding, int width, int height) {
 if (mEventHandler != null) {
  Message m = mEventHandler.obtainMessage(MEDIA_TIMED_TEXT, width, height);
  Bundle b = m.getData();
  if (subType == SUBTITLE_TEXT) {
   b.putInt(MEDIA_SUBTITLE_TYPE, SUBTITLE_TEXT);
   if (encoding == null) {
    b.putString(MEDIA_SUBTITLE_STRING, new String(bytes));
   } else {
    try {
     b.putString(MEDIA_SUBTITLE_STRING, new String(bytes, encoding.trim()));
    } catch (UnsupportedEncodingException e) {
     Log.e("updateSub", e);
     b.putString(MEDIA_SUBTITLE_STRING, new String(bytes));
    }
   }
  } else if (subType == SUBTITLE_BITMAP) {
   b.putInt(MEDIA_SUBTITLE_TYPE, SUBTITLE_BITMAP);
   b.putByteArray(MEDIA_SUBTITLE_BYTES, bytes);
  }
  mEventHandler.sendMessage(m);
 }
}
origin: curtis2/SuperVideoPlayer

public void scanDirectories(String[] directories) {
 try {
  long start = System.currentTimeMillis();
  prescan(null);
  long prescan = System.currentTimeMillis();
  for (int i = 0; i < directories.length; i++) {
   if (!TextUtils.isEmpty(directories[i])) {
    directories[i] = ContextUtils.fixLastSlash(directories[i]);
    processDirectory(directories[i], MediaFile.sFileExtensions);
   }
  }
  long scan = System.currentTimeMillis();
  postscan(directories);
  long end = System.currentTimeMillis();
  Log.d(" prescan time: %dms", prescan - start);
  Log.d("    scan time: %dms", scan - prescan);
  Log.d("postscan time: %dms", end - scan);
  Log.d("   total time: %dms", end - start);
 } catch (SQLException e) {
  Log.e("SQLException in MediaScanner.scan()", e);
 } catch (UnsupportedOperationException e) {
  Log.e("UnsupportedOperationException in MediaScanner.scan()", e);
 } catch (RemoteException e) {
  Log.e("RemoteException in MediaScanner.scan()", e);
 }
}
origin: curtis2/SuperVideoPlayer

 public int audioTrackInit() {
//      Log.e("  ffff mediaplayer audiotrackinit start .  sampleRateInHz:=" + sampleRateInHz + " channels:=" + channels );
    audioTrackRelease();
    int channelConfig = channels >= 2 ? AudioFormat.CHANNEL_OUT_STEREO : AudioFormat.CHANNEL_OUT_MONO;
    try {
     mAudioTrackBufferSize = AudioTrack.getMinBufferSize(sampleRateInHz, channelConfig, AudioFormat.ENCODING_PCM_16BIT);
     mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRateInHz, channelConfig, AudioFormat.ENCODING_PCM_16BIT, mAudioTrackBufferSize, AudioTrack.MODE_STREAM);
    } catch (Exception e) {
     mAudioTrackBufferSize = 0;
     Log.e("audioTrackInit", e);
    }
    return mAudioTrackBufferSize;
   }
 
origin: curtis2/SuperVideoPlayer

private void surfaceRender() {
 synchronized (this) {
  if (mLocalSurface == null || !mLocalSurface.isValid() || mBitmap == null || mByteBuffer == null)
   return;
  try {
   Canvas c = mLocalSurface.lockCanvas(null);
   mBitmap.copyPixelsFromBuffer(mByteBuffer);
   c.drawBitmap(mBitmap, 0, 0, null);
   mLocalSurface.unlockCanvasAndPost(c);
  } catch (Exception e) {
   Log.e("surfaceRender", e);
  }
 }
}
origin: curtis2/SuperVideoPlayer

 @Override
 public boolean onInfo(MediaPlayer mp, int what, int extra) {
  Log.d("onInfo: (%d, %d)", what, extra);
   
    if(MediaPlayer.MEDIA_INFO_UNKNOW_TYPE == what){
     Log.e(" VITAMIO--TYPE_CHECK  stype  not include  onInfo mediaplayer unknow type ");
   } 
   
   if(MediaPlayer.MEDIA_INFO_FILE_OPEN_OK == what){
     long buffersize=mMediaPlayer.audioTrackInit(); 
     mMediaPlayer.audioInitedOk(buffersize);
   }
  Log.d("onInfo: (%d, %d)", what, extra);
  if (mOnInfoListener != null) {
   mOnInfoListener.onInfo(mp, what, extra);
  } else if (mMediaPlayer != null) {
   if (what == MediaPlayer.MEDIA_INFO_BUFFERING_START) {
    mMediaPlayer.pause();
    if (mMediaBufferingIndicator != null)
     mMediaBufferingIndicator.setVisibility(View.VISIBLE);
   } else if (what == MediaPlayer.MEDIA_INFO_BUFFERING_END) {
    mMediaPlayer.start();
    if (mMediaBufferingIndicator != null)
     mMediaBufferingIndicator.setVisibility(View.GONE);
   }
  }
  return true;
 }
};
io.vov.vitamio.utilsLoge

Popular methods of Log

  • d
  • i

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now