mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 929865 - Use <activity-alias> to wrap activities in generated namespace. r=nalexander
--HG-- rename : mobile/android/base/WebAppImpl.java => mobile/android/base/WebApp.java
This commit is contained in:
parent
775e9ffb3d
commit
62c9bfba55
@ -82,12 +82,26 @@
|
||||
android:debuggable="true">
|
||||
#endif
|
||||
|
||||
<activity android:name=".App"
|
||||
<activity android:name="org.mozilla.gecko.BrowserApp"
|
||||
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" />
|
||||
@ -153,9 +167,10 @@
|
||||
<action android:name="org.mozilla.gecko.DEBUG" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</activity-alias>
|
||||
|
||||
<activity android:name=".WebApp"
|
||||
<!-- Activity used for launching non-privileged WebApps via a URL -->
|
||||
<activity android:name="org.mozilla.gecko.WebApp"
|
||||
android:label="@string/webapp_generic_name"
|
||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
||||
android:windowSoftInputMode="stateUnspecified|adjustResize"
|
||||
@ -164,13 +179,20 @@
|
||||
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>
|
||||
</activity-alias>
|
||||
|
||||
<!-- Declare a predefined number of WebApp<num> activities. These are
|
||||
used so that each web app can launch in its own process. Keep
|
||||
@ -183,7 +205,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=".App"
|
||||
android:targetActivity="org.mozilla.gecko.BrowserApp"
|
||||
android:exported="true" />
|
||||
|
||||
<receiver android:name="org.mozilla.gecko.GeckoUpdateReceiver">
|
||||
|
@ -1,15 +0,0 @@
|
||||
/* -*- 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 {}
|
||||
|
@ -76,15 +76,15 @@ import java.net.URLEncoder;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Vector;
|
||||
|
||||
abstract public class BrowserApp extends GeckoApp
|
||||
implements TabsPanel.TabsLayoutChangeListener,
|
||||
PropertyAnimator.PropertyAnimationListener,
|
||||
View.OnKeyListener,
|
||||
GeckoLayerClient.OnMetricsChangedListener,
|
||||
BrowserSearch.OnSearchListener,
|
||||
BrowserSearch.OnEditSuggestionListener,
|
||||
HomePager.OnNewTabsListener,
|
||||
OnUrlOpenListener {
|
||||
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";
|
||||
|
@ -26,8 +26,8 @@ import android.view.Display;
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
|
||||
public class WebAppImpl extends GeckoApp {
|
||||
private static final String LOGTAG = "GeckoWebAppImpl";
|
||||
public class WebApp extends GeckoApp {
|
||||
private static final String LOGTAG = "GeckoWebApp";
|
||||
|
||||
private URL mOrigin;
|
||||
private TextView mTitlebarText = null;
|
@ -1,15 +0,0 @@
|
||||
/* -*- 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 {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<activity android:name=".WebApps$WebApp@APPNUM@"
|
||||
<activity android:name="org.mozilla.gecko.WebApps$WebApp@APPNUM@"
|
||||
android:label="@string/webapp_generic_name"
|
||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
||||
android:windowSoftInputMode="stateUnspecified|adjustResize"
|
||||
@ -7,11 +7,17 @@
|
||||
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>
|
||||
|
||||
</activity-alias>
|
||||
|
@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
package org.mozilla.gecko;
|
||||
|
||||
/**
|
||||
* Declare a predefined number of WebApp<num> classes to the WebApps class.
|
||||
|
@ -202,7 +202,7 @@ gbjar.sources += [
|
||||
'TouchEventInterceptor.java',
|
||||
'VideoPlayer.java',
|
||||
'WebAppAllocator.java',
|
||||
'WebAppImpl.java',
|
||||
'WebApp.java',
|
||||
'ZoomConstraints.java',
|
||||
'db/BrowserContract.java',
|
||||
'db/BrowserProvider.java',
|
||||
@ -317,11 +317,9 @@ 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',
|
||||
|
Loading…
Reference in New Issue
Block a user