Backed out changeset 8ebfd8ca2b65 for robocop failures. CLOSED TREE

--HG--
rename : mobile/android/base/WebApp.java => mobile/android/base/WebAppImpl.java
This commit is contained in:
Brian Nicholson 2013-10-29 12:33:47 -07:00
parent 62c9bfba55
commit 41e6423d87
8 changed files with 53 additions and 49 deletions

View File

@ -82,26 +82,12 @@
android:debuggable="true">
#endif
<activity android:name="org.mozilla.gecko.BrowserApp"
<activity android:name=".App"
android:label="@MOZ_APP_DISPLAYNAME@"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
android:windowSoftInputMode="stateUnspecified|adjustResize"
android:launchMode="singleTask"
android:theme="@style/Gecko.App">
</activity>
<!-- Fennec is shipped as the Android package named
org.mozilla.{fennec,firefox,firefox_beta}. The internal Java
package hierarchy inside the Android package has both an
org.mozilla.{fennec,firefox,firefox_beta} subtree *and* an
org.mozilla.gecko subtree. The non-org.mozilla.gecko is
deprecated and we would like to get rid of it entirely. Until
that happens, we have external consumers (such as intents and
bookmarks) of non-org.mozilla.gecko Activity classes, so we define
activity aliases for backwards compatibility. -->
<activity-alias android:name=".App"
android:label="@MOZ_APP_DISPLAYNAME@"
android:targetActivity="org.mozilla.gecko.BrowserApp">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@ -167,10 +153,9 @@
<action android:name="org.mozilla.gecko.DEBUG" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity-alias>
</activity>
<!-- Activity used for launching non-privileged WebApps via a URL -->
<activity android:name="org.mozilla.gecko.WebApp"
<activity android:name=".WebApp"
android:label="@string/webapp_generic_name"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
android:windowSoftInputMode="stateUnspecified|adjustResize"
@ -179,20 +164,13 @@
android:process=":@ANDROID_PACKAGE_NAME@.WebApp"
android:excludeFromRecents="true"
android:theme="@style/Gecko.App">
</activity>
<!-- Alias WebApp so we can launch it from the package namespace. See
.App alias comment for more details. -->
<activity-alias android:name=".WebApp"
android:label="@string/webapp_generic_name"
android:targetActivity="org.mozilla.gecko.WebApp">
<intent-filter>
<action android:name="org.mozilla.gecko.WEBAPP" />
</intent-filter>
<intent-filter>
<action android:name="org.mozilla.gecko.ACTION_ALERT_CALLBACK" />
</intent-filter>
</activity-alias>
</activity>
<!-- Declare a predefined number of WebApp<num> activities. These are
used so that each web app can launch in its own process. Keep
@ -205,7 +183,7 @@
<!-- Masquerade as the Resolver so that we can be opened from the Marketplace. -->
<activity-alias
android:name="com.android.internal.app.ResolverActivity"
android:targetActivity="org.mozilla.gecko.BrowserApp"
android:targetActivity=".App"
android:exported="true" />
<receiver android:name="org.mozilla.gecko.GeckoUpdateReceiver">

View File

@ -0,0 +1,15 @@
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* 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/. */
#filter substitution
package @ANDROID_PACKAGE_NAME@;
import org.mozilla.gecko.BrowserApp;
/**
* This class serves only as a namespace wrapper for BrowserApp.
*/
public class App extends BrowserApp {}

View File

@ -76,15 +76,15 @@ import java.net.URLEncoder;
import java.util.EnumSet;
import java.util.Vector;
public class BrowserApp extends GeckoApp
implements TabsPanel.TabsLayoutChangeListener,
PropertyAnimator.PropertyAnimationListener,
View.OnKeyListener,
GeckoLayerClient.OnMetricsChangedListener,
BrowserSearch.OnSearchListener,
BrowserSearch.OnEditSuggestionListener,
HomePager.OnNewTabsListener,
OnUrlOpenListener {
abstract public class BrowserApp extends GeckoApp
implements TabsPanel.TabsLayoutChangeListener,
PropertyAnimator.PropertyAnimationListener,
View.OnKeyListener,
GeckoLayerClient.OnMetricsChangedListener,
BrowserSearch.OnSearchListener,
BrowserSearch.OnEditSuggestionListener,
HomePager.OnNewTabsListener,
OnUrlOpenListener {
private static final String LOGTAG = "GeckoBrowserApp";
private static final String PREF_CHROME_DYNAMICTOOLBAR = "browser.chrome.dynamictoolbar";

View File

@ -0,0 +1,15 @@
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* 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/. */
#filter substitution
package @ANDROID_PACKAGE_NAME@;
import org.mozilla.gecko.WebAppImpl;
/**
* This class serves only as a namespace wrapper for WebAppImpl.
*/
public class WebApp extends WebAppImpl {}

View File

@ -26,8 +26,8 @@ import android.view.Display;
import java.net.URL;
import java.io.File;
public class WebApp extends GeckoApp {
private static final String LOGTAG = "GeckoWebApp";
public class WebAppImpl extends GeckoApp {
private static final String LOGTAG = "GeckoWebAppImpl";
private URL mOrigin;
private TextView mTitlebarText = null;

View File

@ -1,4 +1,4 @@
<activity android:name="org.mozilla.gecko.WebApps$WebApp@APPNUM@"
<activity android:name=".WebApps$WebApp@APPNUM@"
android:label="@string/webapp_generic_name"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
android:windowSoftInputMode="stateUnspecified|adjustResize"
@ -7,17 +7,11 @@
android:process=":@ANDROID_PACKAGE_NAME@.WebApp@APPNUM@"
android:excludeFromRecents="true"
android:theme="@style/Gecko.App">
</activity>
<!-- Alias WebApp so we can launch it from the package namespace. See
.App alias comment in AndroidManifest.xml.in for more details. -->
<activity-alias android:name=".WebApps$WebApp@APPNUM@"
android:label="@string/webapp_generic_name"
android:targetActivity="org.mozilla.gecko.WebApps$WebApp@APPNUM@">
<intent-filter>
<action android:name="org.mozilla.gecko.WEBAPP@APPNUM@" />
</intent-filter>
<intent-filter>
<action android:name="org.mozilla.gecko.ACTION_ALERT_CALLBACK" />
</intent-filter>
</activity-alias>
</activity>

View File

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#filter substitution
package org.mozilla.gecko;
package @ANDROID_PACKAGE_NAME@;
/**
* Declare a predefined number of WebApp<num> classes to the WebApps class.

View File

@ -202,7 +202,7 @@ gbjar.sources += [
'TouchEventInterceptor.java',
'VideoPlayer.java',
'WebAppAllocator.java',
'WebApp.java',
'WebAppImpl.java',
'ZoomConstraints.java',
'db/BrowserContract.java',
'db/BrowserProvider.java',
@ -317,9 +317,11 @@ gbjar.sources += [ thirdparty_source_dir + f for f in [
'com/googlecode/eyesfree/braille/selfbraille/WriteData.java',
] ]
gbjar.generated_sources += [
'App.java',
'AppConstants.java',
'R.java',
'SysInfo.java',
'WebApp.java',
'WebApps.java',
'widget/GeckoEditText.java',
'widget/GeckoImageButton.java',