Commit Graph
2909 Commits
Author SHA1 Message Date
Nevin Chen a110ffbac7 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 6 things. They are related so I put them in the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.
6. Fix proguard. Only keep necceary files.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Nevin Chen 53f0e20635 Bug 1361664 - Part1. Udate MMA API, make init() accept activity. r=maliu
MozReview-Commit-ID: AcfoeCPV8SV
2017-05-24 11:23:10 +08:00
Nevin Chen 76c4e24a82 Bug 1358117 - Add pref to turn on/off leanplum. r=maliu,sebastian
MozReview-Commit-ID: 8LHvMPSxAdl
2017-05-18 19:27:13 +08:00
Sebastian Hengst bebf609e0a Backed out changeset 08b93bba921c (bug 1358117) for Android Nightly bustage. r=backout a=backout
MozReview-Commit-ID: IgiZGwOZ3tD
2017-05-27 14:01:55 +02:00
Sebastian Hengst c8d117c720 Backed out changeset 44e144a782e1 (bug 1361664) for Android Nightly bustage. r=backout a=backout
MozReview-Commit-ID: L3hDVLxBkoJ
2017-05-27 14:01:07 +02:00
Sebastian Hengst 3b4b03d8fb Backed out changeset d289ee2c794d (bug 1361664)
MozReview-Commit-ID: gNRtEiyg7W
2017-05-27 14:00:27 +02:00
Nevin Chen 912e74135b Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Nevin Chen d31f1f3859 Bug 1361664 - Part1. Udate MMA API, make init() accept activity. r=maliu
MozReview-Commit-ID: AcfoeCPV8SV
2017-05-24 11:23:10 +08:00
Nevin Chen 3302a7b62d Bug 1358117 - Add pref to turn on/off leanplum. r=maliu,sebastian
MozReview-Commit-ID: 8LHvMPSxAdl
2017-05-18 19:27:13 +08:00
Sebastian Hengst 960a7e8c0d Backed out changeset c77265a29cc7 (bug 1358117) for mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java:25: error: cannot find symbol, e.g. in findbugs job. r=backout on a CLOSED TREE 2017-05-26 20:24:18 +02:00
Nevin Chen a8811d1c7d Bug 1358117 - Add pref to turn on/off leanplum. r=maliu,sebastian
MozReview-Commit-ID: 8LHvMPSxAdl
2017-05-18 19:27:13 +08:00
Sebastian Hengst 814113493e Backed out changeset fba7b035a4f9 (bug 1358117) for bustage at mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java:25: symbol not found. r=backout 2017-05-26 13:42:06 +02:00
Sebastian Hengst 67c309cb40 Backed out changeset f54fb8956671 (bug 1361664) so bug 1358117 can be backed out. r=backout 2017-05-26 13:41:23 +02:00
Sebastian Hengst 4f36d5e85b Backed out changeset 59dc8710d768 (bug 1361664) 2017-05-26 13:40:51 +02:00
Nevin Chen 592593a928 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Nevin Chen eedac835bc Bug 1361664 - Part1. Udate MMA API, make init() accept activity. r=maliu
MozReview-Commit-ID: AcfoeCPV8SV
2017-05-24 11:23:10 +08:00
Nevin Chen 49487418b1 Bug 1358117 - Add pref to turn on/off leanplum. r=maliu
MozReview-Commit-ID: 8LHvMPSxAdl
2017-05-18 19:27:13 +08:00
Jim Chen b1b2d91118 Bug 1366716 - Encode crash submission URI correctly; r=snorp
Correctly encode the crash submission URI so it's valid.

MozReview-Commit-ID: KFqloHXDCSd
2017-05-25 18:35:19 -04:00
Jim Chen 060691b2cd Bug 1365711 - Set GeckoInterface from GeckoApplication; r=snorp
Now that GeckoInterface only contains openUriExternal and
getHandlersFor* methods, we can set GeckoInterface from GeckoApplication
only, and not GeckoApp or GeckoView. This also lets us get rid of
BaseGeckoInterface.

MozReview-Commit-ID: KQloIO6ITlK
2017-05-25 18:33:30 -04:00
Jim Chen aa2ff09dec Bug 1363885 - 1. Remove GeckoAppShell.AppStateListener; r=droeh
Remove GeckoAppShell.AppStateListener and its associated methods in
GeckoInterface (orientation listener and app state listener methods).

MozReview-Commit-ID: 4BCrTysSEHZ
2017-05-25 18:33:30 -04:00
Jan Henning 001c74c9ec Bug 1346413 - Part 3 - Remove GeckoActivityStatus-based background detection. r=jchen
MozReview-Commit-ID: 6EhSACAvgt8
2017-05-23 21:15:13 +02:00
Jan Henning 965b3701a6 Bug 1346413 - Part 2 - Remove GeckoActivityMonitor onNewIntent handling. r=jchen
We no longer use the activity monitor for tab type activity switching (which could happen in response to onNewIntent, so in the original implementation the GAM's current activity had to be up-to-date at that point as well) and only track the current activity via onStop/onStart, so there's no longer any need to manually monitor onNewIntent.

MozReview-Commit-ID: AawXbII29qE
2017-05-23 21:00:07 +02:00
Jan Henning c2bde71539 Bug 1346413 - Part 1 - GeckoActivityMonitor/onStop-based application-background/foreground tracking. r=jchen
We want to do certain things on the Gecko side when our app goes into the background (being prepared for being killed without further ado [1], setting tab visibility status, ...) or comes back into the foreground.

At the moment, this works by having participating activities manually call into GeckoApplication from onPause()/onResume(), from where we then forward this to Gecko as appropriate. There also is some additional logic because we want to avoid triggering a background-/foreground-notification combo each time we switch activities *within* Firefox, e.g. when going from BrowserApp into our settings, or navigating within the settings themselves.

The problem with the current implementation is that we basically need to second guess whether we were opening one of our own activities or not when an onPause() call comes in and that we have to keep remembering the assumptions made there when implementing new activities.

E.g. currently we assume that if an activity is finishing during onPause(), we're not leaving the app and therefore never trigger an application-background notification. Until recently, this was correct because except for quitting the app [2], we only finished activities when going backwards through our settings menu, from which we would only end up back in our main activity. With the advent of custom tabs, this is no longer correct, as we have to finish those as well when going back - and in that case we're returning to the app that originally created the custom tab, so we ought to send an application-background notification in fact.

With this patch, we therefore switch our approach and base our background-/foreground tracking on watching onStop() instead. While unlike onPause(), onStop() has the slight drawback of not being absolutely guaranteed to be called before Android possibly kills us, the big advantage is that because of the normal Android lifecycle event order [3], by the time onStop for the previous activity is called we know for sure whether another activity of our own has been launched or whether we're being sent into the background.
Additionally, using an ActivityLifecycleCallbacks instance makes it easy to monitor *all* onStop/onStart calls in our app without requiring any special support from our activities.


[1] E.g. cleanly shutting down the cache service, flushing pending session store writes...
[2] In which case Gecko would be shutting down on its own anyway, so a missing application-background notification wouldn't matter.
[3] Old activity onPause, new activity onCreate, onStart, onResume, old activity onStop, onDestroy.

MozReview-Commit-ID: 4QEUMz6NLfV
2017-05-23 21:10:55 +02:00
Jan Henning bcb0309ec6 Bug 1346413 - Part 0 - Remove unneeded imports. r=jchen
MozReview-Commit-ID: 4JwHRdI4JGy
2017-05-23 21:15:01 +02:00
Jan Henning a97852e746 Bug 869225 - Move decision whether to restore session or not onto background thread. r=sebastian
This involves accessing the file system to check whether our last session crashed or not (as well as reading some shared preferences), so moving this onto the background thread as well avoids some strict mode warnings.

With the exception of loadStartupTab(), mShouldRestore and mLastSessionCrashed are always accessed from the background thread. loadStartupTab() can potentially run on the main thread, however this is okay, because as far as I can see it is only called after the main and background thread have synchronised with each other during initialize().

mPrivateBrowsingSession in turn is now initially only accessed from the background thread for storing the data from the savedInstanceState and the passing it on to session restore. Afterwards, we pass through the synchronisation in initialize() and then all further accesses - receiving private tab data from Gecko and saving it during onSaveInstanceState - happen only on the main thread. Additionally, all data updates from Gecko will completely overwrite the previous state, so the initial value set during onCreate() will soon become irrelevant, anyway.

MozReview-Commit-ID: L5hMFCXLcIf
2017-05-11 22:19:18 +02:00
Ben Hearsum 49c4a92bff bug 1357808: switch mozilla-central fennec builds to org.mozilla.fennec_aurora id and add new builds for org.mozilla.fennec. r=aki,sylvestre,jlorenzo a=dawn 2017-05-24 15:27:40 -04:00
Julian_Chu 7698b53b27 Bug 1366648 - Fix reload button color problem r=sebastian
configuration: Nexus 5 + Android Hammerhead 5.1.1 LMY48M

In CustomTabsActivity, the menu reload-button use a LevelListDrawable.
On some configurations, icon's state won't be set to Enabled by system, hence
the color of icon is incorrect. We have to enable it manually.

MozReview-Commit-ID: JB9t35OyatY
2017-05-23 11:13:06 +08:00
Wes Kocher 4db4c47d09 Merge m-c to autoland, a=merge
MozReview-Commit-ID: AVwPRGa5re9
2017-05-22 16:38:46 -07:00
Eugen Sawin fbfb5d0b95 Bug 1356893 - Reject opening intents with file data schemes. r=sebastian, r=nalexander 2017-05-22 09:50:40 -04:00
Jan Henning fcc41940fb Bug 1359531 - Part 8 - Handle tabs selected while all GeckoApps were in background. r=sebastian,walkingice
Activity switching is now handled by the currently active GeckoApp instance, which obviously doesn't work if all of them are currently backgrounded.

To fix this, we track for each tab whether its selection was handled by a foregrounded GeckoApp instance. If it wasn't, we catch up with any possibly necessary activity switches during the next resume.

MozReview-Commit-ID: JEjQUuDJw5Q
2017-05-05 21:07:29 +02:00
Jan Henning 9e8e1e752e Bug 1359531 - Part 7 - Don't ignore last selected tab for Intent.ACTION_MAIN. r=sebastian,walkingice
Normally, receiving a new intent means we want to switch tabs/open a new tab, so we need to turn off our "last selected tab in this activity" logic, however this is not true when we receive a simple Intent.ACTION_MAIN, e.g. when we're being brought into the foreground from a launcher icon (as opposed to the activity/task switcher).

MozReview-Commit-ID: ExiM3c8iaEA
2017-05-05 20:31:15 +02:00
Julian_Chu e1657a0c06 Bug 1357781 - Enable function of edit site settings in SiteIdentity r=sebastian
The SiteIdentityPopup has a clickable-text to show a dialog to edit
permission for the browsring-site. Its visibility is decided by message
from EventDispatcher("Permission:CheckResult").

Now register listener by visibility of ActionBar.(or Activity, actually).

MozReview-Commit-ID: CUU1gCKqh02
2017-05-18 16:38:01 +08:00
Julian_Chu 7f3d6e3e90 Bug 1357780 - Fix tint problem in Android 4.4 r=sebastian
Use this way to wrap drawable to make tinting works.

MozReview-Commit-ID: rbblrr3ysy
2017-05-18 10:48:44 +08:00
Julian_Chu b00bcdba68 Bug 1357780 - CustomTabs get rid of dark theme r=sebastian
Now we only use Light theme, and its look and feel more close to
Full-Browser. Hopefully when we re-use gecko widgets will have less
visual issue.

In ActionBar, the tint color follows text color. And the text color is
decided by Top toolbar background.

MozReview-Commit-ID: JrFAdLmk3Fk
2017-05-20 01:10:04 +08:00
Jan Henning 07166ac251 Bug 1359531 - Part 6 - Remove manual setting of current activity. r=sebastian,walkingice
Switching between different GeckoApp instances in response to tab selection no longer requires the GeckoActivityMonitor for getting the current activity, so we no longer need to manually set the current activity for the benefit of code that executes early during onCreate/onNewIntent.


MozReview-Commit-ID: E9BQhRclDfS
2017-04-28 22:28:55 +02:00
Jan Henning a36b9a932d Bug 1359531 - Part 5 - Trigger activity switching from GeckoApp. r=sebastian,walkingice
To avoid the need for tracking the currently active activity, we just respond from the activity itself by using GeckoApp's tab event listener.

As replacement for the "closeTabNoActivitySwitch()" function, we set a flag on the activity instead before closing the tab.

MozReview-Commit-ID: LdmyJ5i10jZ
2017-04-29 15:20:19 +02:00
Jan Henning 720a80fe5f Bug 1359531 - Part 4 - Import Tab intent extra key definitions. r=sebastian,walkingice
MozReview-Commit-ID: DXZGscSpRtd
2017-04-28 22:58:51 +02:00
Jan Henning 3c65d21240 Bug 1359531 - Part 3 - Creating new intents is a job for IntentHelper. r=sebastian,walkingice
MozReview-Commit-ID: 9s7aP35Q0AJ
2017-04-28 22:35:29 +02:00
Jan Henning c11ad4d04b Bug 1359531 - Part 2 - Move some tab switch functionality to the tab object. r=sebastian,walkingice
These methods already take a tab object as their argument, so we just turn them into Tab member functions.

MozReview-Commit-ID: 7fp7bzDbRja
2017-04-28 22:35:57 +02:00
Jan Henning 4285a06d0c Bug 1359531 - Part 1 - Call GeckoApp's tab event handler from web apps/custom tabs, too. r=sebastian,walkingice
We want to move the activity switching code into the activity (i.e. GeckoApp) itself and run it from its onTabChanged handler in response to the appropriate events (at the moment that's only SELECTED), so we need to ensure that this will actually be called within custom tabs/web apps as well.

Additionally, there's no need to separately register the tab events listener from the CustomTabs/WebAppActivity as well if our parent class already does it for us.

MozReview-Commit-ID: 6PIq1KncDcA
2017-04-28 20:16:19 +02:00
Wes Kocher ebc0d0dd45 Merge inbound to central, a=merge
MozReview-Commit-ID: EI67EKp8ykS
2017-05-19 15:14:19 -07:00
Randall Barker e61f01164e Bug 1365161 - Ensure dynamic toolbar static snapshot visibility stays in sync with the real toolbar chrome r=botond,jchen
There were two issues that prevented the static snapshot toolbar and
real chrome toolbar from staying in sync.

1) When a page would resize such as when going fullscreen, if the
root content document was not scrollable, the animator would not receive
root composition page size updates. The page resize is used by the
animator to hide the static snapshot, so it would remain visible while
the real chrome toolbar would be hidden.

2) Certain places in UI java code would toggle the chrome state directly
instead of going through the animator to change the state.

MozReview-Commit-ID: DCQgRFS0UAO
2017-05-19 10:50:02 -07:00
Ryan VanderMeulen 711977f23c Merge inbound to m-c. a=merge 2017-05-19 11:46:56 -04:00
cnevinc 8ec54facda Bug 1351585 - Part 2. Add build flag and change our existing build system to inject leanplum implementation r=nalexander
MozReview-Commit-ID: uN7imeGYcj
2017-05-13 14:08:57 -07:00
maliu e84fefc9fd Bug 1357356 - Open aurora transition page once user upgrade from aurora to nightly, r=sebastian
MozReview-Commit-ID: HEV06stuwm5
2017-04-20 19:10:49 +08:00
Ryan VanderMeulen 4551e69b02 Merge m-c to autoland. a=merge 2017-05-19 12:26:48 -04:00
Jan Henning a76b19e64c Bug 1363049 - getNextTab() should only use parent tabs of the same type. r=walkingice
That is if the currently selected tab has a web app or custom tab as its "parent tab", we'll ignore that fact when the tab is closed from the tabs tray, so we don't trigger an activity switch that way.

MozReview-Commit-ID: 7bOi90RQUhA
2017-05-18 20:45:22 +02:00
Matthew Wein 0cbf6ec98e Bug 1331742 - Part 4 - Add support for adding and removing browser actions from the main menu r=sebastian,walkingice
MozReview-Commit-ID: ITIan73eIlx
2017-05-16 13:43:35 -04:00
Jim Chen 31d11da47b Bug 1363567 - 3. Remove GeckoInterface.getPluginContainer; r=me
GeckoInterface.getPluginContainer is no longer used anywhere and can be
removed. r=me for trivial patch.

MozReview-Commit-ID: 2IoQPqecWus
2017-05-15 23:11:18 -04:00
Jim Chen 35ee70ae9b Bug 1363567 - 2. Move onFullScreenPluginHidden to GeckoApp; r=rbarker
Move the native call onFullScreenPluginHidden from GeckoAppShell to
GeckoApp itself.

MozReview-Commit-ID: APhGRBTNl0X
2017-05-15 23:11:18 -04:00