Here you can find the source of setBaiduServiceEnabled(Context paramContext, boolean paramBoolean)
public static void setBaiduServiceEnabled(Context paramContext, boolean paramBoolean)
//package com.java2s; import android.content.ComponentName; import android.content.Context; public class Main { public static void setBaiduServiceEnabled(Context paramContext, boolean paramBoolean) { if (paramBoolean) ;/*from w ww.j a v a 2 s . c o m*/ for (int i = 1;; i = 2) { paramContext.getPackageManager().setComponentEnabledSetting( new ComponentName(paramContext.getPackageName(), "com.baidu.location.f"), i, 1); return; } } }