Ejemplo n.º 1
0
 public static IQualityLevel getExtension(Context context) {
   IQualityLevel qaulityLevel =
       (IQualityLevel) MPlugin.createInstance(IQualityLevel.class.getName(), context);
   if (qaulityLevel == null) {
     qaulityLevel = new DefaultQualityLevel(context);
   }
   return qaulityLevel;
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 /**
  * 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;
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
  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;
  }