public static IQualityLevel getExtension(Context context) { IQualityLevel qaulityLevel = (IQualityLevel) MPlugin.createInstance(IQualityLevel.class.getName(), context); if (qaulityLevel == null) { qaulityLevel = new DefaultQualityLevel(context); } return qaulityLevel; }
/** * M: create settings plugin object. * * @param context Context * @return ISimSelectDialogPreferenceExt */ private static ISubSelectDialogPreferenceExt getPlugin(Context context) { ISubSelectDialogPreferenceExt ext; ext = (ISubSelectDialogPreferenceExt) MPlugin.createInstance(ISubSelectDialogPreferenceExt.class.getName(), context); if (ext == null) { ext = new DefaultSubSelectDialogPreferenceExt(context); } return ext; }
/** * Get a IVolumePlugin object with Context. * * @param context A Context object. * @return IVolumePlugin object. */ public static synchronized IVolumePlugin getVolumePlugin(Context context) { if (sVolumePlugin == null) { sVolumePlugin = (IVolumePlugin) MPlugin.createInstance(IVolumePlugin.class.getName(), context); if (sVolumePlugin == null) { sVolumePlugin = new DefaultVolumePlugin(context); } Xlog.d("PluginFactory", "getVolumePlugin: " + sVolumePlugin); } return sVolumePlugin; }
public static synchronized IStatusBarPlmnPlugin getStatusBarPlmnPlugin(Context context) { if (mStatusBarPlmnPlugin == null) { mStatusBarPlmnPlugin = (IStatusBarPlmnPlugin) MPlugin.createInstance(IStatusBarPlmnPlugin.class.getName(), context); if (mStatusBarPlmnPlugin == null) { mStatusBarPlmnPlugin = new DefaultStatusBarPlmnPlugin(context); } Xlog.d("PluginFactory", "getStatusBarPlmnPlugin: " + mStatusBarPlmnPlugin); } return mStatusBarPlmnPlugin; }
public static synchronized IStatusBarPlugin getStatusBarPlugin(Context context) { if (mStatusBarPlugin == null) { mStatusBarPlugin = (IStatusBarPlugin) MPlugin.createInstance(IStatusBarPlugin.class.getName(), context); isDefaultStatusBarPlugin = false; if (mStatusBarPlugin == null) { mStatusBarPlugin = new DefaultStatusBarPlugin(context); isDefaultStatusBarPlugin = true; } } return mStatusBarPlugin; }
public static synchronized IQuickSettingsPlugin getQuickSettingsPlugin(Context context) { if (mQuickSettingsPlugin == null) { mQuickSettingsPlugin = (IQuickSettingsPlugin) MPlugin.createInstance(IQuickSettingsPlugin.class.getName(), context); Xlog.d(TAG, "getQuickSettingsPlugin mQuickSettingsPlugin= " + mQuickSettingsPlugin); if (mQuickSettingsPlugin == null) { mQuickSettingsPlugin = new DefaultQuickSettingsPlugin(context); Xlog.d( TAG, "getQuickSettingsPlugin get DefaultQuickSettingsPlugin = " + mQuickSettingsPlugin); } } return mQuickSettingsPlugin; }