Android 删除浏览器导航页面修改默认主页

Android 删除浏览器导航页面修改默认主页

近来收到客户需求反馈,需要删除浏览器导航页面并将百度设置为默认主页,具体修改参照如下:

删除浏览器导航页面:

/vendor/mediatek/proprietary/packages/apps/Browser/src/com/android/browser/BrowserFeatureOption.java

-    public static final boolean BROWSER_SITE_NAVIGATION_SUPPORT = true;
+    public static final boolean BROWSER_SITE_NAVIGATION_SUPPORT = false;

修改默认主页:

/vendor/mediatek/proprietary/packages/apps/Browser/res/values/strings.xml

    
    
-        http://www.google.com/webhp?client={CID}&source=android-home
+        https://www.baidu.com/

/vendor/mediatek/proprietary/packages/apps/Browser/res/values/mtk_strings.xml

    
-        content://com.android.browser.site_navigation/websites
+        https://www.baidu.com/

/vendor/mediatek/proprietary/packages/apps/Browser/src/com/android/browser/sitenavigation/SiteNavigation.java

    public static final Uri SITE_NAVIGATION_URI
-                           = Uri.parse("content://com.android.browser.site_navigation/websites");
+                           = Uri.parse("https://www.baidu.com/");

重新编译验证,修改生效,浏览器导航页面已删除且默认主页修改为百度

你可能感兴趣的:(Android,android)