本文整理汇总了Java中com.google.android.things.userdriver.UserDriverManager.getManager方法的典型用法代码示例。如果您正苦于以下问题:Java UserDriverManager.getManager方法的具体用法?Java UserDriverManager.getManager怎么用?Java UserDriverManager.getManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.things.userdriver.UserDriverManager
的用法示例。
在下文中一共展示了UserDriverManager.getManager方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Register this driver with the Android input framework.
*/
public void register() {
if (inputDriver == null) {
UserDriverManager manager = UserDriverManager.getManager();
inputDriver = new InputDriver.Builder(InputDevice.SOURCE_CLASS_BUTTON)
.setName(DRIVER_NAME)
.setVersion(DRIVER_VERSION)
.setKeys(keycodes)
.build();
manager.registerInputDriver(inputDriver);
}
}
示例2: unregister
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Unregister this driver with the Android input framework.
*/
public void unregister() {
if (inputDriver != null) {
UserDriverManager manager = UserDriverManager.getManager();
manager.unregisterInputDriver(inputDriver);
inputDriver = null;
}
}
示例3: register
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Register this driver with the Android input framework.
*/
public void register() {
if (mInputDriver == null) {
UserDriverManager manager = UserDriverManager.getManager();
mInputDriver = buildInputDriver();
manager.registerInputDriver(mInputDriver);
}
}
示例4: unregister
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Unregister this driver with the Android input framework.
*/
public void unregister() {
if (mInputDriver != null) {
UserDriverManager manager = UserDriverManager.getManager();
manager.unregisterInputDriver(mInputDriver);
mInputDriver = null;
}
}
示例5: register
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Register this driver with the Android location framework.
*/
public void register() {
if (mDriver == null) {
UserDriverManager manager = UserDriverManager.getManager();
mDriver = new GpsDriver();
manager.registerGpsDriver(mDriver);
}
}
示例6: unregister
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Unregister this driver with the Android location framework.
*/
public void unregister() {
if (mDriver != null) {
UserDriverManager manager = UserDriverManager.getManager();
manager.unregisterGpsDriver();
mDriver = null;
}
}
示例7: register
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Register this driver with the Android lowpan framework.
*/
@SuppressWarnings("unused")
public void register() {
final UserDriverManager manager = UserDriverManager.getManager();
manager.registerLowpanDriver(this);
}
示例8: unregister
import com.google.android.things.userdriver.UserDriverManager; //导入方法依赖的package包/类
/**
* Unregister this driver with the Android lowpan framework.
*/
public void unregister() {
final UserDriverManager manager = UserDriverManager.getManager();
manager.unregisterLowpanDriver(this);
}