当前位置: 首页>>代码示例>>Java>>正文


Java BuildConfig类代码示例

本文整理汇总了Java中org.videolan.vlc.BuildConfig的典型用法代码示例。如果您正苦于以下问题:Java BuildConfig类的具体用法?Java BuildConfig怎么用?Java BuildConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BuildConfig类属于org.videolan.vlc包,在下文中一共展示了BuildConfig类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareCacheFolder

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
@SuppressLint("NewApi")
public static void prepareCacheFolder(Context context) {
    try {
        if (AndroidUtil.isFroyoOrLater() && AndroidDevices.hasExternalStorage() && context.getExternalCacheDir() != null)
            CACHE_DIR = context.getExternalCacheDir().getPath();
        else
            CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache";
    } catch (Exception e) { // catch NPE thrown by getExternalCacheDir()
        CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache";
    }
    ART_DIR = CACHE_DIR + "/art/";
    COVER_DIR = CACHE_DIR + "/covers/";
    PLAYLIST_DIR = CACHE_DIR + "/playlists/";

    for(String path : Arrays.asList(ART_DIR, COVER_DIR)) {
        File file = new File(path);
        if (!file.exists())
            file.mkdirs();
    }
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:21,代码来源:AudioUtil.java

示例2: onPause

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onPause() {
    super.onPause();
    mSeekbar.setOnSeekBarChangeListener(null);
    mLock.setOnClickListener(null);
    mPlayPause.setOnClickListener(null);
    mPlayPause.setOnLongClickListener(null);
    mLength.setOnClickListener(null);
    mTime.setOnClickListener(null);
    mSize.setOnClickListener(null);

    /* Stop the earliest possible to avoid vout error */
    if (isFinishing())
        stopPlayback();
    else if (BuildConfig.tv && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !requestVisibleBehind(true))
        stopPlayback();
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:19,代码来源:VideoPlayerActivity.java

示例3: onBackPressed

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
@Override
public void onBackPressed() {
    if (mLockBackButton) {
        mLockBackButton = false;
        mHandler.sendEmptyMessageDelayed(RESET_BACK_LOCK, 2000);
        Toast.makeText(this, getString(R.string.back_quit_lock), Toast.LENGTH_SHORT).show();
    } else if (mDelay != DelayState.OFF){
        endDelaySetting();
    } else if (BuildConfig.tv && mShowing && !mIsLocked) {
        hideOverlay(true);
    } else
        exitOK();
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:14,代码来源:VideoPlayerActivity.java

示例4: copyNodeInfoNoChildren

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
/**
 * This should really be in AccessibilityNodeInfoCompat, but there unfortunately
 * seem to be a few elements that are not easily cloneable using the underlying API.
 * Leave it private here as it's not general-purpose useful.
 */
private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest,
        AccessibilityNodeInfoCompat src) {
    final Rect rect = mTmpRect;

    src.getBoundsInParent(rect);
    dest.setBoundsInParent(rect);

    src.getBoundsInScreen(rect);
    dest.setBoundsInScreen(rect);

    dest.setVisibleToUser(src.isVisibleToUser());
    dest.setPackageName(BuildConfig.APPLICATION_ID);
    dest.setClassName(src.getClassName());
    dest.setContentDescription(src.getContentDescription());

    dest.setEnabled(src.isEnabled());
    dest.setClickable(src.isClickable());
    dest.setFocusable(src.isFocusable());
    dest.setFocused(src.isFocused());
    dest.setAccessibilityFocused(src.isAccessibilityFocused());
    dest.setSelected(src.isSelected());
    dest.setLongClickable(src.isLongClickable());

    dest.addAction(src.getActions());

    dest.setMovementGranularities(src.getMovementGranularities());
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:33,代码来源:SlidingPaneLayout.java

示例5: dispatchGenericMotionEvent

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
@TargetApi(12) //only active for Android 3.1+
public boolean dispatchGenericMotionEvent(MotionEvent event){
    if (mIsLoading)
        return  false;
    //Check for a joystick event
    if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) !=
            InputDevice.SOURCE_JOYSTICK ||
            event.getAction() != MotionEvent.ACTION_MOVE)
        return false;

    InputDevice mInputDevice = event.getDevice();

    float dpadx = event.getAxisValue(MotionEvent.AXIS_HAT_X);
    float dpady = event.getAxisValue(MotionEvent.AXIS_HAT_Y);
    if (mInputDevice == null || Math.abs(dpadx) == 1.0f || Math.abs(dpady) == 1.0f)
        return false;

    float x = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_X);
    float y = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_Y);
    float rz = AndroidDevices.getCenteredAxis(event, mInputDevice,
            MotionEvent.AXIS_RZ);

    if (System.currentTimeMillis() - mLastMove > JOYSTICK_INPUT_DELAY){
        if (Math.abs(x) > 0.3){
            if (BuildConfig.tv) {
                navigateDvdMenu(x > 0.0f ? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT);
            } else
                seekDelta(x > 0.0f ? 10000 : -10000);
        } else if (Math.abs(y) > 0.3){
            if (BuildConfig.tv)
                navigateDvdMenu(x > 0.0f ? KeyEvent.KEYCODE_DPAD_UP : KeyEvent.KEYCODE_DPAD_DOWN);
            else {
                if (mIsFirstBrightnessGesture)
                    initBrightnessTouch();
                changeBrightness(-y / 10f);
            }
        } else if (Math.abs(rz) > 0.3){
            mVol = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
            int delta = -(int) ((rz / 7) * mAudioMax);
            int vol = (int) Math.min(Math.max(mVol + delta, 0), mAudioMax);
            setAudioVolume(vol);
        }
        mLastMove = System.currentTimeMillis();
    }
    return true;
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:49,代码来源:VideoPlayerActivity.java

示例6: applyTheme

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
private void applyTheme() {
    boolean enableBlackTheme = mSettings.getBoolean("enable_black_theme", false);
    if (BuildConfig.tv || enableBlackTheme) {
        setTheme(R.style.Theme_VLC_Black);
    }
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:7,代码来源:AudioPlayerContainerActivity.java

示例7: onCreate

import org.videolan.vlc.BuildConfig; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    findPreference("debug_logs").setVisible(BuildConfig.DEBUG && (AndroidUtil.isJellyBeanMR1OrLater() ||
            getActivity().checkCallingOrSelfPermission(Manifest.permission.READ_LOGS) == PackageManager.PERMISSION_GRANTED));
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:7,代码来源:Developer.java


注:本文中的org.videolan.vlc.BuildConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。