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


Java SystemProperties.getInt方法代码示例

本文整理汇总了Java中android.os.SystemProperties.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java SystemProperties.getInt方法的具体用法?Java SystemProperties.getInt怎么用?Java SystemProperties.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.SystemProperties的用法示例。


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

示例1: dispatchKeyEvent

import android.os.SystemProperties; //导入方法依赖的package包/类
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
    if (event.getAction() == KeyEvent.ACTION_DOWN) {
        switch (event.getKeyCode()) {
            case KeyEvent.KEYCODE_HOME:
                return true;
            case KeyEvent.KEYCODE_VOLUME_DOWN:
                if (SystemProperties.getInt("debug.launcher2.dumpstate", 0) != 0) {
                    dumpState();
                    return true;
                }
                break;
        }
    } else if (event.getAction() == KeyEvent.ACTION_UP) {
        switch (event.getKeyCode()) {
            case KeyEvent.KEYCODE_HOME:
                return true;
        }
    }

    return super.dispatchKeyEvent(event);
}
 
开发者ID:pengqinping,项目名称:androidProject,代码行数:23,代码来源:Launcher.java

示例2: performStart

import android.os.SystemProperties; //导入方法依赖的package包/类
final void performStart() {
    mActivityTransitionState.setEnterActivityOptions(this, getActivityOptions());
    mFragments.noteStateNotSaved();
    mCalled = false;
    mFragments.execPendingActions();
    mInstrumentation.callActivityOnStart(this);
    if (!mCalled) {
        throw new SuperNotCalledException(
                "Activity " + mComponent.toShortString() +
                        " did not call through to super.onStart()");
    }
    mFragments.dispatchStart();
    mFragments.reportLoaderStart();

    // This property is set for all builds except final release
    boolean isDlwarningEnabled = SystemProperties.getInt("ro.bionic.ld.warning", 0) == 1;
    boolean isAppDebuggable =
            (mApplication.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;

    if (isAppDebuggable || isDlwarningEnabled) {
        String dlwarning = getDlWarning();
        if (dlwarning != null) {
            String appName = getApplicationInfo().loadLabel(getPackageManager())
                    .toString();
            String warning = "Detected problems with app native libraries\n" +
                    "(please consult log for detail):\n" + dlwarning;
            if (isAppDebuggable) {
                new AlertDialog.Builder(this).
                        setTitle(appName).
                        setMessage(warning).
                        setPositiveButton(android.R.string.ok, null).
                        setCancelable(false).
                        show();
            } else {
                Toast.makeText(this, appName + "\n" + warning, Toast.LENGTH_LONG).show();
            }
        }
    }

    mActivityTransitionState.enterReady(this);
}
 
开发者ID:JessYanCoding,项目名称:ProgressManager,代码行数:42,代码来源:a.java

示例3: getDeviceDensity

import android.os.SystemProperties; //导入方法依赖的package包/类
private static int getDeviceDensity() {
    // qemu.sf.lcd_density can be used to override ro.sf.lcd_density
    // when running in the emulator, allowing for dynamic configurations.
    // The reason for this is that ro.sf.lcd_density is write-once and is
    // set by the init process when it parses build.prop before anything else.
    return SystemProperties.getInt("qemu.sf.lcd_density",
            SystemProperties.getInt("ro.sf.lcd_density", DENSITY_DEFAULT));
}
 
开发者ID:Gracker,项目名称:Android-Framework-Tools-Utils,代码行数:9,代码来源:DisplayMetrics.java

示例4: dispatchKeyEvent

import android.os.SystemProperties; //导入方法依赖的package包/类
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
	if (event.getAction() == KeyEvent.ACTION_DOWN) {
		switch (event.getKeyCode()) {
		case KeyEvent.KEYCODE_HOME:
			if (mThumbnailWorkspace.isVisible()) {
	            mThumbnailWorkspace.setmCurSelectedScreenIndex(mWorkspace.getDefaultScreen());
				closeThumbnailWorkspace(true);
				return true;
			}
			closeFolder();
			return true;
		case KeyEvent.KEYCODE_VOLUME_DOWN:
			if (SystemProperties.getInt("debug.launcher2.dumpstate", 0) != 0) {
				dumpState();
				return true;
			}
			break;
		default:
			break;
		}
	} else if (event.getAction() == KeyEvent.ACTION_UP) {
		switch (event.getKeyCode()) {
		case KeyEvent.KEYCODE_HOME:
			return true;
		default:
			break;
		}
	}

	return super.dispatchKeyEvent(event);
}
 
开发者ID:yftx,项目名称:fruit.launcher,代码行数:33,代码来源:Launcher.java

示例5: isGestureOpen

import android.os.SystemProperties; //导入方法依赖的package包/类
private boolean isGestureOpen() {
    mGestureEnabled = SystemProperties.getInt(GESTURE_SWITCH_FLAG , 0) == 1 ? true : false;
    mFMRadioEnabled = SystemProperties.getInt(GESTURE_FMRADIO_FLAG , 0) == 1 ? true : false;

    return mGestureEnabled && mFMRadioEnabled;
}
 
开发者ID:hyperion70,项目名称:android_device_MTS_x2605,代码行数:7,代码来源:FmRadioActivity.java


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