yashsingh1/xdaforums huggingface dataset:
[LG V20 Guides, News, & Discussion] Zacharee1:
[MENTION=1852121]Blaises[/MENTION] I don't know what I did, but content won't show up in the SignBoard area in either landscape orientation. Would you be able to play around the those frame Rects a bit and see if you can get it to show up?
[LG V20 Guides, News, & Discussion] Blaises:
I'll be out on the weekend and for the 4th, so I'll have less time as well. I'll spend what time I have working on the animation bugs.

Weird, I'll dig through it and see if anything sticks out.
[LG V20 Guides, News, & Discussion] Zacharee1:
My latest commit changes the frames. The portrait ones are correct and working, but the landscape ones are just me playing around. Use the previous frames for those.
[LG V20 Guides, News, & Discussion] poixninja:
Put me down for $10 on this bounty!

Edit: typo
[LG V20 Guides, News, & Discussion] Zacharee1:
The forums don't seem to like me, because I keep having trouble with threads. DevDB broke on my mod thread, and I can't edit the OP of this thread without getting a 502. I might just make a gist to keep track of the bounty...

Anyway, [MENTION=1852121]Blaises[/MENTION], I think I have the rects figured out. I ended up just doing the positioning on-the-fly, when layoutWindowLwCustom() is called, instead of a needless static configuration. So far, it's working a lot better. I just need to get the app to properly rotate the layout.
[LG V20 Guides, News, & Discussion] Zacharee1:
Well I'm stymied. The frame Rects are all working properly, but I can't get the AOSPSignBoard app to work properly.

When the device rotates, standard behavior is to also rotate the views being displayed, so they're not sideways or upside-down for the user. The problem is that for the SignBoard, we want the opposite behavior. We don't want the main frame of the SignBoard to rotate with the device, since in landscape, that would mean the frame would have its width and height swapped, but still have a horizontal orientation, meaning any elements would be squashed into the top/bottom 160px.

I've been playing with rotations in the AOSPSignBoard app, but whatever I do, I either get a distorted, staticky layout, or black. I'm pretty sure LG did something in framework.jar/com.lge.app.MiniActivity.java, but I can't figure it out.
[LG V20 Guides, News, & Discussion] AidenM:
I'm no seasoned Android developer and you've probably tested this already, but if I remember correctly there are some ways to prevent rotation of views and lock them into portrait or landscape. Since you've built an AOSPSignBoard app, I think you can add android:screenOrientation="portrait" to the proper activity in the Android manifest file, unless I'm overlooking something.
[LG V20 Guides, News, & Discussion] Zacharee1:
The SignBoard window isn't an activity, and if I could do this, it would keep the entire device locked to portrait.
[LG V20 Guides, News, & Discussion] Blaises:
So maybe I'm misunderstanding what you're trying to do, but I had the rotation stuff sorted out last week but you removed it for some reason. The code I have dynamically sets the layout to be in the correct direction depending on the rotation, so you won't have to deal with the signboard having the incorrect size. The items in the layout will rotate and flow with the rotation. Just set any custom layout stuff in the case list and you should be good.

As a small update, I managed to get the animation bugs sorted out. The recents still include the signboard which makes them look odd. I'll see what I can do to fix that.
[LG V20 Guides, News, & Discussion] Zacharee1:
That's because what you did only works for the LinearLayout itself. It's not going to keep being that; it's going to become a ViewPager, which has no layout direction. Even if it stayed as a LinearLayout, that layout direction wouldn't transfer to any children.
[LG V20 Guides, News, & Discussion] phr00t:
My advice, if you get hung up on rotation, is to continue with portrait functionality. By all means, if you think you have a lead to fix the rotation issues & you can work together to resolve it -- great. However, if you get some functionality in portrait mode to release as a "proof of concept", it may inspire more developers to come & look at your code to fix the rotation display bugs. You might have an epiphany while working on functionality & be able to jump back on the bug. Anyway, just my advice to avoid a stoppage in any progress.
[LG V20 Guides, News, & Discussion] Zacharee1:
Good idea. I just need to wait for the server renovations to be done and I can start with that.
[LG V20 Guides, News, & Discussion] phr00t:
While we wait patiently for an update, is there a Lineage build we can download & install now, that has the necessary changes already in for the second screen APK you are working on? I'd like to update to Lineage 15.1 & test anything you have in development. Perhaps [MENTION=2881807]x86cpu[/MENTION] could comment?
[LG V20 Guides, News, & Discussion] Redline:
The plan is to have it integrated into LOS 15.1. You could (I mean should) update to 15.1 so you're ready to go.
[LG V20 Guides, News, & Discussion] Zacharee1:
My builds are pre-10p only, and there's no actual functionality yet. The server is also down, so..
[LG V20 Guides, News, & Discussion] phr00t:
I thought Lineage 15.1 was an AOSP Oreo build, completely separate from official 7.0 Android builds (like "10P"), or am I just confused? I thought we already had the 2nd screen displaying & gathering taps in Lineage 15.1? Are you not working on Lineage 15.1? If not, will I be able to use the same APKs on Lineage 15.1?

Also... how is [MENTION=1852121]Blaises[/MENTION] building? The server seems to have been down for awhile, it'd be nice if you were not dependent on something this unreliable & outside of your control.
[LG V20 Guides, News, & Discussion] Zacharee1:
10p includes a new bootloader version, which isn't backwards-compatible. 14.1 is built to work for 10k and under, while x86 builds 15.1 for 10p and above.

I'm guessing Blaises is using his own personal computer. The problem is I don't really have the internet connection for that. 30/5 isn't ideal for syncing and reuploading.
[LG V20 Guides, News, & Discussion] phr00t:
Hrm... in this post: https://xdaforums.com/showpost.php?p=76945291&postcount=474

... you said you were working with LOS 15.1? Does it really matter though? Is the 2nd screen functionality dependent on the bootloader or pre/post 10P version?

What is more useful, and could be done locally, is experimentation & implementation of functionality -- save the syncing & reuploading for when hitting a milestone and just let it run overnight. Your internet isn't ideal for quick uploads, but relying on an unreliable remote server to build for you is worse considering this downtime, in my humble opinion.

EDIT: I understand this post is being misinterpreted as a directive, which was not my intention. I intended to make a case & suggest a method for local building on a slow connection, which has its benefits. That is why I used the words "could be" & "in my humble opinion", which was meant literally and not sarcastically.
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Maybe you can be patient and wait. Badgering Zach won't do anything useful either.
[LG V20 Guides, News, & Discussion] Zacharee1:
And I also said that x86cpu builds LOS 15.1 for 10p. I build it for pre-10p so I can use it.

It's not, but the OS it's running on is.

The entire build environment is on the server. How can I possibly experiment unless I build?

Syncing is needed to get the source code downloaded, and it's over 100GB. The only computer I have that I can use to properly build is a desktop that I can't take with me, which means downloading a 600MB ROM file after each build at 5Mbit/s.

The server isn't unreliable. It's down for a complete rework.
[LG V20 Guides, News, & Discussion] Grillac:
Take your time and keep up the good work. Whenever you're ready to claim the bounty, I'd love to contribute. As I'm a college student, my money kind of fluctuates so if you could add me to the bounty as a tentative $20, that'd be great. I'll know how much I can contribute when the time rolls around.
[LG V20 Guides, News, & Discussion] cnjax:
Exactly, or maybe since he knows so much maybe he should build it
[LG V20 Guides, News, & Discussion] phr00t:
I'm not trying to badger. No work is currently being done because a server is down, so it is a good time to get some points of confusion cleared up and perhaps discuss some project management.

I was wondering if there was a conflict between his current work and the main Lineage OS 15.1 by x86cpu, because it sounds like one is built pre-10P & the other post-10P. I thank [MENTION=7055541]Zacharee1[/MENTION] for clearing that up (sounds like he just needs pre-10P for his phone, but the 2nd screen work he is doing will work on post-10P builds too).

During this downtime may also be a good time to reevaluate his build strategy, or at least discuss it. It looks like he has good reason to continue to rely on a build server, but you can see the benefits from building locally if possible. Hopefully the server's complete rework isn't a lengthy process, or perhaps a different server or build strategy will be more important to consider.

I know it is nearly impossible to read tone online, but please don't be so quick to assume hostility. I really appreciate the work everyone here is doing.
[LG V20 Guides, News, & Discussion] cnjax:
Again patience, he doesn't need to reevaluate anything it's his project he can manage it as he wishes. Whether or not work is being done is not your business, he owes no one anything including you.
[LG V20 Guides, News, & Discussion] phr00t:
I generally agree. I, along with many other LG V20 users here are eager to help. That is why we come here to offer advice, time and/or money. Not because we think someone owes us something in return, but because we want to see this project succeed.
[LG V20 Guides, News, & Discussion] TheIronMaiden:
You want it to succeed so much, you want Zach to find other means to hasten his development, despite his said limitations. But at least you're wording it in such a way, that it seems like you're helping. Not the usual dull troll with the "ETA, give it to me now" squabble
[LG V20 Guides, News, & Discussion] phr00t:
One way of helping a project succeed is to discuss & find ways around limitations. I don't consider that trolling or squabble. I think we are all on the same team here & want to do what we can to help.
[LG V20 Guides, News, & Discussion] cnjax:
OK now go back to your corner and wait like everyone else
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Now that we're past his server limitations, and his need for a pre-10p LOS 15.1 ROM, what else do you suggest? USA-Red-Dragon (I don't dare to tag him) is the only other one that has successfully got it to work , but he won't disclose his progress to anyone, AFAIK. Zach, Blaises and x86cpu had to start from scratch. Reverse engineering LGs code can't happen overnight. It's just a big pain in the azz. Asking mundane questions won't help either. Just saying. I also realize my rants aren't helping directly but hopefully stops all of this "get it done so I can test it" mentality.
[LG V20 Guides, News, & Discussion] phr00t:
If you are so concerned about trolling, please refrain from doing it yourself. One can be patient, engaged & helping at the same time. Let's stay on topic as much as possible.

We now await the build server rework. However, other developers like [MENTION=1852121]Blaises[/MENTION] could take a look at the rotational bugs that still exist (if they are interested, willing & have the time). We can also try and find other developers interested in helping that may have time to spare too while we wait (patiently).
[LG V20 Guides, News, & Discussion] cnjax:
Trolling ha ha, you're the one who's trolling, we don't need your rehash of the status of development and directing others what they should do, go read Hawkeyes comments again.
[LG V20 Guides, News, & Discussion] phr00t:
I don't think any of my previous questions were mundane... they helped us clarify the LOS versions & Zach is still held up by server & internet limitations. I'd love to find a workaround for him to free him up. Is there another server we could offer him to build with? I'm not sure that is worth the effort, because I don't know how long the server will be down.

I'm not saying "get it done so I can test it", I was asking if there was something I could help test with (or at least prepare to test with). I wish I had more time to do some development myself, but I know I at least have time to help test.

I hope these rants are at least proving we are on the same page here, and hopefully we won't be so quick to assume hostility. We are all just excited to see progress here & want to see it continue.
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Now it seems like you're trying to mitigate the development process. What other developers? They all have moved on to other phones. The 3 that are working on it right now, are the only 3. Red dragon won't help, me2151 won't help, only other ones I can think of that would is saintz and mentalmuso.
[LG V20 Guides, News, & Discussion] phr00t:
We might be able to find new developers, perhaps from reddit. I've been posting there, where people also have been excited: https://www.reddit.com/r/lgv20/comments/8ud5qj/major_progress_on_open_source_second_screen_api/

Have we asked saints & mentalmuso for help? I'm not familiar with all of the potential developers who may have time, and there might be others out there inspired by the current breakthrough in progress.
[LG V20 Guides, News, & Discussion] cnjax:
Dude is clearly obsessed, if second screen is so life altering he should go back to stock
[LG V20 Guides, News, & Discussion] TheIronMaiden:
I'm not saying ALL of your posts have been mundane, but the last few have been. But, I'm done clogging up the thread, and I have to get back to work. Have fun, [MENTION=4201835]cnjax[/MENTION] lol
[LG V20 Guides, News, & Discussion] phr00t:
I am on stock. Lots of other V20 users are too because the 2nd screen isn't working yet elsewhere. Lots of V20 users are also awaiting an official Oreo update with 2nd screen support and losing hope, so this progress here is exciting. Anyway, I also need to get back to work & I really don't want to see this amazing thread turn into posts like these. I look forward to hearing updates & will continue to help as I can.
[LG V20 Guides, News, & Discussion] cnjax:
Good to know you're the resident expert on all v20 users. Help? Ha all you did was dictate what everyone should be doing. Yep get back to work your boss is wondering why you're slacking off.
[LG V20 Guides, News, & Discussion] Zacharee1:
Guys stop.
[LG V20 Guides, News, & Discussion] :
Delete.
[LG V20 Guides, News, & Discussion] phr00t:
Are the rotation issues fixed in this commit? https://github.com/zacharee/android_frameworks_base/commit/8324556fa73012bf81b9ceaa722315040aa78610

If so, are there any remaining issues that need to be resolved in the Lineage 15.1 source? I'm considering setting up a build system & seeing if I can find development time to spare. However, it would be much easier to get into signboard APK functionality than OS development if OS development is no longer significantly needed.

I presume I'd need to setup a Lineage 15.1 build environment anyway to get the needed changes for the APK to work, since I have a 910 AT&T V20, and I presume your builds are for a different variant. Looks like x86cpu hasn't gotten in your latest changes yet according to https://github.com/x86cpu/android_frameworks_base/commits/lineage-15.1
[LG V20 Guides, News, & Discussion] phr00t:
Looking for any assistance in setting up a build environment here: https://xdaforums.com/showpost.php?p=77055943&postcount=1372

EDIT: thought this would append to my last post, but it didn't...
[LG V20 Guides, News, & Discussion] Blaises:
I've made a couple small changes, but I've been putting most of my time into setting up a system service to control the second screen. Android will eventually kill off background services and processes to save battery, so a system service is a good idea since we don't want the second screen to suddenly stop working. Making a system service requires setting up SELinux policies though, and that that has been a learning experience for me.

Android 8.1 changed a few things, made the rules more strict, and added a new policy language called the Common Intermediate Language (CIL). There doesn't seem to be too much info available about these changes yet.

On earlier versions you could simply create a new directory with your policies and and point to it with BOARD_SEPOLICY_DIRS in your makefile. That seems to work for some things still, but it doesn't for system services since there is a catch-all that places everything into the "default_android_service" namespace.

It's possible that since the policies are concatenated, the rules I added are coming after the catch-all. I'll spend some time tonight when I get off work seeing if that's the case. Maybe it's possible to have something like BOARD_SEPOLICY_DIRS = sepolicyDir $(BOARD_SEPOLICY_DIRS) instead to have the rule come first.

If anyone knows more about the new policy system, I'd love to know if it's possible to have the rules in their own repo instead of having to add them to system/sepolicy.
[LG V20 Guides, News, & Discussion] phr00t:
I built Lineage 15.1 for the H910 (AT&T version) with the latest signboard changes, although NOT INCLUDING [MENTION=1852121]Blaises[/MENTION] latest post about small changes here: https://drive.google.com/open?id=1fYY2l4lghjS1OU2JAnwTieJ_4r20b6jV

I also build the AOSPSignBoard APK here: https://drive.google.com/open?id=1uOCxX7xWzoi2e9DUGrNmppQ0vE5dE4gB

I haven't tested either of these, and I'm unsure if the Lineage 15.1 build includes a kernel -- may need to grab one from another H910 thread. I'm planning on merging in Blaises changes & building again & starting to test.

EDIT: Blaises, did you commit any of your changes, or I presume they are not ready yet?
[LG V20 Guides, News, & Discussion] Ak7J4:
Ns if this is any help but felt I should mention it. A trick that some other apps do it have a notification running so Anndriod doesn't kill it off. Again if what your doing rn is working ignore me, just wanted to give a suggestion
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Alright, whose going to be brave and flash this thing? Maybe I will when I get off work.
[LG V20 Guides, News, & Discussion] phr00t:
Noting this is a kernel that should work: https://xdaforums.com/v20/development/kernel-gamma-kernel-us996-ls997-h910-t3788279

I won't be able to test it until at least tomorrow, so I'd really be interested to hear your results!
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Yeah I'm already on gamma v17 so I'm all set. It's 2pm central now, so by 4pm central will try to flash this because why not
[LG V20 Guides, News, & Discussion] Exabyter:
I have several apps that clutter up my notification panel with those permanent notifications, and I wish I could get rid of all of them.

Needless to say that's not my personally preferred solution. ?
[LG V20 Guides, News, & Discussion] TheIronMaiden:
Resolution is jacked, seems to short on the y axis, status bar doesn't pull down, see screen shots

Edit: just as I suspected, gamma kernel doesn't work. Have to use stock kernel built with ROM
[LG V20 Guides, News, & Discussion] zeusofyork:
With advanced power menu you just hide the notification. It's running just no constant notification.
[LG V20 Guides, News, & Discussion] Exabyter:
What is this "advanced power menu"?
[LG V20 Guides, News, & Discussion] zeusofyork:
A root app that replaces default reboot menu with one that has reboot, reboot recovery, power off, reboot bootloader etc. Long hold on your persistent notifications to disable them. Or go to the specific app and disable notifications.
[LG V20 Guides, News, & Discussion] Exabyter:
Aha. LineageOS already has that, including a screenshot option I use daily. But not the notification thing.

I'll take a look at it, thanks.
[LG V20 Guides, News, & Discussion] zeusofyork:
I didn't mean to use the app per say. Just as an example on how it is constantly running and has the notification in the panel. They instruct you to long hold on the notification to hide it from the notification panel. Just saying that could be done in this situation. Constantly running with notification but just disable it in panel.
[LG V20 Guides, News, & Discussion] Zacharee1:
Gamma kernel doesn't have the change to enable the second screen area, so of course it doesn't work.

[MENTION=1852121]Blaises[/MENTION] lmk how that service goes. I'll probably need to migrate what I've made in AOSPSignBoard to it however that works. If we do use a system service, that means we have the opportunity for a proper SDK. Maybe even support for both RemoteViews pages and fully-featured pages.
[LG V20 Guides, News, & Discussion] Blaises:
Everything has been committed excepting the system service stuff I'm working on. It's just a skeleton at this point while I experiment with the sepolicies . I was leaving for work when I made that last post, so I didn't go into detail.

I moved the SignBoard layer position up to the Overlay Display position so that it would be rendered high enough to show on lockscreens and ambient display. Moving it down to the wallpaper layer was a temporary hack just to get something to display so that the whole thing could be debugged. Once the changes to LogicalDisplay were made there wasn't any reason to keep it there. Zachary already had moved it back up on his repo.

I also removed the line in LocalDisplayAdapter that sets the power mode for the screen to OFF when the display is set to OFF.

The android system has OFF, ON, DOZE, and DOZE_SUSPEND (and a VR option, but that's not useful for our purposes). The display brightness is usually set to 0 when the screen is meant to be turned off, so any mode other than OFF would work but each has their own caveats.

ON is the most power hungry of course.

DOZE puts the display into a low-power state with limited interactivity.

DOZE_SUSPEND uses slightly less power and no longer gets updated by the cpu. So whatever is on there will basically be static.

In order to keep the second screen on when the screen is turned 'off' I removed that line so it defaults to DOZE. This seems to work well in my test builds. I'd like to have the system service change it over to DOZE_SUSPEND when it makes sense in order to save battery, even OFF if the proximity sensor is telling us that the phone is in a pocket or something.

So now that I think about it, there is one other change I don't have published. I changed liblight/lights.c to never allow the backlight in the second display to go below 25. That is a hack just to see if the screen options above were working and I don't intend to use that for anything serious. I plan to have the system service dynamically change the brightness instead, but I need to get that up and running first.

No worries, I'm not even entertaining the idea of something like that. We're already making changes to the frameworks base so it's way less trouble to simply make the service a part of it. I'm not having any issue with the system service itself, I was just trying to not have yet another repo that ROM creators will have to track. As it stands, each ROM that has it's own frameworks/base will have to have their own version of that repo just to support the second screen. They'll also now need a custom system/sepolicy repo as well.

It's nothing major, but it helps if everything is easy to integrate. I plan to move my commits into a separate branch and have a single, squashed commit on the main one so all you would need to do is fetch and cherry-pick the commit.

Will do. I was thinking about experimenting with a plugin system, but I'll have to see how the service pans out before I start any tinkering with that.
[LG V20 Guides, News, & Discussion] Zacharee1:
I think we have a good division of labor here :p

I'll make the frontend, you do the back end/framework.