|
|
DescriptionUsing FLAG_ACTIVITY_NEW_TASK flag for sharing in Chrome Shell.
FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag is depricated in API 21. Using
this flag will have same effect as FLAG_ACTIVITY_NEW_DOCUMENT flag for
Lollipop and higher versions of Android ie separate entries for both the
applications in Task Manager.
FLAG_ACTIVITY_NEW_TASK flag will ensure that when new application is opened
via Share option, entries of both application is shown in Task Manager.
So there will be same behaviour for Share option for all versions of Android.
Bug=None
Committed: https://crrev.com/578e90b7fe494eb8dded65247a31ba320ad06ded
Cr-Commit-Position: refs/heads/master@{#305253}
Patch Set 1 #
Total comments: 6
Patch Set 2 : #Patch Set 3 : #Messages
Total messages: 16 (4 generated)
deepak.db@samsung.com changed reviewers: + wajahat.s@samsung.com
PTAL
wajahat.s@samsung.com changed reviewers: + cjhopman@chromium.org, nyquist@chromium.org
+ cjhopman & nyquist for review Pl. comment thanks!
nyquist@chromium.org changed reviewers: + aurimas@chromium.org
aurimas: care to take a look at this?
https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java (right): https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:357: this, activeTab.getTitle(), activeTab.getUrl(), null, Undo "this" wrapping to the new line as it has nothing to do with this CL. https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:358: Intent.FLAG_ACTIVITY_NEW_TASK); Use ChromeApiCompatibilityUtils.getActivityNewDocumentFlag() instead of hardcoding the flag.
Thanks for the review. PTAL https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java (right): https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:358: Intent.FLAG_ACTIVITY_NEW_TASK); On 2014/11/19 22:43:17, aurimas wrote: > Use ChromeApiCompatibilityUtils.getActivityNewDocumentFlag() instead of > hardcoding the flag. Thanks for the reply! FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag is depricated in API 21 and it performs identical to new added FLAG_ACTIVITY_NEW_DOCUMENT flag. So with FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag, there is different behavior observed in Lollipop and previous versions of Android. See the screenshots attached in bug 435004 (I am unable to add you in cc). So I thought of passing FLAG_ACTIVITY_NEW_TASK Intent flag which is available from API 1 and this flag will have same effect in all the versions of android ie even in older version two separate tasks will be shown in application switcher similar to Lollipop. Also if we use FLAG_ACTIVITY_NEW_TASK Intent flag we can avoid extra code in APICompatibilityUtils class. PTAL
https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java (right): https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:358: Intent.FLAG_ACTIVITY_NEW_TASK); On 2014/11/20 07:29:05, deepak.db wrote: > On 2014/11/19 22:43:17, aurimas wrote: > > Use ChromeApiCompatibilityUtils.getActivityNewDocumentFlag() instead of > > hardcoding the flag. > > Thanks for the reply! > FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag is depricated in API 21 and it performs > identical to new added FLAG_ACTIVITY_NEW_DOCUMENT flag. So with > FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag, there is different behavior observed > in Lollipop and previous versions of Android. > See the screenshots attached in bug 435004 (I am unable to add you in cc). > So I thought of passing FLAG_ACTIVITY_NEW_TASK Intent flag which is available > from API 1 and this flag will have same effect in all the versions of android ie > even in older version two separate tasks will be shown in application switcher > similar to Lollipop. > Also if we use FLAG_ACTIVITY_NEW_TASK Intent flag we can avoid extra code in > APICompatibilityUtils class. > PTAL FLAG_ACTIVITY_NEW_DOCUMENT and FLAG_ACTIVITY_NEW_TASK are not the same. http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIV...
https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java (right): https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:357: this, activeTab.getTitle(), activeTab.getUrl(), null, On 2014/11/19 22:43:17, aurimas wrote: > Undo "this" wrapping to the new line as it has nothing to do with this CL. Done. https://codereview.chromium.org/723223004/diff/1/chrome/android/shell/java/sr... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java:358: Intent.FLAG_ACTIVITY_NEW_TASK); On 2014/11/20 17:24:04, aurimas wrote: > On 2014/11/20 07:29:05, deepak.db wrote: > > On 2014/11/19 22:43:17, aurimas wrote: > > > Use ChromeApiCompatibilityUtils.getActivityNewDocumentFlag() instead of > > > hardcoding the flag. > > > > Thanks for the reply! > > FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag is depricated in API 21 and it > performs > > identical to new added FLAG_ACTIVITY_NEW_DOCUMENT flag. So with > > FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag, there is different behavior observed > > in Lollipop and previous versions of Android. > > See the screenshots attached in bug 435004 (I am unable to add you in cc). > > So I thought of passing FLAG_ACTIVITY_NEW_TASK Intent flag which is available > > from API 1 and this flag will have same effect in all the versions of android > ie > > even in older version two separate tasks will be shown in application switcher > > similar to Lollipop. > > Also if we use FLAG_ACTIVITY_NEW_TASK Intent flag we can avoid extra code in > > APICompatibilityUtils class. > > PTAL > > FLAG_ACTIVITY_NEW_DOCUMENT and FLAG_ACTIVITY_NEW_TASK are not the same. > > http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIV... ChromeApiCompatibilityUtils.getActivityNewDocumentFlag() used as per your review comments. Thanks. Done. PTAL
lgtm
now that aurimas is happy, lgtm
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/723223004/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/578e90b7fe494eb8dded65247a31ba320ad06ded Cr-Commit-Position: refs/heads/master@{#305253} |