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


Java ExtensionManager类代码示例

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


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

示例1: onAvailableExtensionsChanged

import com.google.android.apps.dashclock.ExtensionManager; //导入依赖的package包/类
@Override
public void onAvailableExtensionsChanged() {
    Log.d(TAG, "Available extensions has changed. Updating");
    super.onAvailableExtensionsChanged();

    List<ComponentName> active = ExtensionManager.getInstance(mService).getInternalActiveExtensionNames();
    Set<ComponentName> worldReadableExtensions = new HashSet<>();
    for (ExtensionListing info : getAvailableExtensions(!areNonWorldReadableExtensionsVisible())) {
        if (active.contains(info.componentName())) {
            worldReadableExtensions.add(info.componentName());
            mService.update(info.componentName(), getExtensionData(info.componentName()));
        }
    }
    listenTo(worldReadableExtensions);
}
 
开发者ID:mridang,项目名称:dashbar,代码行数:16,代码来源:NotificationService.java

示例2: onCreate

import com.google.android.apps.dashclock.ExtensionManager; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Set up helper components
    mExtensionManager = ExtensionManager.getInstance(getActivity());
    mExtensionManager.addOnChangeListener(this);

    if (savedInstanceState == null) {
        // TODO: should load in the correct order
        mSelectedExtensions = mExtensionManager.getInternalActiveExtensionNames();
    } else {
        List<String> selected = savedInstanceState
                .getStringArrayList(SAVE_KEY_SELECTED_EXTENSIONS);
        for (String s : selected) {
            mSelectedExtensions.add(ComponentName.unflattenFromString(s));
        }
    }

    mSelectedExtensionsAdapter = new ExtensionListAdapter();

    repopulateAvailableExtensions();

    IntentFilter packageChangeIntentFilter = new IntentFilter();
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_REPLACED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
    packageChangeIntentFilter.addDataScheme("package");
    getActivity().registerReceiver(mPackageChangedReceiver, packageChangeIntentFilter);
}
 
开发者ID:mridang,项目名称:dashbar,代码行数:32,代码来源:ConfigureExtensionsFragment.java

示例3: onCreate

import com.google.android.apps.dashclock.ExtensionManager; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Set up helper components
    mExtensionManager = ExtensionManager.getInstance(getActivity());
    mExtensionManager.addOnChangeListener(this);

    if (savedInstanceState == null) {
        mSelectedExtensions = mExtensionManager.getActiveExtensionNames();
    } else {
        List<String> selected = savedInstanceState
                .getStringArrayList(SAVE_KEY_SELECTED_EXTENSIONS);
        for (String s : selected) {
            mSelectedExtensions.add(ComponentName.unflattenFromString(s));
        }
    }

    mSelectedExtensionsAdapter = new ExtensionListAdapter();

    repopulateAvailableExtensions();

    IntentFilter packageChangeIntentFilter = new IntentFilter();
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_REPLACED);
    packageChangeIntentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
    packageChangeIntentFilter.addDataScheme("package");
    getActivity().registerReceiver(mPackageChangedReceiver, packageChangeIntentFilter);
}
 
开发者ID:JesusM,项目名称:DashClock,代码行数:31,代码来源:ConfigureExtensionsFragment.java

示例4: DashClockRenderer

import com.google.android.apps.dashclock.ExtensionManager; //导入依赖的package包/类
protected DashClockRenderer(Context context) {
    mContext = context;
    mExtensionManager = ExtensionManager.getInstance(context);
}
 
开发者ID:mridang,项目名称:dashbar,代码行数:5,代码来源:DashClockRenderer.java


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