Issue
I'm trying to compile an app for a custom rom where addFlags(Intent.FLAG_FLOATING_WINDOW);
can be used. But compiling it in android seems to cause errors and stop me from doing it. Is there a way i can disable error check on a specific .java file?
Solution
There is no (public) Intent.FLAG_FLOATING_WINDOW
constant, according to the sdk documentation, hence the compile error. Presumably, it's specific to the custom rom your attempting to build for?
You cannot just bypass a compile error like this. However, since we're talking about a constant, you may be able to substitute the reference with the actual value. All the flag constants defined by the Intent
class are simply int
s, but you'd have to know the value in order to be able to replace it. You should be able to find that somewhere in the custom rom's source that you're referring to.
For example, suppose the contant would have the following definition:
public static final int FLAG_FLOATING_WINDOW = 1234;
Then a valid addFlags()
call using this value would look like this:
addFlags(1234);
That will build, irrespective of the constant definitions in Intent
.
Edit:
The question was related to Paranoid Android, for which the FLAG_FLOATING_WINDOW declaration is as follows.
/**
* If set, this intent will always match start up as a floating window
* in mutil window scenarios.
*/
public static final int FLAG_FLOATING_WINDOW = 0x00002000;
Source: Intent.java (@ParanoidAndroid)
Answered By - MH.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.