Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO James #4

Open
9 tasks
Osiris-Team opened this issue Jul 19, 2023 · 31 comments
Open
9 tasks

TODO James #4

Osiris-Team opened this issue Jul 19, 2023 · 31 comments

Comments

@Osiris-Team
Copy link
Owner

Osiris-Team commented Jul 19, 2023

Pending

Open Launcher

  • Add Work Mode support, it is an open issue on the main repo.
  • FIX: The only issue I noticed, is that when cloning an app to the work profile, OpenLauncher fails to show the new app in the app drawer and requires a restart to do so.

Notally (https://github.com/OmGodse/Notally)

  • An option to automatically delete an entry entry upon close. Same vane as with OpenContact i.e work with the upstream team.
  • An option to move the make options to the top.
  • Render the make options within a label.
  • Ability to Share a label.
  • Ability to perform bulk actions e.g.
    Delete or Export -> TEXT -> Share
  • The ability to nest Labels e.g.
XXXXX
  YYYY
   S
    U
  ZZZZ
   V
    I

Work sessions

13.05.2024

Took 2h 0min (120 min), from 15:00 until 17:00

  • started work on bulk operations
  • bottom right icons now change if is in bulk-operation mode
  • requested more details for other tasks via email

Total work time: 120 min

Show/Hide template

DAY.MONTH.YEAR

Took HOURS h MINUTES min (TOTAL_MINUTES min), from START_TIME until END_TIME

  • TASK
@Osiris-Team
Copy link
Owner Author

Osiris-Team commented Jul 22, 2023

Older work sessions

12.2023

01.12.2023

Took 2h 10min (130 min), from 12:40 until 14:50

09.12.2023

Took 2h 30min (150 min), from 17:00 until 19:30

09.2023

05.09.2023

Took 6h 10min (370 min), from 14:00 until 20:10

14.09.2023

Took 3h 40min (220 min), from 9:30 until 13:10

  • Draw additional user icon with red circle as background in the bottom right corner of original app icon.
    • image
  • Create detailed tasks on what still needs to be done for work-profile/multi-user support.
  • When clicking on app of another profile prompt user to switch to that profile before opening the app.

15.09.2023

Took 5h 06min (306 min), from 10:00 until 15:06

  • Dimm the user/profile icon when that profile is currently not active.
    • Will not implement this because it would require admin rights to listen to profile change events, or to refresh the apps list every time before it is shown.
  • Add settings section named "Users" which displays all users/profiles available and allow to select custom color for each profile.
    • image
    • image
    • I had to use buttons instead of the default ColorPickerPreference because that could not be added dynamically to the preference fragment (meaning via new ColorPickerPreference). It trew Nullpointer errors which I fixed, but then resulted in the actual color button/circle not being shown.
  • Set a random color for the profile if none is set yet.

16.09.2023

Took 4h 00min (240 min), from 19:00 until 23:00

  • FIX: User profile icon getting removed when dragging app to desktop.
  • TEST: Does user profile work when app in folder?
    • Partially it seems. The icon seems to be right, but when clicking the app it tries to open it with the default profile instead of its actual profile.

17.09.2023

Took 1h 40min (100 min), from 17:00 until 18:40

  • FIX: Toast message showing handle of current user instead of app owner handle, when demanding to switch users.
  • FIX: All apps in the desktops' folders, open with default profile, instead of actual one.
  • FIX: User profile icon getting reset when restarting the app.
    • Seems this was fixed as a side-effect of a previous fix.
  • TEST: If user profile icons are kept after rebooting the device.
    • Seems to work, however only tested this on a virtual device and am unsure if it actually properly shuts down.
  • FIX: Icons in desktop folders being gray circles first and then getting removed, upon reloading the launcher.
    • Unable to reproduce, after above fixes. Tried restarting in launcher settings, via Advanced > Restart, and by force stopping the launcher in the android settings.

25.09.2023

Took 2h 15min (135 min), from 15:00 until 17:15

  • FIX: If app is only installed on work user, it asks you to switch to the default user, when trying to start that app.
    • Prompt for changing the user now only exists for Android versions smaller than Oreo/8. Otherwise, simply launch the app and hope that the work profile starts it with the correct user / work profile.
  • TEST: Does it show apps cloned by Shelter, in the app-drawer? Do the icons stay on the desktop and in the desktop folders? Yes, tested on Android 7.0 and 12.0.

08.2023

21.08.2023

Took 4h 43min (283 min), from 13:25 until 18:08

  • Locking the desktop hides the "Widget" and "Action" tiles.
    • Partially done: Somehow the visibility change gets ignored at app start, even though the
      related code gets executed, probably due to the view holder changing later.

25.08.2023

Took 2h 29min (149 min), from 10:37 until 13:06

07.2023

01.07.2023

Took 4 h 20 min (260 min), from 12:25 until 16:45

13.07.2023

Took 1h 3min (63 min), from 21:03 until 22:06

19.07.2023

Took 5h 12min (312 min), from 12:23 until 17:35

20.07.2023

Took 3h 35min (215 min), from 10:42 until 14:17

22.07.2023

Took 1h 27min (87 min), from 11:06 until 12:33

06.2023

28.06.2023

Took 2 h 35 min (155 min), from 20:10 until 22:45.

  • Vertical App Drawer mode supports label colours.
  • Selecting an item within the App Drawer brings up an additional item
    to hide said application alongside the current "Uninstall" / "Info" options.

29.06.2023

Took 2 h 20 min (140 min), from 12:15 until 14:35

  • Hiding an application only impacts the app drawer.

30.06.2023

Took 1 h 50 min (110 min), from 12:30 until 14:20 + Took 3 h 30 min (210 min), from 17:20 until 20:50

  • Fix: Items in desktop groups/folders getting hidden. 0567afc2590860b00d5dba76adb77cf2e0b48ea0
  • Fix: On restore success shows the wrong toast message.
  • Work on "backup/restore views follow primary colour", details: TODO openlauncher#1 (comment)

@User2564
Copy link
Contributor

User2564 commented Jul 24, 2023

@Osiris-Team,

Apologies for the delay.

Open Lanucher

  • Locking the desktop hides the "Widget" and "Action" tiles.
  • If there is only a single page then the "Remove" and "Home" desktop tiles are hidden.
  • The Search bar and Date Format are decoupled.
  • Date Format / Custom Format Lines can be moved into the center rather than the current hard left.
  • HH:MM:SS within Custom Format Lines reflects the system time rather than some known clock. e.g. status bar time is; 21:32:16 while the later is shown as 21:07:012
  • Add Work Mode support, it is an open issue on the main repo.


Notally (https://github.com/OmGodse/Notally)

  • An option to automatically delete an entry entry upon close. Same vane as with OpenContact i.e work with the upstream team.

How would you feel about creating an application from scratch?

@Osiris-Team
Copy link
Owner Author

@User2564 Sure, send me the details.

@User2564
Copy link
Contributor

User2564 commented Jul 26, 2023

@Osiris-Team, the ideal is probably a very long shot; a Android application to replace a garage remote which can be configured either via virtual dip switches or by capturing the signal from a unit.

Most of the playstore "options" are designed to work with "smart" garage doors.

More useful set of options, would probably be:

  • A terminal that can execute root commands
  • A battery application that can:
  • Show stats on the lock-screen
  • Allow for user configurable logging, especially during charging.
  • The ability to stop the battery from charging past a user configurable point.
  • Reset the file used to estimate / calibrate the battery.

If possible both should support Shuzuku.

@Osiris-Team
Copy link
Owner Author

@User2564 I did some research:

@Osiris-Team, the ideal is probably a very long shot; a Android application to replace a garage remote which can be configured either via virtual dip switches or by capturing the signal from a unit.

Most of the playstore "options" are designed to work with "smart" garage doors.

This should be possible. Details further below.

More useful set of options, would probably be:

  • A terminal that can execute root commands

https://play.google.com/store/apps/details?id=com.termux

  • A battery application that can:
  • Show stats on the lock-screen

https://play.google.com/store/apps/details?id=com.gombosdev.ampere

  • Allow for user configurable logging, especially during charging.

Not sure what this is. Instead did you mean like a graph where you can see the battery percentage over time and other details? If so maybe: https://play.google.com/store/apps/details?id=com.digibites.accubattery

  • The ability to stop the battery from charging past a user configurable point.

I'm not sure if this can be done. If it could be this would probably require root.

  • Reset the file used to estimate / calibrate the battery.

https://play.google.com/store/apps/details?id=com.eyp.battery.calibration

If possible both should support Shuzuku.

Did you mean Shizuku? https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api

I asked ChatGPT and it seems like I would need some additional info:

Understand the Garage Remote Signal:

Research and understand the communication protocol used by the garage remote (e.g., RF signals, infrared, Bluetooth, etc.). This information is crucial for both virtual dip switch configuration and signal capture.

Virtual Dip Switch Configuration:

Implement a user interface within the Android app that allows users to configure virtual dip switches. This will involve creating a digital representation of dip switches and allowing the user to set the desired configuration.

Signal Capture:

This is a more challenging aspect. To capture the signal, you might need additional hardware like an RF receiver module or an IR receiver module that can interface with the Android device.
Implement code to capture the signals from the original garage remote using the hardware module.
Decode the captured signal to extract its properties (e.g., frequency, modulation, data format).

Signal Transmission:

Once you have the signal information (from virtual dip switches or captured signal), you need to transmit it to the garage door opener.
Again, this might require additional hardware like an RF transmitter module or IR transmitter module to be connected to the Android device.

Security and Authentication:

Garage remotes often use some form of authentication or security to prevent unauthorized access. Implement a secure authentication mechanism to prevent misuse of the app.

Hardware Compatibility:

Keep in mind that the availability of necessary hardware components and their compatibility with Android devices could be a limiting factor.

@User2564
Copy link
Contributor

@Osiris-Team

Did you mean Shizuku?

Yes I did.

Hopefully my basic drawing provides some clarity.

a


I am aware of Termux, however for me it is less than ideal as it would require rooting my phone which something I do not wish to do at this moment in time (mainly due to a rocky history with rooting and then using the additional power without completely borking things to the point where flashing a fresh image didn't fix anything).

There is an application called aShell for the main F-Droid / lzzyOnDriod repo which supports Shizuku however it is not designed to be used with root commands.

Inure App manager (Trial) also on F-Droid supposedly support Shizuku's however attempting to use it to remove disabled bloatware did effectively nothing.

A cynical part of me is considering if it is gimped for some reason.

Not sure what this is. Instead did you mean like a graph where you can see the battery percentage over time and other details?

I was thinking more simply along the lines of a text file containing rows of user configurable data e.g during charging write to a text file every X minutes or so

TIME [ Battery % ] [ voltage ] [ AMPS ] [ Estimated time to completion ] ...

I'm not sure if this can be done. If it could be this would probably require root.

If the description of "Battery Charge Limiter" (F-Droid lzzyOnDriod repo) is to believe then yes.

However it only supports Root access when Shizuku can supposedly be used as an alternative.

Ideally I would rather one maintained OSS & ad free battery application exists which has all of the features listed rather than having to install several separate applications.


I am fairly certain the remote works via IR and my phone has an IR receiver.

@Osiris-Team
Copy link
Owner Author

@User2564 hey sorry for the late response, currently on vacation.

There is an application called aShell for the main F-Droid / lzzyOnDriod repo which supports Shizuku however it is not designed to be used with root commands.

As far as I understood the whole reason of rooting your phone, is to be able to execute root commands haha. Not sure how Shizuku works, but from our conversation it looks like it gives you root access without actually rooting the phone? Will do some research for this.

I was thinking more simply along the lines of a text file containing rows of user configurable data e.g during charging write to > a text file every X minutes or so
TIME [ Battery % ] [ voltage ] [ AMPS ] [ Estimated time to completion ] ...

Yeah that can be done, additionally it can be shown as a graph, no problem.

I am fairly certain the remote works via IR and my phone has an IR receiver.

Alright then, I'll get to start working on this ASAP, and give you more details along the way, like ETA and what looks possible and what not, after doing some research. Since I'm currently on vaction it might take longer than usual though.

@User2564
Copy link
Contributor

User2564 commented Aug 8, 2023

@Osiris-Team

No problem thanks for letting me know.

Hopefully it is going well?

Yeah that can be done, additionally it can be shown as a graph, no problem.

To hopefully be clear, I have -1_000 interest in a graph version. If it is saved as a CSV, it should be trivial to make a graph if one is interested.

Alright then, I'll get to start working on this ASAP, and give you more details along the way, like ETA and what looks possible and what not, after doing some research. Since I'm currently on vaction it might take longer than usual though.

I stand corrected it would appear that my current phone does in fact not have an IR receiver or transmitter.

@Osiris-Team
Copy link
Owner Author

@User2564 regarding "Locking the desktop hides the "Widget" and "Action" tiles.", should the icons only be hidden or fully removed and the visible icons centered (this is probably much more work, but can be done I think)?
image

@User2564
Copy link
Contributor

User2564 commented Aug 25, 2023

@Osiris-Team,
Apologies for the delay.

How about a middle ground; they are hidden and the visible icons centered.

What does "fully removed" vs hidden mean in this context as personally from a end user prospective the end result is the same.

@Osiris-Team
Copy link
Owner Author

Osiris-Team commented Sep 5, 2023

@User2564
regarding:

  • The Search bar and Date Format are decoupled.
  • Date Format / Custom Format Lines can be moved into the center rather than the current hard left.

I'm not sure what is meant by this. So the clickable search icon stays at the right, and the date can be moved to the left or center? Should it be drag-drop similar to widgets.

@User2564
Copy link
Contributor

User2564 commented Sep 6, 2023

Hopefully this is more clear;

  • The user does not have to enable the search bar in order to make use of the custom format lines. As some may only wish to have one or the other active
  • I was thinking more a predefined settings e.g. Left | Middle | Right

@User2564
Copy link
Contributor

User2564 commented Sep 17, 2023

@Osiris-Team,
I hope you had a nice break.

If I attempt to merge your work_profile branch into the custom branch under my repo (which contains all for your other MR's to date except for AppDrawerVerticalLabelColourSupport which I had turned into a sed one-liner due to git weirdness if memory serves), the following conflict is reported.

git merge --no-commit --no-ff remoteDev/work_profile
Auto-merging app/src/main/res/values/strings.xml
Auto-merging app/src/main/java/com/benny/openlauncher/util/DatabaseHelper.java
Auto-merging app/src/main/java/com/benny/openlauncher/util/AppManager.java
CONFLICT (content): Merge conflict in app/src/main/java/com/benny/openlauncher/util/AppManager.java
Auto-merging app/src/main/AndroidManifest.xml
Automatic merge failed; fix conflicts and then commit the result.

diff --cc app/src/main/java/com/benny/openlauncher/util/AppManager.java
index d2d34818,7539762e..00000000
mode 100644,100644..100755
--- a/app/src/main/java/com/benny/openlauncher/util/AppManager.java
+++ b/app/src/main/java/com/benny/openlauncher/util/AppManager.java
@@@ -66,8 -75,10 +75,15 @@@ public class AppManager

          String packageName = intent.getComponent().getPackageName();
          String className = intent.getComponent().getClassName();
++<<<<<<< HEAD
 +        for (App app : _nonFilteredApps) {
 +            if (app._className.equals(className) && app._packageName.equals(packageName)) {
++=======
+         int userHandle = intent.getIntExtra(DatabaseHelper.USER_HANDLE_CODE, 0);
+         for (App app : _apps) {
+             if (app._className.equals(className) && app._packageName.equals(packageName)
+                     && app._userHandle.hashCode() == userHandle) {
++>>>>>>> remoteDev/work_profile
                  return app;
              }
          }

@Osiris-Team
Copy link
Owner Author

@User2564 Hey, yeah that might happen, since I am working based of the default master branch each time, to keep everything separate as you wanted. In the case above, remove the code from head and keep the code from remoteDev/work_profile.

@User2564
Copy link
Contributor

User2564 commented Sep 17, 2023

After some short testing.

  • If I update to a build with work_profile and the associated fix applied while having items in in a folder / group on the desktop, upon reloading all items are deleted leaving behind grey circles and also rendering the `Uninstalled or hidden apps were removed from this group after selection of a circle.
  • Within the App Drawer, with the work profile enabled and the work_profile branch applied which does render the appropriate icon against an applicable; selecting an entry produces the following messages Switch to UserHandle[0].

This does not occur if the work_profile branch is not in play i.e, I can open the App Drawer have the work profile enabled then select an application known to only exist there and it will launch.

@Osiris-Team
Copy link
Owner Author

Osiris-Team commented Sep 17, 2023

@User2564

If I update to a build with work_profile and the associated fix applied while having items in in a folder / group on the desktop, upon reloading all items are deleted leaving behind grey circles and also rendering the `Uninstalled or hidden apps were removed from this group after selection of a circle.

Will look into it!

Within the App Drawer, with the work profile enabled and the work_profile branch applied which does render the appropriate icon against an applicable; selecting an entry produces the following messages Switch to UserHandle[0].

This is the correct behavior. It checks if the current user is the actual owner of the app. If not the owner it opens the settings instead of the app and shows you that message (UserHandle[0] is the default user, I couldn't find a way to get the name of the user sadly :/ ).

This is done to ensure the correct user is used when starting the app, since I noticed, that otherwise it will simply launch the app for the current user.

I'm not sure if I understood correctly, but in your case you have the app only installed on your work profile? So the wanted behavior would be to directly launch the app since its not available for any other profile/user. This should already work, if you are currently the work user, it should not attempt to make you switch to the default user. Will look into this too.

18:40 Just released a few fixes, give them a try.

@User2564
Copy link
Contributor

Will look into it!
Great thanks.

but in your case you have the app only installed on your work profile? So the wanted behavior would be to directly launch the app since its not available for any other profile/user. This should already work, if you are currently the work user, it should not attempt to make you switch to the default user. Will look into this too.

Yes. I do not have a work user (currently the only users are; Admin and Guest) as I use Shelter (available on F-Droid and it is one thatr I can very highly recommend, for what ever that it worth) to help manage the work profile.

18:40 Just released a few fixes, give them a try.
Will do.

@User2564
Copy link
Contributor

@Osiris-Team,
After testing either; my build process is deeply flawed somehow or the codebase is cursed, as effectively nothing has changed unfortunately.

Also while timing is more accurate it is apparently not in sync with the system clock as with User2564/openlauncher#9 applied this this moment; syslock is reporting as 22:00:47 vs 22:09 (??) on the desktop via the following custom Date Format yyyy-MM-dd MMM HH:MM

@Osiris-Team
Copy link
Owner Author

@User2564 I think you have to use mm instead of MM.

@Osiris-Team
Copy link
Owner Author

@User2564 instead of using that app to handle the work profile. Can you simply create a new user named work via your settings and test that?

I guess the issue is related to the app your using. I'll install it and try to reproduce and fix the issues you described.

@Osiris-Team
Copy link
Owner Author

@User2564 I tested it with your app "Shelter" (note that I am testing it on the lowest Android version that supports multiple users , Android 7.0, to ensure support for older devices, what version are you using?) and it kind of seems to work.

  • The only issue I noticed, is that when cloning an app to the work profile, OpenLauncher fails to show the new app in the app drawer and requires a restart to do so.

@User2564
Copy link
Contributor

User2564 commented Sep 25, 2023 via email

@Osiris-Team
Copy link
Owner Author

@User2564 Just released a fix for your app starting issue. Now the prompt to change the user will only be done on android versions lower than oreo/8.

@User2564
Copy link
Contributor

User2564 commented Sep 25, 2023 via email

@Osiris-Team Osiris-Team changed the title TODO TODO James Oct 15, 2023
@User2564
Copy link
Contributor

User2564 commented Nov 5, 2023

@Osiris-Team

I hope you are well.

After some testing, the results are a rather mixed bag:
Before: Screenshot_2023_1105_205316

After: Screenshot_2023_1105_205451

"Home, Lock and Settings" view - After: IMG_20231106_105320

@Osiris-Team
Copy link
Owner Author

Osiris-Team commented Nov 5, 2023

@User2564 this is for https://github.com/Osiris-Team/openlauncher/tree/work_profile branch?

And with before/after do you mean, before and after updating to that branch?

@User2564
Copy link
Contributor

User2564 commented Nov 5, 2023

@User2564 this is for https://github.com/Osiris-Team/openlauncher/tree/work_profile branch?

Yes, apologies for the confusion.

And with before/after do you mean, before and after updating to that branch?

Hopefully this is more clear.

  • Before: running an APK without the branch applied.
  • After: Updating to an APK with said branch applied.

In terms of git aspects, replaced the manual way I had been resolving the merge conflict between custom and work_profile with the -X theirs flag.

@Osiris-Team
Copy link
Owner Author

@User2564 can you compare your branch with my branch and see if there are any changes?
https://docs.github.com/en/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits#comparing-across-forks

I will try to reproduce that once I got time ;)

@User2564
Copy link
Contributor

User2564 commented Nov 5, 2023

can you compare your branch with my branch and see if there are any changes?

Done

User2564/openlauncher@custom...Osiris-Team:openlauncher:work_profile

All of which can probably be explained by me merging your other branches into custom along with my very basic changes (https://github.com/User2564/openlauncher/pull/1/files).

If I run git merge --no-commit --no-ff remoteDev/work_profile against the custom branch.

Auto-merging app/src/main/AndroidManifest.xml
Auto-merging app/src/main/java/com/benny/openlauncher/util/AppManager.java
CONFLICT (content): Merge conflict in app/src/main/java/com/benny/openlauncher/util/AppManager.java
Auto-merging app/src/main/java/com/benny/openlauncher/util/DatabaseHelper.java
Auto-merging app/src/main/java/com/benny/openlauncher/widget/GroupPopupView.java
Auto-merging app/src/main/res/values/strings.xml
Automatic merge failed; fix conflicts and then commit the result.

git diff

diff --cc app/src/main/java/com/benny/openlauncher/util/AppManager.java
index d2d34818,3c047165..00000000
mode 100644,100644..100755
--- a/app/src/main/java/com/benny/openlauncher/util/AppManager.java
+++ b/app/src/main/java/com/benny/openlauncher/util/AppManager.java
@@@ -66,8 -74,10 +74,15 @@@ public class AppManager

          String packageName = intent.getComponent().getPackageName();
          String className = intent.getComponent().getClassName();
++<<<<<<< HEAD
 +        for (App app : _nonFilteredApps) {
 +            if (app._className.equals(className) && app._packageName.equals(packageName)) {
++=======
+         int userHandle = intent.getIntExtra(DatabaseHelper.USER_HANDLE_CODE, 0);
+         for (App app : _apps) {
+             if (app._className.equals(className) && app._packageName.equals(packageName)
+                     && app._userHandle.hashCode() == userHandle) {
++>>>>>>> remoteDev/work_profile
                  return app;
              }
          }

Using -X theirs applies work_profile.

@Osiris-Team
Copy link
Owner Author

Osiris-Team commented Nov 6, 2023

@User2564 that diff might be the issue.

Remove the content of HEAD and keep the content of remoteDev/work_profile, however replace _apps with _nonFilteredApps there.

@Osiris-Team
Copy link
Owner Author

@User2564 updated the work profile branch so that there should be no merge conflict anymore. Does this fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants