Skip to content

Instantly share code, notes, and snippets.

Daniel Lee dbof10

Block or report user

Report or block dbof10

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View BluetoothManager.java
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.quickblox.videochat.webrtc;
import android.annotation.SuppressLint;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
View AdbRotationHelper.java
public class AdbRotationHelper {
public static void forceRotation(final int rotation) {
new Thread() {
public void run() {
try {
Runtime.getRuntime().exec("/system/bin/content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0").waitFor();
Runtime.getRuntime().exec("/system/bin/content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:" + rotation).waitFor();
} catch (Exception e) {
}
}
View AlphaImageView.java
import android.content.Context;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_MOVE;
@dbof10
dbof10 / Updater.java
Created Mar 29, 2017
Update React bundle
View Updater.java
public class ReactUpdater extends IntentService {
private static final String BUNDLE_API_KEY = "serve";
private static final String INITIAL_BUNDLE_PATH = "assets://index.android.bundle";
private static final String LAST_UPDATED_KEY = "last_updated";
private static final String MAPPINGS_KEY = "name";
private static final String SETUP_KEY = "setup_3.13.0";
private static final String SHARED_PREFERENCE_NAME = "com.myntra.update.react";
private static final String TAG;
private static final String VERSION_KEY = "version";
View FlagPainter.java
public class FlagPainter {
private static final int PENTAGON = 5;
private static final float ROTATE = -18F;
private Bitmap drawStar(int size) {
Path path;
Paint paint = new Paint();
Matrix matrix = new Matrix();
paint.setColor(Color.YELLOW);
You can’t perform that action at this time.