├── CHANGELOG.md
├── FAQs_And_FUQs.md
├── LICENSE.GPL-2.0-only.md
├── LICENSE.GPL-3.0-only.md
├── LICENSE.md
├── README.md
└── projects
├── Activity_State_Changes.prj.md
└── Activity_State_Changes.prj.xml
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | **Version Number Format:** `major.minor.patch`
6 | **Release Date Format:** `yyyy-mm-dd`
7 |
8 | **Types of Changes:**
9 | - **Added** for new features.
10 | - **Changed** for changes in existing functionality.
11 | - **Deprecated** for soon-to-be removed features.
12 | - **Removed** for now removed features.
13 | - **Fixed** for any bug fixes.
14 | - **Security** in case of vulnerabilities.
15 | ##
16 |
17 |
18 | ## [Unreleased]
19 |
20 | `-`
21 |
22 |
23 | ## [0.2.0] - 2020-01-13
24 |
25 | ### Added
26 | - Added `Display State` State is `On` to `*Activity Start Monitor` and `*Config Change Monitor` Profiles to save battery when display is off.
27 | - Added task to get project version.
28 |
29 |
30 | ## [0.1.0] - 2020-01-09
31 |
32 | `-`
33 | ##
34 |
35 |
36 | [unreleased]: https://github.com/Taskomater/Activity-State-Changes-Tasker-Project/compare/v0.2.0...HEAD
37 | [0.2.0]: https://github.com/Taskomater/Activity-State-Changes-Tasker-Project/compare/v0.1.0...v0.2.0
38 | [0.1.0]: https://github.com/Taskomater/Activity-State-Changes-Tasker-Project/releases/tag/v0.1.0
39 |
--------------------------------------------------------------------------------
/FAQs_And_FUQs.md:
--------------------------------------------------------------------------------
1 | ### Frequently Asked Questions(FAQs)
2 |
3 | `-`
4 | ##
5 |
6 |
7 | ### Frequently Unasked Questions(FUQs)
8 |
9 | `-`
10 | ##
11 |
12 |
--------------------------------------------------------------------------------
/LICENSE.GPL-2.0-only.md:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------------
/LICENSE.GPL-3.0-only.md:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Dual License
2 |
3 | Copyright (c) 2019, agnostic-apollo, auth={ type=`scrypt-kdf`, key=`xY%I5l>AxK+n@o.]cjUp8&s2.NyFBr=&]PoMxQ5B-W(T)e+d(lDT*I7u=jjFK-UA-IA-BA` }
4 |
5 | SPDX-License-Identifiers: GPL-2.0-only or GPL-3.0-only
6 |
7 | This software is licensed under the terms of the General Public License (GPL)
8 | Version 2 or General Public License (GPL) Version 3. You may use the software
9 | according to either of these licenses as is most appropriate
10 | for your project.
11 |
12 | The terms of each license can be found in the root directory of the source
13 | code in the following files:
14 |
15 | GPL-2.0-only: LICENSE.GPL-2.0-only.md
16 | GPL-3.0-only: LICENSE.GPL-3.0-only.md
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Activity State Changes Tasker Project
2 |
3 | `Activity State Changes Tasker Project` for android provides a way to detect android app activity state changes like activity changes in the same app or between different ones or if an activity enters or exits the fullscreen mode using the [Tasker App]. This majorly relies on logcat entries detected using the Tasker `Logcat Entry` Profile and requires Tasker to be granted `android.permission.READ_LOGS`.
4 | ##
5 |
6 |
7 | ### Contents
8 | - [Project Details](#Project-Details)
9 | - [How Project Works](#How-Project-Works)
10 | - [Activity States And Transitions](#Activity-States-And-Transitions)
11 | - [Compatibility](#Compatibility)
12 | - [Dependencies](#Dependencies)
13 | - [Downloads](#Downloads)
14 | - [Install Instructions For Tasker In Android](#Install-Instructions-For-Tasker-In-Android)
15 | - [Usage](#Usage)
16 | - [Finding Device Specific Logcat Entries](#Finding-Device-Specific-Logcat-Entries)
17 | - [Current Features](#Current-Features)
18 | - [Planned Features](#Planned-Features)
19 | - [Issues](#Issues)
20 | - [Worthy Of Note](#Worthy-Of-Note)
21 | - [FAQs And FUQs](#FAQs-And-FUQs)
22 | - [Changelog](#Changelog)
23 | - [Contributions](#Contributions)
24 | ##
25 |
26 |
27 | ### Project Details
28 |
29 | Each android app has a package name which is a unique name that allows android to differentiate between different apps even if they have the same name. For example, the package name for Tasker is `net.dinglisch.android.taskerm`. Each app can contain different activities inside it which are basically views or screens. For example Tasker has the homescreen activity, the settings activity, task edit activity and so on.
30 | Activities can be of the following types:
31 | - Non-Fullscreen mode activities in which the status bar and navigation bar is always visible.
32 | - Fullscreen mode activities in which the status bar and optionally the navigation bar is hidden. May require tapping the screen to hide/unhide the bars to enable/disable fullscreen mode. Example: Images or videos opened in gallery or messenger apps.
33 | - Activities that can change their config which may include changing between Fullscreen and Non-Fullscreen mode. Example: Video in Chrome or Youtube app in a small windows or in fullscreen.
34 |
35 | To find activity transitions or activity config changes, every activity changed needs to be tracked. For this the Tasker `Logcat Entry` Profile can be used. Following are some logcat entries that can be used.
36 |
37 | The logcat entry that should be added when any activity is started that is not in the activity stack:
38 |
39 | ```
40 | ActivityManager: Displayed com.some.package/.some.activity
41 | ```
42 |
43 | The log entry that should be added when any activity is displayed and the previous one is paused:
44 | ```
45 | ActivityTrigger: ActivityTrigger activityPauseTrigger
46 | ```
47 |
48 | The logcat entry that should be added when the current activity changes its config:
49 |
50 | ```
51 | ActivityManager: Config change.*
52 | ```
53 |
54 | The above logcat entries should ideally exist for almost every device if not all unless changes were made to the AOSP.
55 |
56 | The `ActivityManager: Displayed` will not be logged for activities which are returned to after pressing back button and will only be logged when an activity is started which is not in the activity stack and so basically the entry cannot be used to detect all activity transitions accurately.
57 |
58 | The `ActivityTrigger: ActivityTrigger activityPauseTrigger` can be used to reliable detect all activity transitions but since the entry itself does not contain the package and activity name, other ways need to be used to detect what activity is currently in focus. But this creates lots of problems because if the `Logcat Entry` Profile entry task takes too long to process an entry, then by the time the turn comes for queued tasks, the package and/or activity might have already changed for which those Logcat entries were generated for, resulting in false activity transitions being calculated.
59 |
60 | Currently two ways are used to detect which activity is currently in focus:
61 | - For non-root users the `GetCurrentAppAndActivity` function of the `Tasker Function` action is used, but the value returned by it is sometimes that of a previous activity since Tasker does not receive/calculate the new value fast enough and a wait action is required of `0.5-1s` before running it. The exact time of the `Wait` action at runtime will vary depending on other same priority tasks running in tasker or the device load itself and may even vary for different devices, and so activity transitions may not always be accurate. The `Tasker Settings` -> `Monitor` -> `App Check Method` if set to `App Usage Stats` may give better results than `Accessibility`.
62 | - For root users, the `mFocusedActivity` value is extracted from the `dumpsys activity activities` command. This ideally should work for almost every device if not all. This is relatively more reliable for getting the current package and activity value accurately since its updated fast enough and a `Wait` action is not required. The full command to extract `GetCurrentAppAndActivity` value is `dumpsys activity activities | grep mFocusedActivity | sed -E 's/.*ActivityRecord\{[^ ]+ [^ ]+ ([^ ]+) [^ ]+\}.*/\1/'`.
63 |
64 | But with both these methods false activity transitions will still occur in cases when the entry task is slow or queued because of higher priority tasks running in tasker and packages and/or activities have already changed. It is best to find device specific Logcat entries for all activity resumes which also contain the package and activity name in the format `package_name/activity_name`. These should normally exist in all devices but will vary depending on device manufacturer and android version. Check the [Finding Device Specific Logcat Entries](###Finding-Device-Specific-Logcat-Entries) section for more info on how to find them.
65 |
66 | The `ActivityManager: Config change.*` does not require finding the currently focused activity because the last opened activity is used.
67 |
68 | Now the above only detects if an activity is started or changed but does not detect whether the activity is currently in fullscreen mode or not. There is also a prerequisite for checking whether an activity is fullscreen or not. When an image or video is opened in fullscreen mode, the screen is not in a complete fullscreen mode if the status bar and/or navigation bar is still visible. The screen needs to be tapped for them to be hidden and at this point the activity will be considered to be in a fullscreen mode. Hence, whenever an activity is started or its config changed, a wait action needs to be used to give user the time to tap the screen and for android to update its fullscreen state. The wait by default for both states is currently `2s`.
69 |
70 | After waiting, it can be checked if the activity is fullscreen or not. For this, there are two ways:
71 | - For root users, the `mTopIsFullscreen` value is extracted from the `dumpsys window policy` command. If this is set to `true`, the activity is in fullscreen mode. This ideally should work for almost every device if not all. The full command to extract `mTopIsFullscreen` value is `dumpsys window policy | grep mTopIsFullscreen | sed -E 's/.*mTopIsFullscreen=([^ ]+) .*/\1/'`.
72 | - For non-root users, the `mSystemUiVisibility` value of the [StatusBar.java](https://github.com/aosp-mirror/platform_frameworks_base/blob/master/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java) Class or [previously the PhoneStatusBar.java](http://gerrit.aospextended.com/plugins/gitiles/AospExtended/platform_frameworks_base/+/2a6ea9c2a1b52b0386270ec73e1e6d6a9b614a34
73 | ) Class is used. The `mSystemUiVisibility` variable stores bit flags. It will have the `View.SYSTEM_UI_FLAG_FULLSCREEN` or `View.SYSTEM_UI_FLAG_HIDE_NAVIGATION` flags set when an activity is in fullscreen or immersive mode and `View.SYSTEM_UI_FLAG_IMMERSIVE` or `View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY` flags when an activity is in immersive mode. These are the flags used by `inFullscreenMode` and `inImmersiveMode` functions of the `StatusBar.java` Class to check fullscreen or immersive mode respectively and the same bitwise operations are performed in tasker. But first the current `mSystemUiVisibility` value needs to be found. For that the logcat command is used. Whenever the `setSystemUiVisibility` function of the `StatusBar.java` Class is called, it logs it with `setSystemUiVisibility displayId=%d vis=%s mask=%s oldVal=%s newVal=%s diff=%s"`, where the value of the `newVal` variable is the current `mSystemUiVisibility` value as a hex string. So basically, what is done to check whether the current activity is in fullscreen mode or not is by finding the current `mSystemUiVisibility` value from the last `setSystemUiVisibility.*` logcat entry by extracting the `newVal` value and checking if the fullscreen flags are set or not. This `setSystemUiVisibility.*` logcat entry should ideally exist for almost every device if not all unless changes were made to the AOSP. Currently this method works if the entry is logged by either the `StatusBar` or `PhoneStatusBar` tag/component. However, if it is logged by other components in some devices, then that can be looked into based on feedback from users.
74 |
75 | The details for fullscreen and immersive modes can be found [here](https://developer.android.com/training/system-ui/immersive).
76 |
77 | Once it is found if the activity is fullscreen or not, then the current activity state is calculated. After this, if the current or previous activity's package name responder tasks are found in the tasker config, then activity transitions are calculated from previous and current activity states and passed to the respective tasks.
78 |
79 | ### How Project Works
80 |
81 |
82 | **Logcat Entry Profiles**:
83 | - `ActivityTrigger Activity Start Monitor` is trigger by a `Logcat Entry` Event to detect `activity_start` activity_state_change. This is the default way to detect if an activity is started. This is enabled by default.
84 | **Component:** `ActivityTrigger` **Filter:** `ActivityTrigger activityPauseTrigger`.
85 | - `Custom Activity Start Monitor` is trigger by a `Logcat Entry` Event to detect `activity_start` activity_state_change. This should be used by users who found logcat entries for their device to detect if an activity is started or resumed that also contain the package and activity name. This is disabled by default and the values set are of the dev's device.
86 | - `ActivityManager Activity Config Change Monitor` is trigger by a `Logcat Entry` Event to detect `activity_config_change` activity_state_change. This is the default way to detect if an activity's config has changed. This is enabled by default.
87 |
88 | The 3 profiles above call the `Activity State Change Relay` Task which finds the currently opened package and activity for `activity_start` activity_state_change, either from `%lc_text` or with other ways mentioned earlier. Then it sets the `%ActivityStateChangeControllerCommand` variable with the `%current_package_and_activity` and `%activity_state_change` values which triggers the `Activity State Change Controller Command Monitor` Profile which calls the `Activity State Change Controller` Task to further process the activity state change and call any other required tasks for respected packages and activities. Note that either `ActivityTrigger Activity Start Monitor` or `Custom Activity Start Monitor` must be activated at the same time. If they are both activated, then this can cause duplication and result in fake transitions. The 3 profiles only become active when the `Display State` State is `On` and respective `Logcat Entry` Events are triggered. Activity state changes are unlikely to happen when display is off, and adding `Display State` context saves battery because tasker doesn't need to monitor the Logcat when display is off. You may remove the `Display State` context if required.
89 |
90 | The `Activity State Change Controller` Task first checks if the current_package_and_activity passed is a valid package and activity name in the format `package_name/activity_name`. If it is then it checks if the current activity is in fullscreen mode with status bars hidden. Then it sets the `current_activity_state` depending on `activity_state_change` and `fullscreen_mode`. Then it checks if the a `package_name Activity State Change Responder` Task exists in the Tasker config for the `current_package_and_activity` or `previous_package_and_activity`. If either of those exists, then it calculates the `previous_activity_task_activity_transition_par` and `current_activity_task_activity_transition_par` depending on activity transitions in the transitions table defined in [Activity States And Transitions](#Activity-States-And-Transitions). Then it calls the `previous_package Activity State Change Responder` Task if it exists with the `previous_activity` as `%par1` and `previous_activity_task_activity_transition_par` as `%par2`. Then it calls the `current_package Activity State Change Responder` Task if it exists with the `current_activity` as `%par1` and `current_activity_task_activity_transition_par` as `%par2`. Those tasks may respond appropriately to activity transitions but must not perform long running operations since this task will not finish until the called tasks are finished to maintain order and any queued tasks for this task will also be in waiting. Any long running operations that do not require ordered execution can be run inside the called tasks in additional tasks with `%priority - 1` so that the called tasks can return before the additional tasks finish.
91 |
92 | The `Reset Activity State Change Variables On Monitor Start` Profile is called by the `Reset Activity State Change Variables On Monitor Start` Task when Tasker Monitor is started. It should ideally also be manually called when the `* Activity Start Monitor` and `* Activity Config Change Monitor` tasks are enabled/disabled. Resetting variables is required to prevent false activity transitions if activity states were stopped from being monitor either by tasker being killed or manually by the user.
93 |
94 | The `package_name Activity State Change Responder` tasks must be created for each app whose activity transitions need to be handled. This is needed so that further processing and task calling is not done for each activity that is started and only for the apps required. It also separates app specific activities and activity transition logics into different tasks which creates a better design. 4 example tasks are provided by this project for `Chrome`, `Youtube`, `WhatsApp` and `F-Stop` apps that currently only increase/decrease brightness on fullscreen enter/exits.
95 |
96 | Check [Activity State Changes Project Info](projects/Activity_State_Changes.prj.md) file for more info of the profiles and tasks.
97 | ##
98 |
99 |
100 | ### Activity States And Transitions
101 |
102 | #### Activity States:
103 | - `start_fullscreen`: fullscreen mode activity
104 | - `start_non_fullscreen`: non-fullscreen mode activity
105 | - `config_change_fullscreen`: an activity whose config was changed to fullscreen mode
106 | - `config_change_non_fullscreen`: an activity whose config was changed to non-fullscreen mode
107 |
108 | #### Activity Transitions:
109 | - `start_fullscreen`: activity started in fullscreen mode
110 | - `start_non_fullscreen`: activity started in non-fullscreen mode
111 | - `exit_fullscreen`: activity exited from fullscreen mode
112 | - `exit_non_fullscreen`: activity exited from non-fullscreen mode
113 | - `restart_fullscreen`: activity with same name was started in fullscreen mode
114 | - `restart_non_fullscreen`: activity with same name was started in non-fullscreen mode
115 | - `config_change_fullscreen`: activity config was changed to fullscreen mode
116 | - `config_change_non_fullscreen`: activity config was changed to non-fullscreen mode
117 | - `config_rechange_fullscreen`: activity config was changed again to fullscreen mode
118 | - `config_rechange_non_fullscreen`: activity config was changed again to non-fullscreen mode
119 |
120 |
121 | #### Activity Transition Table:
122 | ```
123 | If previous_activity==current_activity:
124 | #previous_activity_state #current_activity_state #current_activity_task_activity_transition_par
125 | start_non_fullscreen start_non_fullscreen -> restart_non_fullscreen
126 | start_non_fullscreen start_fullscreen -> restart_fullscreen
127 | start_non_fullscreen config_change_non_fullscreen -> config_change_non_fullscreen
128 | start_non_fullscreen config_change_fullscreen -> config_change_fullscreen
129 | start_fullscreen start_fullscreen: -> restart_fullscreen
130 | start_fullscreen start_non_fullscreen -> restart_non_fullscreen
131 | start_fullscreen config_change_non_fullscreen -> config_change_non_fullscreen
132 | start_fullscreen config_change_fullscreen -> config_change_fullscreen
133 | config_change_non_fullscreen config_change_non_fullscreen -> config_rechange_non_fullscreen
134 | config_change_non_fullscreen config_change_fullscreen -> config_change_fullscreen
135 | config_change_non_fullscreen start_fullscreen -> restart_fullscreen
136 | config_change_non_fullscreen start_non_fullscreen -> restart_non_fullscreen
137 | config_change_fullscreen config_change_fullscreen -> config_rechange_fullscreen
138 | config_change_fullscreen config_change_non_fullscreen -> config_change_non_fullscreen
139 | config_change_fullscreen start_fullscreen -> restart_fullscreen
140 | config_change_fullscreen start_non_fullscreen -> restart_non_fullscreen
141 |
142 | If previous_activity!=current_activity:
143 | #previous_activity_state #current_activity_state #previous_activity_task_activity_transition_par #current_activity_task_activity_transition_par
144 | start_non_fullscreen start_non_fullscreen -> exit_non_fullscreen start_non_fullscreen
145 | start_non_fullscreen start_fullscreen -> exit_non_fullscreen start_fullscreen
146 | start_non_fullscreen config_change_non_fullscreen -> exit_non_fullscreen config_change_non_fullscreen
147 | start_non_fullscreen config_change_fullscreen -> exit_non_fullscreen config_change_fullscreen
148 | start_fullscreen start_fullscreen -> exit_fullscreen start_fullscreen
149 | start_fullscreen start_non_fullscreen -> exit_fullscreen start_non_fullscreen
150 | start_fullscreen config_change_non_fullscreen -> exit_fullscreen config_change_non_fullscreen
151 | start_fullscreen config_change_fullscreen -> exit_fullscreen config_change_fullscreen
152 | config_change_non_fullscreen start_fullscreen -> exit_non_fullscreen start_fullscreen
153 | config_change_non_fullscreen start_non_fullscreen -> exit_non_fullscreen start_non_fullscreen
154 | config_change_fullscreen start_fullscreen -> exit_fullscreen start_fullscreen
155 | config_change_fullscreen start_non_fullscreen -> exit_fullscreen start_non_fullscreen
156 | ```
157 | ##
158 |
159 |
160 | ### Compatibility
161 |
162 | - Android using [Tasker App].
163 | ##
164 |
165 |
166 | ### Dependencies
167 |
168 | - No specific dependencies other than requires Tasker to be granted `android.permission.READ_LOGS`. Either grant it over adb manually using `pm grant net.dinglisch.android.taskerm android.permission.READ_LOGS` command or use the script in [tasker_package_utils](https://github.com/Taskomater/tasker_package_utils) project which has a few more features. Root users are automatically granted permissions by Tasker if required.
169 | ##
170 |
171 |
172 | ### Downloads
173 |
174 | - [GitHub releases](https://github.com/Taskomater/Activity-State-Changes-Tasker-Project/releases).
175 | ##
176 |
177 |
178 | ### Install Instructions For Tasker In Android
179 |
180 | 1. Import `projects/Activity_State_Changes.prj.xml` Project file into Tasker.
181 |
182 | ##
183 |
184 |
185 | ### Usage
186 |
187 | 1. Enable the `ActivityTrigger Activity Start Monitor`, `ActivityManager Activity Config Change Monitor`, `Activity State Change Controller Command Monitor` and `Reset Activity State Change Variables On Monitor Start` Profiles if not already enabled. You may optionally enable the `Custom Activity Start Monitor` Profile instead of the `ActivityTrigger Activity Start Monitor` Profile if you found Activity resume logcat entries for your device. Do not enable both profiles together.
188 |
189 | 2. Optionally enable the use of non-root modes if you are a root user by disabling the `%use_root_mode` Variable Set action in the `Activity State Change Relay` and `Activity State Change Controller` Tasks or change their values from `1`.
190 |
191 | 3. Enable the `%lc_text` Flash action of the `Activity State Change Relay` Task, the `%enable_debugging` Variable Set action of the `Activity State Change Controller` Task and optionally the `%action\n%%activity_transition` action of the `project_name Activity State Change Responder` Tasks. This should normally give you enough info on what is being run. The Flash actions will of course not be synchronized with what is being run.
192 |
193 | 4. Change the `Wait` action time in the `Activity State Change Relay` Task for the `ActivityTrigger Activity Start Monitor` Profile conditional statement if you are using non-root mode. Also use the `App Usage Stats` mode for `Tasker Settings` -> `Monitor` -> `App Check Method` for possibly better results.
194 |
195 | 5. If the fullscreen mode is not always being detected correctly, try to change the `Wait` action time in the `Wait For User To Hide Status Bar By Tapping Screen*` section of the `Activity State Change Controller` Task. Do not forget to tap the screen once to hide the status bar as soon as you enter a fullscreen activity for which you want to detect fullscreen mode. You may optionally not tap it to prevent the respective `project_name Activity State Change Responder` Task from running the fullscreen actions you defined.
196 |
197 | 6. Create `project_name Activity State Change Responder` Tasks for each app you want to handle activity transitions for. The tasks may respond appropriately to activity transitions but must not perform long running operations since `Activity State Change Controller` Task will not finish until the called tasks are finished to maintain order and any queued tasks for it will also be in waiting. Any long running operations that do not require ordered execution can be run inside the called tasks in additional tasks with `%priority - 1` so that the called tasks can return before the additional tasks finish.
198 |
199 | 7. If the default `ActivityTrigger Activity Start Monitor` Profile with the `ActivityTrigger activityPauseTrigger` filter is never triggered, then find matching entries for `ActivityTrigger activityResumeTrigger` or other related pause/resume activity entries for your device in the logcat and update the profile. You may optionally find activity resume entries in your logcat that also contain the package and activity name and update the `Custom Activity Start Monitor` Profile with them. In this case you also need to update the `Variable Search Replace` action in the `Custom Activity Start Monitor` Profile conditional actions in the `Activity State Change Relay` Task to extract the package name and activity name from the logcat entries and set them to `%current_package_and_activity` in the format `package_name/activity_name`.
200 |
201 | 8. If the default `ActivityManager Activity Config Change Monitor` Profile is never triggered, try finding them in your logcat. If you can't, then contact the dev and ask him for help.
202 | ##
203 |
204 |
205 | ### Finding Device Specific Logcat Entries
206 |
207 | There are a few ways to find device specific logcat entries for various things.
208 |
209 | - Using Tasker `Logcat Event` Profile mechanism.
210 | - Using the [Grab Timed And Filtered Logcat](https://github.com/agnostic-apollo/Tasker-Random-Stuff/tree/master/grab_timed_and_filtered_logcat) Task to grab a logcat for `x` seconds to a file. It also provides a way to filter tags/components and also provides a way to filter using regexes. A logcat file is much easier to read to see flow of things.
211 | - If you have root access, then run `logcat | grep -E 'activity|trigger|resume|start|stop|config change|systemuivisibility|statusbar'` in a root shell in termux and then switch to multi-window and then switch between activities to see logcat changes in real time. You can pass any string in a regex to `grep` to filter entries you want to monitor.
212 | - If you do not have root access, you may run the logcat command above over adb. If you are using windows, then `grep` command will not be available, install `cygwin` if required.
213 |
214 | To find activity resume entries, adding part of the package or activity name to the filter regex can be helpful to narrow down important logcat entries. For LG G5 7.0, the activity resuming entries match the following format:
215 | ```
216 | LGImageQualityEnhancementService: activityResuming: package_name/activity_name
217 | ```
218 | ##
219 |
220 |
221 | ### Current Features
222 |
223 | - Detect activity transitions
224 | - Detect if activities enter or leave fullscreen mode
225 | - Sample tasks for handling activity transitions of some apps
226 | ##
227 |
228 |
229 | ### Planned Features
230 |
231 | - Optimizations to reduce tasks execution times.
232 | ##
233 |
234 |
235 | ### Issues
236 |
237 | - Some `package_name/activity_name` might be considered invalid. Currently the hyphen `-` character in activities is considered invalid by the `\p{javaJavaIdentifierPart}` character class of the validation regex for some unknown reason on the devs device. The regex may be changed in future.
238 |
239 | ##
240 |
241 |
242 | ### Worthy Of Note
243 |
244 | - The activity name of activities defined in the `AndroidManifest.xml` of apps may start with a dot, which implies that the package name should automatically be prepended to their name. Depending on the method used to detect the current package and activity, the activity name may not be prepended with the package name and may start with a dot instead. So it is best to use `~` matches instead of `eq` conditional statements in the `project_name Activity State Change Responder` Tasks.
245 |
246 | - You may increase the priority of `Logcat Entry` Profiles to a number higher than the default `5` to make them run as soon as they are trigerred to store the value of the current package and activity if other lower priority tasks are running in Tasker. But note that using `Wait` actions will prevent other tasks from executing until the profile entry tasks are complete and may create sluggish behaviour.
247 |
248 | - The dumpsys commands are by default run in `Run Shell` actions with the root toggle enabled. Opening a root shell takes a tiny bit longer than normal non-root shells. If Tasker is installed as a system privileged app and is granted `android.permission.DUMP`, then root shell is not required and the root toggle may be disabled to slightly increase performance. You may use the script in [Tasker Package Utils](https://github.com/Taskomater/tasker_package_utils) project to automatically install Tasker as a system privileged app.
249 | ##
250 |
251 |
252 | ### FAQs And FUQs
253 |
254 | Check [FAQs_And_FUQs.md](FAQs_And_FUQs.md) file for the **Frequently Asked Questions(FAQs)** and **Frequently Unasked Questions(FUQs)**.
255 | ##
256 |
257 | ### Changelog
258 |
259 | Check [CHANGELOG.md](CHANGELOG.md) file for the **Changelog**.
260 |
261 | ##
262 |
263 |
264 | ### Contributions
265 |
266 | `-`
267 | ##
268 |
269 |
270 | [Tasker App]: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm
271 |
--------------------------------------------------------------------------------
/projects/Activity_State_Changes.prj.md:
--------------------------------------------------------------------------------
1 | # Activity State Changes
2 |
3 | ## Export Info:
4 | **Tasker Version:** `5.9.1`
5 | **Timestamp:** `2020-01-13 05.28.11`
6 |
7 |
8 |
9 | ## Profile Names:
10 | **Count:** `5`
11 |
12 | - *`ActivityTrigger Activity Start Monitor`*
13 | - *`Custom Activity Start Monitor`*
14 | - *`ActivityManager Activity Config Change Monitor`*
15 | - *`Activity State Change Controller Command Monitor`*
16 | - *`Reset Activity State Change Variables On Monitor Start`*
17 |
18 |
19 |
20 | ## Scene Names:
21 | **Count:** `0`
22 |
23 |
24 |
25 |
26 | ## Task Names:
27 | **Count:** `10`
28 |
29 | - *`Activity State Change Relay`*
30 | - *`Activity State Change Controller`*
31 | - *`Reset Activity State Change Variables`*
32 | - *`com.whatsapp Activity State Change Responder`*
33 | - *`com.fstop.photo Activity State Change Responder`*
34 | - *`com.android.chrome Activity State Change Responder`*
35 | - *`com.google.android.youtube Activity State Change Responder`*
36 | - *`Fullscreen Activity Transition Screen Brightness Controller`*
37 | - *`Get Activity_State_Changes Tasker Project Version Number`*
38 | - *`Anonymous (860)`*
39 |
40 |
41 |
42 | ## Profiles Info:
43 |
44 | **#:** `1`
45 | **Name:** `ActivityTrigger Activity Start Monitor`
46 | **ID:** `855`
47 | **Entry Task:** `Activity State Change Relay`
48 | ##
49 |
50 |
51 | **#:** `2`
52 | **Name:** `Custom Activity Start Monitor`
53 | **ID:** `863`
54 | **Entry Task:** `Activity State Change Relay`
55 | ##
56 |
57 |
58 | **#:** `3`
59 | **Name:** `ActivityManager Activity Config Change Monitor`
60 | **ID:** `841`
61 | **Entry Task:** `Activity State Change Relay`
62 | ##
63 |
64 |
65 | **#:** `4`
66 | **Name:** `Activity State Change Controller Command Monitor`
67 | **ID:** `859`
68 | **Entry Task:** `Anonymous (860)`
69 | ##
70 |
71 |
72 | **#:** `5`
73 | **Name:** `Reset Activity State Change Variables On Monitor Start`
74 | **ID:** `847`
75 | **Entry Task:** `Reset Activity State Change Variables`
76 | ##
77 |
78 |
79 |
80 |
81 | ## Tasks Info:
82 |
83 | **#:** `1`
84 | **Name:** `Activity State Change Relay`
85 | **ID:** `839`
86 | **Collision Handling:** `Run Both Together`
87 | **Keep Device Awake:** `false`
88 | **Help:**
89 | ```
90 | A task that should be called whenever an activity is started or resumed again or the activity's config changes like entering or exiting fullscreen mode. Ideally a "Logcat Entry" Profile Event should call this task so that the %lc_text variable can be parsed.
91 |
92 | This task should basically find the currently opened package and activity and set it to %current_package_and_activity in the format "package_name/activity_name" and also set %activity_state_change to "activity_start" or "activity_config_change". Both variables are set to "%ActivityStateChangeControllerCommand" separated by a newline so that the "Activity State Change Controller Command Monitor" Profile can be triggered and can pass it to "Activity State Change Controller" Task to further process the activity state change and call any other required tasks for respected packages and activities. The "Activity State Change Command Monitor" Profile will also run the command tasks in order with its own queue. If new command tasks were run with "%priority - 1", then different instances of the same tasks would have run in parallel or might not run at all depending on priorities of other tasks running in tasker. If incrementally decreasing priorities were used, then other tasks in tasker would not have run if base priority was too high. A custom queue design could have been used but it's not needed since we don't care about return values of command tasks. This design is used because if the Logcat entry passed to this task does not contain the package and activity names and the Tasker "GetCurrentAppAndActivity" function or dumpsys command is used to find them, then in that case if processing an entry fully takes too long then by the time the turn comes for queued tasks, the package and/or activity might have already changed for which those Logcat entries were generated for resulting in false activity transitions being calculated. It is still best to find Logcat entries for the device and use them instead of other ways because false activity transitions will still occur in cases when this task is slow or queued because of higher priority tasks running in tasker and packages and/or activities have already changed.
93 |
94 | By default this task is started by "ActivityTrigger Activity Start Monitor", "Custom Activity Start Monitor" and "ActivityManager Activity Config Change Monitor" Profiles when "Display State" State is "On" and respective "Logcat Entry" Events are triggered. Note that either "ActivityTrigger Activity Start Monitor" or "Custom Activity Start Monitor" must be activated at the same time. If they are both activated, then this can cause duplication and result in fake transitions.
95 |
96 | Check Activity State Changes Project docs to get more info on how this task should be called and what it should do.
97 |
98 |
99 | This task does not take any parameters or return anything.
100 | ```
101 | ##
102 |
103 |
104 | **#:** `2`
105 | **Name:** `Activity State Change Controller`
106 | **ID:** `858`
107 | **Collision Handling:** `Run Both Together`
108 | **Keep Device Awake:** `false`
109 | **Help:**
110 | ```
111 | A task is called by the "Activity State Change Controller Command Monitor" Profile when the %ActivityStateChangeControllerCommand variable is set.
112 |
113 | This task first checks if the current_package_and_activity passed is a valid package and activity name in the format "package_name/activity_name".
114 |
115 | Then it checks if the current activity is in fullscreen mode with status bars hidden either by using the dumpsys command's "mTopIsFullscreen" value if root mode is enabled or from the last "*StatusBar: setSystemUiVisibility" logcat entry's "newVal" bit flags. If no entries are found in the logcat for "setSystemUiVisibility", then it is automatically assumed that activity is in non fullscreeen mode.
116 | Then it sets the current_activity_state depending on activity_state_change and fullscreen mode.
117 |
118 | Then it checks if the a "package_name Activity State Change Responder" Task exists in the Tasker config for the current_package_and_activity or previous_package_and_activity. If either of those exists, then it calculates the previous_activity_task_activity_transition_par and current_activity_task_activity_transition_par depending on activity transitions in the transitions table.
119 |
120 | Then it calls the "previous_package Activity State Change Responder" Task if it exists with the previous_activity as %par1 and previous_activity_task_activity_transition_par as %par2.
121 |
122 | Then it calls the "current_package Activity State Change Responder" Task if it exists with the current_activity as %par1 and current_activity_task_activity_transition_par as %par2.
123 |
124 | "*Responder" tasks may respond appropriately to activity transitions but must not perform long running operations since this task will not finish until the called tasks are finished to maintain order and any queued tasks for this task will also be in waiting. Any long running operations that do not require ordered execution can be run inside the called tasks in additional tasks with "%priority - 1" so that the called tasks can return before the additional tasks finish.
125 |
126 | Check Activity State Changes Project docs to get more info on how this task is called and what it does.
127 |
128 |
129 | Input %par1:
130 | "
131 | current_package_and_activity
132 | activity_state_change
133 | "
134 |
135 |
136 | This task does not return anything.
137 | ```
138 | ##
139 |
140 |
141 | **#:** `3`
142 | **Name:** `Reset Activity State Change Variables`
143 | **ID:** `852`
144 | **Collision Handling:** `Abort New Task`
145 | **Keep Device Awake:** `false`
146 | **Help:**
147 | ```
148 | A task that resets Activity States Changes Project variables.
149 |
150 | This is called by the "Reset Activity State Change Variables On Monitor Start" Profile when Tasker Monitor is started. It should ideally also be manually called when the "* Activity Start Monitor" and "* Activity Config Change Monitor" tasks are enabled/disabled. Resetting variables is required to prevent false activity transitions if activity states were stopped from being monitor either by tasker being killed or manually by the user.
151 |
152 |
153 | This task does not take any parameters or return anything.
154 | ```
155 | ##
156 |
157 |
158 | **#:** `4`
159 | **Name:** `com.whatsapp Activity State Change Responder`
160 | **ID:** `853`
161 | **Collision Handling:** `Run Both Together`
162 | **Keep Device Awake:** `false`
163 | **Help:**
164 | ```
165 | A task that responds to activity state changes for all the activities of the "com.whatsapp" package and is called by the "Activity State Change Controller" Task.
166 |
167 | Check Activity State Changes Project docs to get more info on how this task is called and what it should do.
168 |
169 |
170 | Input %par1:
171 | "
172 | activity
173 | "
174 |
175 | Input %par2:
176 | "
177 | activity_transistion
178 | "
179 |
180 | This task does not return anything.
181 | ```
182 | ##
183 |
184 |
185 | **#:** `5`
186 | **Name:** `com.fstop.photo Activity State Change Responder`
187 | **ID:** `854`
188 | **Collision Handling:** `Run Both Together`
189 | **Keep Device Awake:** `false`
190 | **Help:**
191 | ```
192 | A task that responds to activity state changes for all the activities of the "com.fstop.photo" package and is called by the "Activity State Change Controller" Task.
193 |
194 | Check Activity State Changes Project docs to get more info on how this task is called and what it should do.
195 |
196 |
197 | Input %par1:
198 | "
199 | activity
200 | "
201 |
202 | Input %par2:
203 | "
204 | activity_transistion
205 | "
206 |
207 | This task does not return anything.
208 | ```
209 | ##
210 |
211 |
212 | **#:** `6`
213 | **Name:** `com.android.chrome Activity State Change Responder`
214 | **ID:** `856`
215 | **Collision Handling:** `Run Both Together`
216 | **Keep Device Awake:** `false`
217 | **Help:**
218 | ```
219 | A task that responds to activity state changes for all the activities of the "com.android.chrome" package and is called by the "Activity State Change Controller" Task.
220 |
221 | Check Activity State Changes Project docs to get more info on how this task is called and what it should do.
222 |
223 |
224 | Input %par1:
225 | "
226 | activity
227 | "
228 |
229 | Input %par2:
230 | "
231 | activity_transistion
232 | "
233 |
234 | This task does not return anything.
235 | ```
236 | ##
237 |
238 |
239 | **#:** `7`
240 | **Name:** `com.google.android.youtube Activity State Change Responder`
241 | **ID:** `857`
242 | **Collision Handling:** `Run Both Together`
243 | **Keep Device Awake:** `false`
244 | **Help:**
245 | ```
246 | A task that responds to activity state changes for all the activities of the "com.google.android.youtube" package and is called by the "Activity State Change Controller" Task.
247 |
248 | Check Activity State Changes Project docs to get more info on how this task is called and what it should do.
249 |
250 |
251 | Input %par1:
252 | "
253 | activity
254 | "
255 |
256 | Input %par2:
257 | "
258 | activity_transistion
259 | "
260 |
261 | This task does not return anything.
262 | ```
263 | ##
264 |
265 |
266 | **#:** `8`
267 | **Name:** `Fullscreen Activity Transition Screen Brightness Controller`
268 | **ID:** `864`
269 | **Collision Handling:** `Run Both Together`
270 | **Keep Device Awake:** `false`
271 | **Help:**
272 | ```
273 | A helper task that can be used to set screen brightness if an activity enters or exits fullscreen mode. It ideally should be called by the "package_name Activity State Change Responder" Tasks.
274 |
275 | Currently it increases screen brightness to 75% if its less than that when an activity enters fullscreen mode and battery level is higher than 20%. It resets brightness to the old level which was set before the activity entered fullscreen mode.
276 |
277 | Support for setting screen brightness based on current light level set in Tasker in-built variable %LIGHT should be added later.
278 |
279 | action must be set to "enter_fullscreen" or "exit_fullscreen"
280 |
281 |
282 | Input %par1:
283 | "
284 | action
285 | "
286 |
287 | Returns:
288 | "
289 | result_code
290 | "
291 |
292 | If the task is successful, then result_code will contain "0".
293 | Otherwise it will contain an appropriate exit code.
294 | ```
295 | ##
296 |
297 |
298 | **#:** `9`
299 | **Name:** `Get Activity_State_Changes Tasker Project Version Number`
300 | **ID:** `869`
301 | **Collision Handling:** `Run Both Together`
302 | **Keep Device Awake:** `false`
303 | **Help:**
304 | ```
305 | A task that returns Activity_State_Changes Tasker Project version number.
306 |
307 |
308 | This task does not take any parameters.
309 |
310 | Returns:
311 | "
312 | version_code
313 | "
314 | ```
315 | ##
316 |
317 |
318 | **#:** `10`
319 | **Name:** `Anonymous (860)`
320 | **ID:** `860`
321 | **Collision Handling:** `Abort New Task`
322 | **Keep Device Awake:** `false`
323 | **Help:** `-`
324 | ##
325 |
326 |
--------------------------------------------------------------------------------
/projects/Activity_State_Changes.prj.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1576896789133
4 | true
5 | 1578787811114
6 | 8
7 | 841
8 | 839
9 | ActivityManager Activity Config Change Monitor
10 |
11 | 123
12 |
13 |
14 |
15 | 2085
16 | 0
17 |
18 |
19 | <StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%lc_text
20 | Text
21 | The text that corresponds to the matched logcat entry</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray>
22 | [Ljava.lang.String;
23 |
24 |
25 | ActivityManager
26 | ActivityManager: Config change
27 |
28 |
29 |
30 | 1578266148686
31 | true
32 | 1578378214299
33 | 8
34 | 847
35 | 852
36 | Reset Activity State Change Variables On Monitor Start
37 |
38 | 307
39 | 0
40 |
41 |
42 |
43 | 1578295763395
44 | true
45 | 1578875237200
46 | 8
47 | 855
48 | 839
49 | ActivityTrigger Activity Start Monitor
50 |
51 | 123
52 |
53 |
54 |
55 | 2085
56 | 0
57 |
58 |
59 | <StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%lc_text
60 | Text
61 | The text that corresponds to the matched logcat entry</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray>
62 | [Ljava.lang.String;
63 |
64 |
65 | ActivityTrigger
66 | ActivityTrigger activityPauseTrigger
67 |
68 |
69 |
70 | 1578341457397
71 | true
72 | 1578496784376
73 | 8
74 | 859
75 | 860
76 | Activity State Change Controller Command Monitor
77 |
78 | 3050
79 | 0
80 | %ActivityStateChangeControllerCommand
81 |
82 |
83 |
84 |
85 |
86 | 1578401192742
87 | true
88 | 1578875237904
89 | 8
90 | 863
91 | true
92 | 839
93 | Custom Activity Start Monitor
94 |
95 | 123
96 |
97 |
98 |
99 | 2085
100 | 0
101 |
102 |
103 | <StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%lc_text
104 | Text
105 | The text that corresponds to the matched logcat entry</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0></StringArray>
106 | [Ljava.lang.String;
107 |
108 |
109 | LGImageQualityEnhancementService
110 | activityResuming:
111 |
112 |
113 |
114 | 1578339897867
115 | Activity State Changes
116 | 855,863,841,859,847
117 | 839,858,852,853,854,856,857,864,869,860
118 |
119 |
120 | 1576882993943
121 | 1578760085239
122 | 839
123 | Activity State Change Relay
124 | 6
125 | 2
126 |
127 | 300
128 |
138 |
139 |
140 | 547
141 | %task_name
142 | Activity State Change Relay
143 |
144 |
145 |
146 |
147 |
148 |
149 | 37
150 |
151 | Or
152 |
153 | %err
154 | 12
155 | yes
156 |
157 |
158 | %errors
159 | 12
160 |
161 |
162 |
163 |
164 |
165 | 548
166 | Failed To Get current_package_and_activity From dumpsys
167 |
168 | current_package_and_activity =
169 | "
170 | %current_package_and_activity
171 | "
172 |
173 | errors =
174 | "
175 | %errors
176 | "
177 |
178 |
179 |
180 | 137
181 |
182 |
183 |
184 |
185 | 38
186 |
187 |
188 | 43
189 |
190 |
191 | 30
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 | 365
201 |
202 | false
203 |
204 |
205 | <StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%activity
206 | Activity
207 | The class name of the activity that's currently opened. You can launch this with the Launch App action by using packageName/activityName.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%package
208 | Package
209 | Unique package name for the app</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1></StringArray>
210 | [Ljava.lang.String;
211 |
212 |
213 | GetCurrentAppAndActivity()
214 |
215 |
216 | 547
217 |
218 | %current_package_and_activity
219 | %package/%activity
220 |
221 |
222 |
223 |
224 |
225 |
226 | 38
227 |
228 |
229 | 43
230 |
231 |
232 |
233 | %caller(1)
234 | 0
235 | profile=enter:Custom Activity Start Monitor
236 |
237 |
238 |
239 |
240 | 548
241 | false
242 | "%lc_text"
243 |
244 |
245 |
246 | 547
247 |
248 | %activity_state_change
249 | activity_start
250 |
251 |
252 |
253 |
254 |
255 |
256 | 547
257 |
258 | %current_package_and_activity
259 | %lc_text
260 |
261 |
262 |
263 |
264 |
265 |
266 | 598
267 |
274 | %current_package_and_activity
275 | .*activityResuming: ([^ ]+).*
276 |
277 |
278 |
279 |
280 |
281 | $1
282 |
283 |
284 | 43
285 |
286 |
287 |
288 | %caller(1)
289 | 0
290 | profile=enter:ActivityManager Activity Config Change Monitor
291 |
292 |
293 |
294 |
295 | 547
296 |
297 | %activity_state_change
298 | activity_config_change
299 |
300 |
301 |
302 |
303 |
304 |
305 | 547
306 |
307 | %current_package_and_activity
308 | -
309 |
310 |
311 |
312 |
313 |
314 |
315 | 43
316 |
317 |
318 | 548
319 | Logcat Entry Not Handled
320 | %task_name Failed.
321 |
322 |
323 |
324 | 137
325 |
326 |
327 |
328 |
329 | 38
330 |
331 |
332 | 300
333 |
334 |
335 |
336 | 37
337 |
339 |
340 | Or
341 |
342 | %current_package_and_activity
343 | 4
344 | ^android/.*$
345 |
346 |
347 | %current_package_and_activity
348 | 3
349 | */*
350 |
351 |
352 |
353 |
354 | 548
355 | false
356 | Ignoring current_package_and_activity = "%current_package_and_activity"
357 |
358 |
359 |
360 | 137
361 |
362 |
363 |
364 |
365 | 38
366 |
367 |
368 | 547
369 |
376 | %ActivityStateChangeControllerCommand
377 | %current_package_and_activity
378 | %activity_state_change
379 |
380 |
381 |
382 |
383 |
384 |
385 | 547
386 |
387 | %use_root_mode
388 | 1
389 |
390 |
391 |
392 |
393 |
394 |
395 | 300
396 |
397 |
398 |
399 | 37
400 |
401 |
402 |
403 | %caller(1)
404 | 0
405 | profile=enter:ActivityTrigger Activity Start Monitor
406 |
407 |
408 |
409 |
410 | 547
411 |
412 | %activity_state_change
413 | activity_start
414 |
415 |
416 |
417 |
418 |
419 |
420 | 37
421 |
422 | And
423 |
424 | %ROOT
425 | 0
426 | yes
427 |
428 |
429 | %use_root_mode
430 | 0
431 | 1
432 |
433 |
434 |
435 |
436 | 123
437 |
438 | false
439 | dumpsys activity activities | grep mFocusedActivity | sed -E 's/.*ActivityRecord\{[^ ]+ [^ ]+ ([^ ]+) [^ ]+\}.*/\1/'
440 |
441 |
442 | %current_package_and_activity
443 | %errors
444 |
445 |
446 |
447 |
448 | 1578266263845
449 | 1578640088625
450 | 852
451 | Reset Activity State Change Variables
452 | 6
453 |
454 | 300
455 |
461 |
462 |
463 | 549
464 | %PreviousPackageAndActivity
465 |
466 |
467 |
468 |
469 |
470 | 549
471 | %PreviousActivityState
472 |
473 |
474 |
475 |
476 |
477 |
478 | 1565310393511
479 | 1578526731892
480 | 853
481 | com.whatsapp Activity State Change Responder
482 | 100
483 | 2
484 |
485 | 300
486 |
502 |
503 |
504 | 547
505 | %task_name
506 | com.whatsapp Activity State Change Responder
507 |
508 |
509 |
510 |
511 |
512 |
513 | 43
514 |
515 |
516 |
517 | %activity_transition
518 | 0
519 | exit_fullscreen
520 |
521 |
522 |
523 |
524 | 130
525 |
526 | Fullscreen Activity Transition Screen Brightness Controller
527 |
528 | %priority
529 |
530 | exit_fullscreen
531 |
532 |
533 |
534 |
535 |
536 | 38
537 |
538 |
539 | 38
540 |
541 |
542 | 300
543 |
544 |
545 |
546 | 547
547 | %activity
548 | %par1
549 |
550 |
551 |
552 |
553 |
554 |
555 | 547
556 | %activity_transition
557 | %par2
558 |
559 |
560 |
561 |
562 |
563 |
564 | 548
565 |
566 | false
567 | %activity
568 | %activity_transition
569 |
570 |
571 |
572 | 105
573 |
574 | false
575 | %activity
576 |
577 |
578 |
579 | 37
580 |
581 |
582 |
583 | %activity
584 | 2
585 | *.MediaView
586 |
587 |
588 |
589 |
590 | 37
591 |
592 |
593 |
594 | %activity_transition
595 | 0
596 | start_fullscreen
597 |
598 |
599 |
600 |
601 | 130
602 |
603 | Fullscreen Activity Transition Screen Brightness Controller
604 |
605 | %priority
606 |
607 | enter_fullscreen
608 |
609 |
610 |
611 |
612 |
613 |
614 | 1565310393511
615 | 1578526746472
616 | 854
617 | com.fstop.photo Activity State Change Responder
618 | 100
619 | 2
620 |
621 | 300
622 |
638 |
639 |
640 | 547
641 | %task_name
642 | com.fstop.photo Activity State Change Responder
643 |
644 |
645 |
646 |
647 |
648 |
649 | 43
650 |
651 |
652 |
653 | %activity_transition
654 | 0
655 | exit_fullscreen
656 |
657 |
658 |
659 |
660 | 130
661 |
662 | Fullscreen Activity Transition Screen Brightness Controller
663 |
664 | %priority
665 |
666 | exit_fullscreen
667 |
668 |
669 |
670 |
671 |
672 | 38
673 |
674 |
675 | 38
676 |
677 |
678 | 300
679 |
680 |
681 |
682 | 547
683 | %activity
684 | %par1
685 |
686 |
687 |
688 |
689 |
690 |
691 | 547
692 | %activity_transition
693 | %par2
694 |
695 |
696 |
697 |
698 |
699 |
700 | 548
701 |
702 | false
703 | %activity
704 | %activity_transition
705 |
706 |
707 |
708 | 105
709 |
710 | false
711 | %activity
712 |
713 |
714 |
715 | 37
716 |
717 |
718 |
719 | %activity
720 | 2
721 | *.activity.ViewImageActivity
722 |
723 |
724 |
725 |
726 | 37
727 |
728 |
729 |
730 | %activity_transition
731 | 0
732 | start_fullscreen
733 |
734 |
735 |
736 |
737 | 130
738 |
739 | Fullscreen Activity Transition Screen Brightness Controller
740 |
741 | %priority
742 |
743 | enter_fullscreen
744 |
745 |
746 |
747 |
748 |
749 |
750 | 1565310393511
751 | 1578526751236
752 | 856
753 | com.android.chrome Activity State Change Responder
754 | 100
755 | 2
756 |
757 | 300
758 |
774 |
775 |
776 | 547
777 | %task_name
778 | com.android.chrome Activity State Change Responder
779 |
780 |
781 |
782 |
783 |
784 |
785 | 43
786 |
787 |
788 | Or
789 |
790 | %activity_transition
791 | 0
792 | exit_fullscreen
793 |
794 |
795 | %activity_transition
796 | 0
797 | config_change_non_fullscreen
798 |
799 |
800 |
801 |
802 | 130
803 |
804 | Fullscreen Activity Transition Screen Brightness Controller
805 |
806 | %priority
807 |
808 | exit_fullscreen
809 |
810 |
811 |
812 |
813 |
814 | 38
815 |
816 |
817 | 38
818 |
819 |
820 | 300
821 |
822 |
823 |
824 | 547
825 | %activity
826 | %par1
827 |
828 |
829 |
830 |
831 |
832 |
833 | 547
834 | %activity_transition
835 | %par2
836 |
837 |
838 |
839 |
840 |
841 |
842 | 548
843 |
844 | false
845 | %activity
846 | %activity_transition
847 |
848 |
849 |
850 | 105
851 |
852 | false
853 | %activity
854 |
855 |
856 |
857 | 37
858 |
859 |
860 | Or
861 |
862 | %activity
863 | 0
864 | org.chromium.chrome.browser.ChromeTabbedActivity
865 |
866 |
867 | %activity
868 | 0
869 | com.google.android.apps.chrome.Main
870 |
871 |
872 |
873 |
874 | 37
875 |
876 |
877 |
878 | %activity_transition
879 | 0
880 | config_change_fullscreen
881 |
882 |
883 |
884 |
885 | 130
886 |
887 | Fullscreen Activity Transition Screen Brightness Controller
888 |
889 | %priority
890 |
891 | enter_fullscreen
892 |
893 |
894 |
895 |
896 |
897 |
898 | 1565310393511
899 | 1578526756730
900 | 857
901 | com.google.android.youtube Activity State Change Responder
902 | 100
903 | 2
904 |
905 | 300
906 |
922 |
923 |
924 | 547
925 | %task_name
926 | com.google.android.youtube Activity State Change Responder
927 |
928 |
929 |
930 |
931 |
932 |
933 | 43
934 |
935 |
936 | Or
937 |
938 | %activity_transition
939 | 0
940 | exit_fullscreen
941 |
942 |
943 | %activity_transition
944 | 0
945 | config_change_non_fullscreen
946 |
947 |
948 |
949 |
950 | 130
951 |
952 | Fullscreen Activity Transition Screen Brightness Controller
953 |
954 | %priority
955 |
956 | exit_fullscreen
957 |
958 |
959 |
960 |
961 |
962 | 38
963 |
964 |
965 | 38
966 |
967 |
968 | 300
969 |
970 |
971 |
972 | 547
973 | %activity
974 | %par1
975 |
976 |
977 |
978 |
979 |
980 |
981 | 547
982 | %activity_transition
983 | %par2
984 |
985 |
986 |
987 |
988 |
989 |
990 | 548
991 |
992 | false
993 | %activity
994 | %activity_transition
995 |
996 |
997 |
998 | 105
999 |
1000 | false
1001 | %activity
1002 |
1003 |
1004 |
1005 | 37
1006 |
1007 |
1008 |
1009 | %activity
1010 | 0
1011 | com.google.android.apps.youtube.app.WatchWhileActivity
1012 |
1013 |
1014 |
1015 |
1016 | 37
1017 |
1018 |
1019 | Or
1020 |
1021 | %activity_transition
1022 | 0
1023 | start_fullscreen
1024 |
1025 |
1026 | %activity_transition
1027 | 0
1028 | config_change_fullscreen
1029 |
1030 |
1031 |
1032 |
1033 | 130
1034 |
1035 | Fullscreen Activity Transition Screen Brightness Controller
1036 |
1037 | %priority
1038 |
1039 | enter_fullscreen
1040 |
1041 |
1042 |
1043 |
1044 |
1045 |
1046 | 1576882993943
1047 | 1578853830354
1048 | 858
1049 | Activity State Change Controller
1050 | 6
1051 | 2
1052 |
1053 | 300
1054 |
1080 |
1081 |
1082 | 547
1083 | %task_name
1084 | Activity State Change Controller
1085 |
1086 |
1087 |
1088 |
1089 |
1090 |
1091 | 547
1092 | %valid_activity_states_regex
1093 | ^start_fullscreen|start_non_fullscreen|config_change_fullscreen|config_change_non_fullscreen$
1094 |
1095 |
1096 |
1097 |
1098 |
1099 |
1100 | 547
1101 | %previous_package_and_activity
1102 | %PreviousPackageAndActivity
1103 |
1104 |
1105 |
1106 |
1107 |
1108 |
1109 | 547
1110 | %PreviousPackageAndActivity
1111 | %current_package_and_activity
1112 |
1113 |
1114 |
1115 |
1116 |
1117 |
1118 | 37
1119 |
1120 |
1121 | %previous_package_and_activity
1122 | 5
1123 | %valid_android_package_and_activity_name_regex
1124 |
1125 |
1126 |
1127 |
1128 | 135
1129 |
1130 |
1131 | Check If Activity State Change Controller Task Exists For Previous Activity End
1132 |
1133 |
1134 | 38
1135 |
1136 |
1137 | 547
1138 | %previous_package
1139 | %previous_package_and_activity
1140 |
1141 |
1142 |
1143 |
1144 |
1145 |
1146 | 598
1147 | %previous_package
1148 | %valid_android_package_and_activity_name_regex
1149 |
1150 |
1151 |
1152 |
1153 |
1154 | $1
1155 |
1156 |
1157 | 547
1158 | %previous_activity
1159 | %previous_package_and_activity
1160 |
1161 |
1162 |
1163 |
1164 |
1165 |
1166 | 598
1167 | %previous_activity
1168 | %valid_android_package_and_activity_name_regex
1169 |
1170 |
1171 |
1172 |
1173 |
1174 | $2
1175 |
1176 |
1177 | 547
1178 | %previous_activity_activity_state_change_controller_task_name
1179 | %previous_package Activity State Change Responder
1180 |
1181 |
1182 |
1183 |
1184 |
1185 |
1186 | 300
1187 |
1188 |
1189 |
1190 | 37
1191 |
1192 |
1193 |
1194 | ,%task_names_list,
1195 | 2
1196 | *,%previous_activity_activity_state_change_controller_task_name,*
1197 |
1198 |
1199 |
1200 |
1201 | 547
1202 | %previous_activity_activity_state_change_controller_task_exists
1203 | 1
1204 |
1205 |
1206 |
1207 |
1208 |
1209 |
1210 | 38
1211 |
1212 |
1213 | 300
1214 |
1215 |
1216 |
1217 | 37
1218 |
1219 |
1220 | And
1221 |
1222 | %current_activity_activity_state_change_controller_task_exists
1223 | 1
1224 | 1
1225 |
1226 |
1227 | %previous_activity_activity_state_change_controller_task_exists
1228 | 1
1229 | 1
1230 |
1231 |
1232 |
1233 |
1234 | 37
1235 |
1236 |
1237 | %enable_debugging
1238 | 0
1239 | 1
1240 |
1241 |
1242 |
1243 |
1244 | 548
1245 | %activity_state_change:
1246 | previous_package_and_activity = "%previous_package_and_activity"
1247 | current_package_and_activity = "%current_package_and_activity"
1248 | previous_activity_state = "%previous_activity_state"
1249 | current_activity_state = "%current_activity_state"
1250 |
1251 |
1252 |
1253 | 123
1254 | false
1255 | echo '%TIME
1256 | %activity_state_change:
1257 | previous_package_and_activity = "%previous_package_and_activity"
1258 | current_package_and_activity = "%current_package_and_activity"
1259 | previous_activity_state = "%previous_activity_state"
1260 | current_activity_state = "%current_activity_state"
1261 |
1262 | ' >> "/storage/emulated/0/activity_state_change"
1263 |
1264 |
1265 |
1266 |
1267 |
1268 |
1269 |
1270 | 38
1271 |
1272 |
1273 | 137
1274 |
1275 |
1276 |
1277 |
1278 | 547
1279 | %activity_state_change_command
1280 | %par1
1281 |
1282 |
1283 |
1284 |
1285 |
1286 |
1287 | 38
1288 |
1289 |
1290 | 300
1291 |
1292 |
1293 |
1294 | 37
1295 |
1296 |
1297 | %previous_activity_state
1298 | 5
1299 | %valid_activity_states_regex
1300 |
1301 |
1302 |
1303 |
1304 | 548
1305 | Invalid previous_activity_state = "%previous_activity_state"
1306 |
1307 |
1308 |
1309 | %previous_activity_state
1310 | 1
1311 | \%PreviousActivityState
1312 |
1313 |
1314 |
1315 |
1316 | 547
1317 |
1318 | %current_activity_task_activity_transition_par
1319 | %current_activity_state
1320 |
1321 |
1322 |
1323 |
1324 |
1325 |
1326 | 135
1327 |
1328 |
1329 | Find Activity Transition Parameters End
1330 |
1331 |
1332 | 38
1333 |
1334 |
1335 | 37
1336 |
1337 |
1338 |
1339 | %current_package_and_activity
1340 | 0
1341 | %previous_package_and_activity
1342 |
1343 |
1344 |
1345 |
1346 | 37
1347 |
1348 |
1349 |
1350 | %current_activity_state
1351 | 0
1352 | start_fullscreen
1353 |
1354 |
1355 |
1356 |
1357 | 547
1358 |
1359 | %current_activity_task_activity_transition_par
1360 | restart_fullscreen
1361 |
1362 |
1363 |
1364 |
1365 |
1366 |
1367 | 590
1368 | %activity_state_change_command
1369 | %newline
1370 |
1371 |
1372 |
1373 | 43
1374 |
1375 |
1376 |
1377 | %current_activity_state
1378 | 0
1379 | start_non_fullscreen
1380 |
1381 |
1382 |
1383 |
1384 | 547
1385 |
1386 | %current_activity_task_activity_transition_par
1387 | restart_non_fullscreen
1388 |
1389 |
1390 |
1391 |
1392 |
1393 |
1394 | 43
1395 |
1396 |
1397 | And
1398 |
1399 | %current_activity_state
1400 | 0
1401 | config_change_fullscreen
1402 |
1403 |
1404 | %previous_activity_state
1405 | 0
1406 | config_change_fullscreen
1407 |
1408 |
1409 |
1410 |
1411 | 547
1412 |
1413 | %current_activity_task_activity_transition_par
1414 | config_rechange_fullscreen
1415 |
1416 |
1417 |
1418 |
1419 |
1420 |
1421 | 43
1422 |
1423 |
1424 |
1425 | %current_activity_state
1426 | 0
1427 | config_change_fullscreen
1428 |
1429 |
1430 |
1431 |
1432 | 547
1433 |
1434 | %current_activity_task_activity_transition_par
1435 | config_change_fullscreen
1436 |
1437 |
1438 |
1439 |
1440 |
1441 |
1442 | 43
1443 |
1444 |
1445 | And
1446 |
1447 | %current_activity_state
1448 | 0
1449 | config_change_non_fullscreen
1450 |
1451 |
1452 | %previous_activity_state
1453 | 0
1454 | config_change_non_fullscreen
1455 |
1456 |
1457 |
1458 |
1459 | 547
1460 |
1461 | %current_activity_task_activity_transition_par
1462 | config_rechange_non_fullscreen
1463 |
1464 |
1465 |
1466 |
1467 |
1468 |
1469 | 43
1470 |
1471 |
1472 |
1473 | %current_activity_state
1474 | 0
1475 | config_change_non_fullscreen
1476 |
1477 |
1478 |
1479 |
1480 | 547
1481 |
1482 | %current_activity_task_activity_transition_par
1483 | config_change_non_fullscreen
1484 |
1485 |
1486 |
1487 |
1488 |
1489 |
1490 | 137
1491 |
1492 |
1493 |
1494 |
1495 | %activity_state_change_command(#)
1496 | 1
1497 | 2
1498 |
1499 |
1500 |
1501 |
1502 | 43
1503 |
1504 |
1505 | 548
1506 | current_activity_task_activity_transition_par Not Handled For Same Activity Start
1507 | previous_package_and_activity = "%previous_package_and_activity"
1508 | current_package_and_activity = "%current_package_and_activity"
1509 | previous_activity_state = "%previous_activity_state"
1510 | current_activity_state = "%current_activity_state"
1511 | %task_name Failed.
1512 |
1513 |
1514 |
1515 | 137
1516 |
1517 |
1518 |
1519 |
1520 | 38
1521 |
1522 |
1523 | 43
1524 |
1525 |
1526 | 37
1527 |
1528 |
1529 |
1530 | %current_activity_state
1531 | 0
1532 | start_fullscreen
1533 |
1534 |
1535 |
1536 |
1537 | 547
1538 |
1539 | %current_activity_task_activity_transition_par
1540 | start_fullscreen
1541 |
1542 |
1543 |
1544 |
1545 |
1546 |
1547 | 43
1548 |
1549 |
1550 |
1551 | %current_activity_state
1552 | 0
1553 | start_non_fullscreen
1554 |
1555 |
1556 |
1557 |
1558 | 547
1559 |
1560 | %current_activity_task_activity_transition_par
1561 | start_non_fullscreen
1562 |
1563 |
1564 |
1565 |
1566 |
1567 |
1568 | 43
1569 |
1570 |
1571 | And
1572 | Or2
1573 |
1574 | %current_activity_state
1575 | 0
1576 | config_change_fullscreen
1577 |
1578 |
1579 | %previous_activity_state
1580 | 0
1581 | start_non_fullscreen
1582 |
1583 |
1584 | %previous_activity_state
1585 | 0
1586 | start_fullscreen
1587 |
1588 |
1589 |
1590 |
1591 | 547
1592 | %current_package_and_activity
1593 | %activity_state_change_command(1)
1594 |
1595 |
1596 |
1597 |
1598 |
1599 |
1600 | 547
1601 |
1602 | %current_activity_task_activity_transition_par
1603 | config_change_fullscreen
1604 |
1605 |
1606 |
1607 |
1608 |
1609 |
1610 | 43
1611 |
1612 |
1613 | And
1614 | Or2
1615 |
1616 | %current_activity_state
1617 | 0
1618 | config_change_non_fullscreen
1619 |
1620 |
1621 | %previous_activity_state
1622 | 0
1623 | start_non_fullscreen
1624 |
1625 |
1626 | %previous_activity_state
1627 | 0
1628 | start_fullscreen
1629 |
1630 |
1631 |
1632 |
1633 | 547
1634 |
1635 | %current_activity_task_activity_transition_par
1636 | config_change_non_fullscreen
1637 |
1638 |
1639 |
1640 |
1641 |
1642 |
1643 | 43
1644 |
1645 |
1646 | Or
1647 |
1648 | %current_activity_state
1649 | 0
1650 | config_change_fullscreen
1651 |
1652 |
1653 | %current_activity_state
1654 | 0
1655 | config_change_non_fullscreen
1656 |
1657 |
1658 |
1659 |
1660 | 300
1661 |
1662 |
1663 |
1664 | 548
1665 | false
1666 | current_package_and_activity Does Not Match A Valid Activity Transition
1667 | previous_package_and_activity = "%previous_package_and_activity"
1668 | current_package_and_activity = "%current_package_and_activity"
1669 | previous_activity_state = "%previous_activity_state"
1670 | current_activity_state = "%current_activity_state"
1671 | %task_name Cancelled.
1672 |
1673 |
1674 |
1675 | 137
1676 |
1677 |
1678 |
1679 |
1680 | 43
1681 |
1682 |
1683 | 548
1684 | current_activity_task_activity_transition_par Not Handled For Different Activity Start
1685 | previous_package_and_activity = "%previous_package_and_activity"
1686 | current_package_and_activity = "%current_package_and_activity"
1687 | previous_activity_state = "%previous_activity_state"
1688 | current_activity_state = "%current_activity_state"
1689 | %task_name Failed.
1690 |
1691 |
1692 |
1693 | 137
1694 |
1695 |
1696 |
1697 |
1698 | 547
1699 | %activity_state_change
1700 | %activity_state_change_command(2)
1701 |
1702 |
1703 |
1704 |
1705 |
1706 |
1707 | 38
1708 |
1709 |
1710 | 135
1711 |
1712 |
1713 | Find Activity Transition Parameters End
1714 |
1715 |
1716 | %previous_activity_activity_state_change_controller_task_exists
1717 | 1
1718 | 1
1719 |
1720 |
1721 |
1722 |
1723 | 37
1724 |
1725 |
1726 | Or
1727 |
1728 | %previous_activity_state
1729 | 0
1730 | start_fullscreen
1731 |
1732 |
1733 | %previous_activity_state
1734 | 0
1735 | config_change_fullscreen
1736 |
1737 |
1738 |
1739 |
1740 | 547
1741 |
1742 | %previous_activity_task_activity_transition_par
1743 | exit_fullscreen
1744 |
1745 |
1746 |
1747 |
1748 |
1749 |
1750 | 43
1751 |
1752 |
1753 | Or
1754 |
1755 | %previous_activity_state
1756 | 0
1757 | start_non_fullscreen
1758 |
1759 |
1760 | %previous_activity_state
1761 | 0
1762 | config_change_non_fullscreen
1763 |
1764 |
1765 |
1766 |
1767 | 547
1768 |
1769 | %previous_activity_task_activity_transition_par
1770 | exit_non_fullscreen
1771 |
1772 |
1773 |
1774 |
1775 |
1776 |
1777 | 43
1778 |
1779 |
1780 | 548
1781 | previous_activity_task_activity_transition_par Not Handled For Different Activity Start
1782 | previous_package_and_activity = "%previous_package_and_activity"
1783 | current_package_and_activity = "%current_package_and_activity"
1784 | previous_activity_state = "%previous_activity_state"
1785 | current_activity_state = "%current_activity_state"
1786 | %task_name Failed.
1787 |
1788 |
1789 |
1790 | 137
1791 |
1792 |
1793 |
1794 |
1795 | 38
1796 |
1797 |
1798 | 300
1799 |
1800 |
1801 |
1802 | 38
1803 |
1804 |
1805 | 300
1806 |
1807 |
1808 |
1809 | 37
1810 |
1811 |
1812 | %enable_debugging
1813 | 0
1814 | 1
1815 |
1816 |
1817 |
1818 |
1819 | 548
1820 | activity_state_change:
1821 | previous_package_and_activity = "%previous_package_and_activity"
1822 | current_package_and_activity = "%current_package_and_activity"
1823 | previous_activity_state = "%previous_activity_state"
1824 | current_activity_state = "%current_activity_state"
1825 | previous_activity_task_activity_transition_par = "%previous_activity_task_activity_transition_par"
1826 | current_activity_task_activity_transition_par = "%current_activity_task_activity_transition_par"
1827 |
1828 |
1829 |
1830 | 123
1831 | false
1832 | echo '%TIME
1833 | %activity_state_change:
1834 | previous_package_and_activity = "%previous_package_and_activity"
1835 | current_package_and_activity = "%current_package_and_activity"
1836 | previous_activity_state = "%previous_activity_state"
1837 | current_activity_state = "%current_activity_state"
1838 | previous_activity_task_activity_transition_par = "%previous_activity_task_activity_transition_par"
1839 | current_activity_task_activity_transition_par = "%current_activity_task_activity_transition_par"
1840 |
1841 | ' >> "/storage/emulated/0/activity_state_change"
1842 |
1843 |
1844 |
1845 |
1846 |
1847 |
1848 |
1849 | 38
1850 |
1851 |
1852 | 37
1853 |
1854 |
1855 | And
1856 |
1857 | %previous_activity_activity_state_change_controller_task_exists
1858 | 0
1859 | 1
1860 |
1861 |
1862 | %previous_activity_task_activity_transition_par
1863 | 12
1864 |
1865 |
1866 |
1867 |
1868 |
1869 | 130
1870 | %previous_activity_activity_state_change_controller_task_name
1871 |
1872 | %priority
1873 |
1874 | %previous_activity
1875 | %previous_activity_task_activity_transition_par
1876 |
1877 |
1878 |
1879 |
1880 | 38
1881 |
1882 |
1883 | 37
1884 |
1885 |
1886 |
1887 | %current_activity_activity_state_change_controller_task_exists
1888 | 0
1889 | 1
1890 |
1891 |
1892 |
1893 |
1894 | 547
1895 |
1896 | %current_package_and_activity
1897 | %PreviousPackageAndActivity
1898 |
1899 |
1900 |
1901 |
1902 |
1903 |
1904 | %activity_state_change
1905 | 0
1906 | activity_config_change
1907 |
1908 |
1909 |
1910 |
1911 | 130
1912 | %current_activity_activity_state_change_controller_task_name
1913 |
1914 | %priority
1915 |
1916 | %current_activity
1917 | %current_activity_task_activity_transition_par
1918 |
1919 |
1920 |
1921 |
1922 | 38
1923 |
1924 |
1925 | 548
1926 | false
1927 | "
1928 | %current_package_and_activity
1929 | %activity_state_change
1930 | "
1931 |
1932 |
1933 |
1934 | 300
1935 |
1936 |
1937 |
1938 | 37
1939 |
1940 |
1941 | %current_package_and_activity
1942 | 5
1943 | %valid_android_package_and_activity_name_regex
1944 |
1945 |
1946 |
1947 |
1948 | 548
1949 | Invalid current_package_and_activity = "%current_package_and_activity"
1950 |
1951 |
1952 |
1953 | %current_package_and_activity
1954 | 1
1955 | \%PreviousPackageAndActivity
1956 |
1957 |
1958 |
1959 |
1960 | 137
1961 |
1962 |
1963 |
1964 |
1965 | 38
1966 |
1967 |
1968 | 547
1969 | %current_package
1970 | %current_package_and_activity
1971 |
1972 |
1973 |
1974 |
1975 |
1976 |
1977 | 598
1978 | %current_package
1979 | %valid_android_package_and_activity_name_regex
1980 |
1981 |
1982 |
1983 |
1984 |
1985 | $1
1986 |
1987 |
1988 | 547
1989 | %current_activity
1990 | %current_package_and_activity
1991 |
1992 |
1993 |
1994 |
1995 |
1996 |
1997 | 598
1998 | %current_activity
1999 | %valid_android_package_and_activity_name_regex
2000 |
2001 |
2002 |
2003 |
2004 |
2005 | $2
2006 |
2007 |
2008 | 300
2009 |
2010 |
2011 |
2012 | 37
2013 |
2014 |
2015 |
2016 | %activity_state_change
2017 | 0
2018 | activity_start
2019 |
2020 |
2021 |
2022 |
2023 | 547
2024 |
2025 | %use_root_mode
2026 | 1
2027 |
2028 |
2029 |
2030 |
2031 |
2032 |
2033 | 30
2034 |
2035 |
2036 |
2037 |
2038 |
2039 |
2040 |
2041 | 43
2042 |
2043 |
2044 |
2045 | %activity_state_change
2046 | 0
2047 | activity_config_change
2048 |
2049 |
2050 |
2051 |
2052 | 30
2053 |
2054 |
2055 |
2056 |
2057 |
2058 |
2059 |
2060 | 43
2061 |
2062 |
2063 | 548
2064 | activity_state_change "%activity_state_change" Not Handled
2065 | %task_name Failed.
2066 |
2067 |
2068 |
2069 | 137
2070 |
2071 |
2072 |
2073 |
2074 | 38
2075 |
2076 |
2077 | 300
2078 |
2079 |
2080 |
2081 | 300
2082 |
2083 |
2084 |
2085 | 547
2086 | %current_activity_is_fullscreen
2087 | 0
2088 |
2089 |
2090 |
2091 |
2092 |
2093 |
2094 | 547
2095 |
2096 | false
2097 | %enable_debugging
2098 | 1
2099 |
2100 |
2101 |
2102 |
2103 |
2104 |
2105 | 37
2106 |
2107 | And
2108 |
2109 | %ROOT
2110 | 0
2111 | yes
2112 |
2113 |
2114 | %use_root_mode
2115 | 0
2116 | 1
2117 |
2118 |
2119 |
2120 |
2121 | 123
2122 | false
2123 | dumpsys window policy | grep mTopIsFullscreen | sed -E 's/.*mTopIsFullscreen=([^ ]+) .*/\1/'
2124 |
2125 |
2126 | %mtopisfullscreen
2127 | %errors
2128 |
2129 |
2130 |
2131 | 37
2132 |
2133 | Or
2134 |
2135 | %err
2136 | 12
2137 | yes
2138 |
2139 |
2140 | %errors
2141 | 12
2142 |
2143 |
2144 |
2145 |
2146 |
2147 | 548
2148 | Failed To Check If Current Activity Is Fullscreen From dumpsys
2149 |
2150 | mtopisfullscreen =
2151 | "
2152 | %mtopisfullscreen
2153 | "
2154 |
2155 | errors =
2156 | "
2157 | %errors
2158 | "
2159 |
2160 |
2161 |
2162 | 137
2163 |
2164 |
2165 |
2166 |
2167 | 38
2168 |
2169 |
2170 | 547
2171 |
2172 | %current_activity_is_fullscreen
2173 | 1
2174 |
2175 |
2176 |
2177 |
2178 |
2179 |
2180 | %mtopisfullscreen
2181 | 0
2182 | true
2183 |
2184 |
2185 |
2186 |
2187 | 43
2188 |
2189 |
2190 | 123
2191 | false
2192 | logcat -d StatusBar:D PhoneStatusBar:D *:S
2193 |
2194 |
2195 | %logcat
2196 | %errors
2197 |
2198 |
2199 |
2200 | 37
2201 |
2202 | Or
2203 |
2204 | %err
2205 | 12
2206 | yes
2207 |
2208 |
2209 | %errors
2210 | 12
2211 |
2212 |
2213 |
2214 |
2215 |
2216 | 300
2217 |
2218 |
2219 |
2220 | 548
2221 | Failed To Check If Current Activity Is Fullscreen From logcat
2222 |
2223 | output =
2224 | "
2225 | %logcat
2226 | "
2227 |
2228 | errors =
2229 | "
2230 | %errors
2231 | "
2232 |
2233 |
2234 |
2235 | 137
2236 |
2237 |
2238 |
2239 |
2240 | 38
2241 |
2242 |
2243 | 135
2244 |
2245 |
2246 | Check If Current Activity Is In Fullscreen Mode End
2247 |
2248 |
2249 | %logcat
2250 | 13
2251 |
2252 |
2253 |
2254 |
2255 |
2256 | 548
2257 | false
2258 | %logcat
2259 | %errors
2260 |
2261 |
2262 |
2263 | 598
2264 | %logcat
2265 | .*StatusBar: setSystemUiVisibility.*
2266 |
2267 |
2268 |
2269 | %setsystemuivisibility_log_entries
2270 |
2271 |
2272 |
2273 |
2274 | %logcat
2275 | 12
2276 |
2277 |
2278 |
2279 |
2280 |
2281 | 548
2282 | false
2283 | %setsystemuivisibility_log_entries()
2284 |
2285 |
2286 |
2287 | 135
2288 |
2289 |
2290 | Check If Current Activity Is In Fullscreen Mode End
2291 |
2292 |
2293 | %setsystemuivisibility_log_entries(#)
2294 | 0
2295 | 0
2296 |
2297 |
2298 |
2299 |
2300 | 547
2301 | %setsystemuivisibility_last_log_entry
2302 | %setsystemuivisibility_log_entries(<)
2303 |
2304 |
2305 |
2306 |
2307 |
2308 |
2309 | 548
2310 | false
2311 | %setsystemuivisibility_log_entries(#)
2312 |
2313 |
2314 |
2315 | 547
2316 | %newline
2317 |
2318 |
2319 |
2320 |
2321 |
2322 |
2323 |
2324 |
2325 | 548
2326 | false
2327 | %setsystemuivisibility_last_log_entry
2328 |
2329 |
2330 |
2331 | 598
2332 | %setsystemuivisibility_last_log_entry
2333 | .*newVal=([^ ]+) .*
2334 |
2335 |
2336 |
2337 |
2338 |
2339 | $1
2340 |
2341 |
2342 | %setsystemuivisibility_last_log_entry
2343 | 12
2344 | 0
2345 |
2346 |
2347 |
2348 |
2349 | 548
2350 | false
2351 | %setsystemuivisibility_last_log_entry
2352 |
2353 |
2354 |
2355 | 547
2356 | %system_ui_visibility
2357 | %setsystemuivisibility_last_log_entry
2358 |
2359 |
2360 |
2361 |
2362 |
2363 |
2364 | 135
2365 |
2366 |
2367 | Check If Current Activity Is In Fullscreen Mode End
2368 |
2369 |
2370 | %system_ui_visibility
2371 | 5
2372 | ^[0-9a-fA-F]+$
2373 |
2374 |
2375 |
2376 |
2377 | 547
2378 | %system_ui_visibility
2379 | 0x%setsystemuivisibility_last_log_entry
2380 |
2381 |
2382 |
2383 |
2384 |
2385 |
2386 | 123
2387 |
2389 | false
2390 | echo "$(( %system_ui_visibility & 6 ))"
2391 |
2392 |
2393 | %system_ui_visibility_fullscreen_and
2394 |
2395 |
2396 |
2397 |
2398 | 135
2399 |
2400 |
2401 | Check If Current Activity Is In Fullscreen Mode End
2402 |
2403 | Or
2404 |
2405 | %err
2406 | 12
2407 | ^[0-9]+$
2408 |
2409 |
2410 | %errors
2411 | 12
2412 |
2413 |
2414 |
2415 |
2416 |
2417 | 123
2418 |
2420 | false
2421 | false
2422 | echo "$(( %system_ui_visibility & 6144 ))"
2423 |
2424 |
2425 | %system_ui_visibility_immersive_and
2426 |
2427 |
2428 |
2429 |
2430 | 135
2431 | false
2432 |
2433 |
2434 | Check If Current Activity Is In Fullscreen Mode End
2435 |
2436 | Or
2437 |
2438 | %err
2439 | 12
2440 | ^[0-9]+$
2441 |
2442 |
2443 | %errors
2444 | 12
2445 |
2446 |
2447 |
2448 |
2449 |
2450 | 547
2451 | %valid_android_package_name_regex
2452 | ^(?:[A-Za-z]{1}[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*$
2453 |
2454 |
2455 |
2456 |
2457 |
2458 |
2459 | 548
2460 | false
2461 | %system_ui_visibility_fullscreen_and
2462 | %system_ui_visibility_immersive_and
2463 | %current_activity_is_fullscreen
2464 |
2465 |
2466 |
2467 | 547
2468 |
2472 | %current_activity_is_fullscreen
2473 | 1
2474 |
2475 |
2476 |
2477 |
2478 |
2479 |
2480 | %system_ui_visibility_fullscreen_and
2481 | 1
2482 | 0
2483 |
2484 |
2485 |
2486 |
2487 | 38
2488 |
2489 |
2490 | 300
2491 |
2492 |
2493 |
2494 | 300
2495 |
2496 |
2497 |
2498 | 37
2499 |
2500 |
2501 |
2502 | %activity_state_change
2503 | 0
2504 | activity_start
2505 |
2506 |
2507 |
2508 |
2509 | 37
2510 |
2511 |
2512 |
2513 | %current_activity_is_fullscreen
2514 | 0
2515 | 1
2516 |
2517 |
2518 |
2519 |
2520 | 547
2521 |
2522 | %current_activity_state
2523 | start_fullscreen
2524 |
2525 |
2526 |
2527 |
2528 |
2529 |
2530 | 43
2531 |
2532 |
2533 | 547
2534 |
2535 | %current_activity_state
2536 | start_non_fullscreen
2537 |
2538 |
2539 |
2540 |
2541 |
2542 |
2543 | 547
2544 | %valid_android_activity_name_regex
2545 | ^(?:\.)?\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*(?:\.\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*)*$
2546 |
2547 |
2548 |
2549 |
2550 |
2551 |
2552 | 38
2553 |
2554 |
2555 | 43
2556 |
2557 |
2558 |
2559 | %activity_state_change
2560 | 0
2561 | activity_config_change
2562 |
2563 |
2564 |
2565 |
2566 | 37
2567 |
2568 |
2569 |
2570 | %current_activity_is_fullscreen
2571 | 0
2572 | 1
2573 |
2574 |
2575 |
2576 |
2577 | 547
2578 |
2579 | %current_activity_state
2580 | config_change_fullscreen
2581 |
2582 |
2583 |
2584 |
2585 |
2586 |
2587 | 43
2588 |
2589 |
2590 | 547
2591 |
2592 | %current_activity_state
2593 | config_change_non_fullscreen
2594 |
2595 |
2596 |
2597 |
2598 |
2599 |
2600 | 38
2601 |
2602 |
2603 | 38
2604 |
2605 |
2606 | 547
2607 | %previous_activity_state
2608 | %PreviousActivityState
2609 |
2610 |
2611 |
2612 |
2613 |
2614 |
2615 | 547
2616 | %PreviousActivityState
2617 | %current_activity_state
2618 |
2619 |
2620 |
2621 |
2622 |
2623 |
2624 | 547
2625 | %valid_android_package_and_activity_name_regex
2626 | ^((?:[A-Za-z]{1}[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*)/((?:\.)?\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*(?:\.\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*)*)$
2627 |
2628 |
2629 |
2630 |
2631 |
2632 |
2633 | 300
2634 |
2635 |
2636 |
2637 | 347
2638 |
2639 |
2640 | %task_names_list
2641 |
2642 |
2643 | 592
2644 | %task_names_list
2645 | ,
2646 |
2647 |
2648 |
2649 | 300
2650 |
2651 |
2652 |
2653 | 547
2654 | %current_activity_activity_state_change_controller_task_name
2655 | %current_package Activity State Change Responder
2656 |
2657 |
2658 |
2659 |
2660 |
2661 |
2662 | 37
2663 |
2664 |
2665 |
2666 | ,%task_names_list,
2667 | 2
2668 | *,%current_activity_activity_state_change_controller_task_name,*
2669 |
2670 |
2671 |
2672 |
2673 | 547
2674 | %current_activity_activity_state_change_controller_task_exists
2675 | 1
2676 |
2677 |
2678 |
2679 |
2680 |
2681 |
2682 | 38
2683 |
2684 |
2685 | 300
2686 |
2687 |
2688 |
2689 | 300
2690 |
2691 |
2692 |
2693 |
2694 | 1578341470419
2695 | 1578467034405
2696 | 860
2697 | 6
2698 |
2699 | 130
2700 |
2701 | Activity State Change Controller
2702 |
2703 | %priority
2704 |
2705 | %ActivityStateChangeControllerCommand
2706 |
2707 |
2708 |
2709 |
2710 |
2711 |
2712 | 1578402483159
2713 | 1578515880409
2714 | 864
2715 | Fullscreen Activity Transition Screen Brightness Controller
2716 | 2
2717 |
2718 | 300
2719 |
2740 |
2741 |
2742 | 547
2743 | %valid_display_brightness_regex
2744 | ^([0-9]{1,2}|1[0-9]{1,2}|2[0-4][0-9]|25[0-5])$
2745 |
2746 |
2747 |
2748 |
2749 |
2750 |
2751 | 549
2752 | false
2753 | %PreviousFullscreenBrightnessValue
2754 |
2755 |
2756 |
2757 |
2758 |
2759 | 38
2760 |
2761 |
2762 | 43
2763 |
2764 |
2765 | %action
2766 | 0
2767 | exit_fullscreen
2768 |
2769 |
2770 |
2771 |
2772 | 547
2773 |
2774 | %brightness_level_to_set
2775 | %PreviousFullscreenBrightnessValue
2776 |
2777 |
2778 |
2779 |
2780 |
2781 |
2782 | 37
2783 |
2784 | And
2785 |
2786 | %brightness_level_to_set
2787 | 4
2788 | %valid_display_brightness_regex
2789 |
2790 |
2791 | %brightness_level_to_set
2792 | 1
2793 | %BRIGHT
2794 |
2795 |
2796 |
2797 |
2798 | 548
2799 | Resetting Brightness To "%brightness_level_to_set"
2800 |
2801 |
2802 |
2803 | 810
2804 |
2805 | %brightness_level_to_set
2806 |
2807 |
2808 |
2809 |
2810 |
2811 |
2812 | 38
2813 |
2814 |
2815 | 38
2816 |
2817 |
2818 | 126
2819 | 0
2820 |
2821 |
2822 |
2823 | 547
2824 | %action
2825 | %par1
2826 |
2827 |
2828 |
2829 |
2830 |
2831 |
2832 | 37
2833 |
2834 |
2835 | %action
2836 | 0
2837 | enter_fullscreen
2838 |
2839 |
2840 |
2841 |
2842 | 547
2843 |
2844 | %brightness_level_to_set
2845 | 194
2846 |
2847 |
2848 |
2849 |
2850 |
2851 |
2852 | 37
2853 |
2854 |
2855 | And
2856 |
2857 | %BRIGHT
2858 | 6
2859 | %brightness_level_to_set
2860 |
2861 |
2862 | %BATT
2863 | 7
2864 | 20
2865 |
2866 |
2867 |
2868 |
2869 | 548
2870 | Setting Brightness To "%brightness_level_to_set"
2871 |
2872 |
2873 |
2874 | 547
2875 | %PreviousFullscreenBrightnessValue
2876 | %BRIGHT
2877 |
2878 |
2879 |
2880 |
2881 |
2882 |
2883 | 810
2884 |
2885 | %brightness_level_to_set
2886 |
2887 |
2888 |
2889 |
2890 |
2891 |
2892 | 43
2893 |
2894 |
2895 |
2896 | 1575359655233
2897 | 1578787822122
2898 | 869
2899 | Get Activity_State_Changes Tasker Project Version Number
2900 | 2
2901 |
2902 | 300
2903 |
2912 |
2913 |
2914 | 547
2915 | %version_number
2916 | 0.2.0
2917 |
2918 |
2919 |
2920 |
2921 |
2922 |
2923 | 126
2924 | %version_number
2925 |
2926 |
2927 |
2928 |
2929 |
--------------------------------------------------------------------------------