mateor / OpenPDroidPatches

Framework patches for PDroid2.0 and PDroidManager
GNU General Public License v3.0
12 stars 30 forks source link

Telephony errors #1

Open mateor opened 11 years ago

mateor commented 11 years ago

After the intial commit: Install: out/target/product/grouper/system/app/Bluetooth.apk target Java: telephony-common (out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/classes) frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:36: cannot find symbol symbol : class PrivacyCDMAPhone location: package android.privacy.surrogate import android.privacy.surrogate.PrivacyCDMAPhone; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:37: cannot find symbol symbol : class PrivacyCDMALTEPhone location: package android.privacy.surrogate import android.privacy.surrogate.PrivacyCDMALTEPhone; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:38: cannot find symbol symbol : class PrivacyGSMPhone location: package android.privacy.surrogate import android.privacy.surrogate.PrivacyGSMPhone; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:39: cannot find symbol symbol : class PrivacySipPhone location: package android.privacy.surrogate import android.privacy.surrogate.PrivacySipPhone; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:43: cannot find symbol symbol : class PrivacyPhoneProxy location: package android.privacy.surrogate import android.privacy.surrogate.PrivacyPhoneProxy; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:243: cannot find symbol symbol : class SipPhone location: class com.android.internal.telephony.PhoneFactory public static SipPhone makeSipPhone(String sipUri) { ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/SipPhoneFactory.java:24: cannot find symbol symbol : class PrivacySipPhone location: package android.privacy.surrogate import android.privacy.surrogate.PrivacySipPhone; ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:162: cannot find symbol symbol : class PrivacyPhoneProxy location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyGSMPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:162: cannot find symbol symbol : class PrivacyGSMPhone location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyGSMPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:172: cannot find symbol symbol : class PrivacyPhoneProxy location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyCDMALTEPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:172: cannot find symbol symbol : class PrivacyCDMALTEPhone location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyCDMALTEPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:182: cannot find symbol symbol : class PrivacyPhoneProxy location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyCDMAPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:182: cannot find symbol symbol : class PrivacyCDMAPhone location: class com.android.internal.telephony.PhoneFactory sProxyPhone = new PrivacyPhoneProxy(new PrivacyCDMAPhone(context, ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:213: cannot find symbol symbol : class PrivacyCDMALTEPhone location: class com.android.internal.telephony.PhoneFactory phone = new PrivacyCDMALTEPhone(sContext, sCommandsInterface, sPhoneNotifier); ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:222: cannot find symbol symbol : class PrivacyCDMAPhone location: class com.android.internal.telephony.PhoneFactory phone = new PrivacyCDMAPhone(sContext, sCommandsInterface, sPhoneNotifier); ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:233: cannot find symbol symbol : class PrivacyGSMPhone location: class com.android.internal.telephony.PhoneFactory Phone phone = new PrivacyGSMPhone(sContext, sCommandsInterface, sPhoneNotifier); ^ frameworks/opt/telephony/src/java/com/android/internal/telephony/sip/SipPhoneFactory.java:44: cannot find symbol symbol : class PrivacySipPhone location: class com.android.internal.telephony.sip.SipPhoneFactory return new PrivacySipPhone(context, phoneNotifier, profile); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 17 errors

mateor commented 11 years ago

For what it is worth, my fixes (commenting out the URI methods and declaring the private String mSSID) only resulted in 13 errors. But these look fixable to me. Yesterday I thought I was just digging deeper into a hole, but with a little time away, I see we are actually making good progress.

Here is a paste of my earlier errors (with what were decidedly dicier methods): http://pastebin.com/kR82Ti6B

Edit: you know what it is? I had solved a couple errors on top of the issues post. I had further moved the Privacy* classes not found above into the opt/telephony/src/java/com/android/internal/telephony/privacy/surrogate/ directory. Then we were only left with the substantive problems of some missing methods. You will see them in the pastebin,

mateor commented 11 years ago

After moving them again, I am looking more closely at the errors. I must have been fried yesterday, because I stopped at the end of the day totally frustrated and burned out, but we are actually pretty close. Look at the pastebin above, after moving those classes deeper into frameworks/opt/telephony they are where I currently stand.

It look to me like we just need to define some constants to remedy a handful of errors like this: frameworks/opt/telephony/src/java/com/android/internal/telephony/privacy/java/android/privacy/surrogate/PrivacyPhoneProxy.java:188: cannot find symbol symbol : variable PHONE_TYPE_SIP location: class android.privacy.surrogate.PrivacyPhoneProxy case PHONE_TYPE_SIP:

And then there are only five or six other little errors left and I think we may get through telephony as well.

mateor commented 11 years ago

Okay, this is what i was worried about with the file movement...that we would move them to avoid these import errors but with the move we would engender other errors because it is missing the files we moved them away from. If that even makes sense.

The constants we are missing are in frameworks/base/telephony/java/android/telephony/TelephonyManager.java. It also has some of the methods that it is looking for, including getDataState and others.

So we either need to define those somewhere that our privacy classes can get at them, or we need to figure out a work-around. I can't help but think I just don't understand this all too well and that the solution for this is easier than we think. We know what we need and where it is housed, how to connect the dots?

wsot commented 11 years ago

With the PHONE_TYPE_xxx problems, I've got a fix for that which I'll put up shortly. Same with the DataState problems.

mateor commented 11 years ago

I thought you might be the best option for fixing this, since you could decide where we wanted to place it. These last 13 errors might just lick it...my build is paused at just this spot.

If there is an error you aren't working on let me know and I can investigate, I am at the keyboard.

wsot commented 11 years ago

I've updated the repos on my github, and will update patches as soon as I get home. There is still a build error: frameworks/opt/telephony/src/java/android/privacy/surrogate/PrivacyPhoneProxy.java:46: cannot find symbol symbol : constructor PhoneProxy(com.android.internal.telephony.Phone) location: class com.android.internal.telephony.PhoneProxy super(mPhone);

Looks like a superclass has changed somewhere, which has led to this call becoming incorrect. I'll hopefully be able to dig into this later this evening.

If you want your build setup to pull directly from those github repos, you can use the following in your local manifest. However, I will update the patches soon.

<manifest>
  <remote name="github" fetch="git://github.com" />
  <remove-project name="platform/frameworks/base"/>
  <project path="frameworks/base" remote="github" name="wsot/platform_frameworks_base" revision="jb-mr1-release-pdroid"/>
  <remove-project name="platform/libcore"/>
  <project path="libcore" remote="github" name="wsot/platform_libcore" revision="jb-mr1-release-pdroid"/>
  <remove-project name="platform/build"/>
  <project path="build" remote="github" name="wsot/platform_build" revision="jb-mr1-release-pdroid"/>
  <remove-project name="platform/frameworks/opt/telephony"/>
  <project path="frameworks/opt/telephony" remote="github" name="wsot/platform_frameworks_opt_telephony" revision="jb-mr1-release-pdroid"/>
</manifest>
wsot commented 11 years ago

I've pushed updates to JB_framework.patch to https://github.com/wsot/PdroidCorePatches

It contains a bunch of API changes, which is not ideal and we'll need to sort out, but it looks like it may build.