Bug 1223209 - Remove geckoview_example; r=nalexander r=mfinkle
authorJim Chen <nchen@mozilla.com>
Thu, 14 Jan 2016 18:20:02 -0500
changeset 302328 3f8b80d42f00d37a6fe6a36039b1db8be75339c6
parent 302327 8cdc38ea4f6da3f5585c1525e29299a86ad89866
child 302329 0c8cd67f497e7f08e01dff8ec32588fa0e255d75
push id8978
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 14:05:32 +0000
treeherdermozilla-aurora@b9a803752a2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander, mfinkle
bugs1223209
milestone46.0a1
Bug 1223209 - Remove geckoview_example; r=nalexander r=mfinkle geckoview_example is broken and obsolete, and we haven't maintained it for a long time. We should remove it from the tree, allow GeckoView AARs to build, and rely on other example GeckoView projects that live on GitHub.
embedding/android/geckoview_example/AndroidManifest.xml.in
embedding/android/geckoview_example/GeckoViewExample.java
embedding/android/geckoview_example/Makefile.in
embedding/android/geckoview_example/main.xml
embedding/android/geckoview_example/moz.build
embedding/moz.build
mobile/android/confvars.sh
toolkit/mozapps/installer/upload-files.mk
deleted file mode 100644
--- a/embedding/android/geckoview_example/AndroidManifest.xml.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="org.mozilla.geckoviewexample"
-          android:versionCode="1"
-          android:versionName="1.0">
-  <uses-sdk android:minSdkVersion="8"
-            android:targetSdkVersion="@ANDROID_TARGET_SDK@"/>
-  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-  <uses-permission android:name="android.permission.INTERNET"/>
-  <uses-feature android:glEsVersion="0x00020000" android:required="true" />
-  <application android:label="@string/app_name"
-               android:icon="@drawable/ic_launcher"
-               android:hardwareAccelerated="true">
-    <activity android:name="GeckoViewExample"
-              android:label="@string/app_name">
-      <intent-filter>
-        <action android:name="android.intent.action.MAIN" />
-        <category android:name="android.intent.category.LAUNCHER" />
-      </intent-filter>
-    </activity>
-  </application>
-</manifest>
deleted file mode 100644
--- a/embedding/android/geckoview_example/GeckoViewExample.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.mozilla.geckoviewexample;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.util.AttributeSet;
-
-public class GeckoViewExample extends Activity {
-    /** Called when the activity is first created. */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.main);
-    }
-}
deleted file mode 100644
--- a/embedding/android/geckoview_example/Makefile.in
+++ /dev/null
@@ -1,65 +0,0 @@
-PP_TARGETS = properties manifest
-
-manifest = AndroidManifest.xml.in
-
-include $(topsrcdir)/config/rules.mk
-
-GARBAGE = \
-	AndroidManifest.xml \
-	proguard-project.txt \
-	project.properties \
-	ant.properties \
-	build.xml \
-	local.properties \
-	geckoview_example.apk \
-	$(NULL)
-
-GARBAGE_DIRS = \
-	assets \
-	geckoview_library \
-	gen \
-	bin \
-	libs \
-	res \
-	src \
-	binaries \
-	$(NULL)
-
-ANDROID=$(ANDROID_TOOLS)/android
-
-TARGET="android-$(ANDROID_TARGET_SDK)"
-
-PACKAGE_DEPS = \
-	assets/libxul.so \
-	build.xml \
-	src/org/mozilla/geckoviewexample/GeckoViewExample.java \
-	$(CURDIR)/res/layout/main.xml \
-	$(CURDIR)/AndroidManifest.xml \
-	$(NULL)
-
-$(CURDIR)/res/layout/main.xml: $(srcdir)/main.xml
-	$(NSINSTALL) $(srcdir)/main.xml res/layout/
-
-src/org/mozilla/geckoviewexample/GeckoViewExample.java: $(srcdir)/GeckoViewExample.java
-	$(NSINSTALL) $(srcdir)/GeckoViewExample.java src/org/mozilla/geckoviewexample/
-
-assets/libxul.so: $(DIST)/geckoview_library/geckoview_assets.zip FORCE
-	$(UNZIP) -o $(DIST)/geckoview_library/geckoview_assets.zip
-
-build.xml: $(CURDIR)/AndroidManifest.xml
-	mv AndroidManifest.xml AndroidManifest.xml.save
-	$(ANDROID) create project --name GeckoViewExample --target $(TARGET) --path $(CURDIR) --activity GeckoViewExample --package org.mozilla.geckoviewexample
-	$(ANDROID) update project --target $(TARGET) --path $(CURDIR) --library $(DEPTH)/mobile/android/geckoview_library
-	$(RM) $(CURDIR)/res/layout/main.xml
-	$(NSINSTALL) $(srcdir)/main.xml res/layout/
-	$(RM) AndroidManifest.xml
-	mv AndroidManifest.xml.save AndroidManifest.xml
-	echo jar.libs.dir=libs >> project.properties
-
-bin/GeckoViewExample-debug.apk: $(PACKAGE_DEPS)
-	ant debug
-
-geckoview_example.apk: bin/GeckoViewExample-debug.apk
-	cp $< $@
-
-package: geckoview_example.apk FORCE
deleted file mode 100644
--- a/embedding/android/geckoview_example/main.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              xmlns:gecko="http://schemas.android.com/apk/res-auto"
-              android:orientation="vertical"
-              android:layout_width="fill_parent"
-              android:layout_height="fill_parent"
-              >
-  <org.mozilla.gecko.GeckoView android:id="@+id/gecko_view"
-                               android:layout_width="fill_parent"
-                               android:layout_height="fill_parent"
-                               gecko:url="about:mozilla"/>
-</LinearLayout>
deleted file mode 100644
--- a/embedding/moz.build
+++ b/embedding/moz.build
@@ -1,19 +1,16 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['components', 'browser']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
-    DIRS += ['android/geckoview_example']
-
 TEST_DIRS += ['test']
 
 if CONFIG['ENABLE_TESTS']:
     XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 XPIDL_SOURCES += [
     'nsIWindowCreator.idl',
     'nsIWindowCreator2.idl',
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -108,11 +108,8 @@ fi
 
 # Enable checking that add-ons are signed by the trusted root
 MOZ_ADDON_SIGNING=1
 
 # Enable the Switchboard A/B framework code.
 # Note: The framework is always included in the app. This flag controls
 # usage of the framework.
 MOZ_SWITCHBOARD=1
-
-# Disable GeckoView by default.
-export MOZ_DISABLE_GECKOVIEW=1
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -323,17 +323,16 @@ GECKO_APP_AP_PATH = $(topobjdir)/mobile/
 
 ifdef ENABLE_TESTS
 INNER_ROBOCOP_PACKAGE=echo
 ifeq ($(MOZ_BUILD_APP),mobile/android)
 UPLOAD_EXTRA_FILES += robocop.apk
 UPLOAD_EXTRA_FILES += fennec_ids.txt
 UPLOAD_EXTRA_FILES += geckoview_library/geckoview_library.zip
 UPLOAD_EXTRA_FILES += geckoview_library/geckoview_assets.zip
-UPLOAD_EXTRA_FILES += ../embedding/android/geckoview_example/geckoview_example.apk
 
 # Robocop/Robotium tests, Android Background tests, and Fennec need to
 # be signed with the same key, which means release signing them all.
 
 ROBOCOP_PATH = $(topobjdir)/mobile/android/tests/browser/robocop
 # Normally, $(NSINSTALL) would be used instead of cp, but INNER_ROBOCOP_PACKAGE
 # is used in a series of commands that run under a "cd something", while
 # $(NSINSTALL) is relative.
@@ -345,25 +344,21 @@ else
 INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Android Robocop for you'
 endif
 
 # Create geckoview_library/geckoview_{assets,library}.zip for third-party GeckoView consumers.
 ifdef NIGHTLY_BUILD
 ifndef MOZ_DISABLE_GECKOVIEW
 INNER_MAKE_GECKOVIEW_LIBRARY= \
   $(MAKE) -C ../mobile/android/geckoview_library package
-INNER_MAKE_GECKOVIEW_EXAMPLE= \
-	$(MAKE) -C ../embedding/android/geckoview_example package
 else
 INNER_MAKE_GECKOVIEW_LIBRARY=echo 'GeckoView library packaging is disabled'
-INNER_MAKE_GECKOVIEW_EXAMPLE=echo 'GeckoView example packaging is disabled'
 endif
 else
 INNER_MAKE_GECKOVIEW_LIBRARY=echo 'GeckoView library packaging is only enabled on Nightly'
-INNER_MAKE_GECKOVIEW_EXAMPLE=echo 'GeckoView example packaging is only enabled on Nightly'
 endif
 
 # Create Android ARchives and metadata for download by local
 # developers using Gradle.
 ifdef MOZ_ANDROID_GECKOLIBS_AAR
 ifndef MOZ_DISABLE_GECKOVIEW
 geckoaar-revision := $(BUILDID)
 
@@ -485,18 +480,17 @@ INNER_MAKE_PACKAGE	= \
   make -C $(GECKO_APP_AP_PATH) gecko-nodeps.ap_ && \
   cp $(GECKO_APP_AP_PATH)/gecko-nodeps.ap_ $(ABS_DIST)/gecko.ap_ && \
   ( (test ! -f $(GECKO_APP_AP_PATH)/R.txt && echo "*** Warning: The R.txt that is being packaged might not agree with the R.txt that was built. This is normal during l10n repacks.") || \
     diff $(GECKO_APP_AP_PATH)/R.txt $(GECKO_APP_AP_PATH)/gecko-nodeps/R.txt >/dev/null || \
     (echo "*** Error: The R.txt that was built and the R.txt that is being packaged are not the same. Rebuild mobile/android/base and re-package." && exit 1)) && \
   $(INNER_MAKE_APK) && \
   $(INNER_ROBOCOP_PACKAGE) && \
   $(INNER_MAKE_GECKOLIBS_AAR) && \
-  $(INNER_MAKE_GECKOVIEW_LIBRARY) && \
-  $(INNER_MAKE_GECKOVIEW_EXAMPLE)
+  $(INNER_MAKE_GECKOVIEW_LIBRARY)
 endif
 
 ifeq ($(MOZ_BUILD_APP),mobile/android/b2gdroid)
 INNER_MAKE_PACKAGE	= \
   $(INNER_SZIP_LIBRARIES) && \
   cp $(topobjdir)/mobile/android/b2gdroid/app/classes.dex $(ABS_DIST)/classes.dex && \
   cp $(topobjdir)/mobile/android/b2gdroid/app/b2gdroid-unsigned-unaligned.apk $(ABS_DIST)/gecko.ap_ && \
   $(INNER_MAKE_APK)