ROM Compiling Issues

Search This thread

KerryWood34

Senior Member
Aug 16, 2012
391
163
I'm currently trying to implement native battery percentage into my source built ROM, but keep running into errors. Mainly, this one:

Code:
packages/apps/Settings/src/com/android/settings/rascarlo/StatusBarSettings.java:103: cannot find symbol
symbol  : method isPhone(android.app.Activity)
location: class com.android.settings.Utils
        if (!Utils.isPhone(getActivity())) {
                  ^

I look at other developers' code and they all have that period there so I am not sure why it is an error for me. Must do more research.
 

sumit77seo

Senior Member
Sep 28, 2012
175
54
34
New Delhi
Can you show us the code piece which is creating problem? I think u have missed something like semicolons. or that method isPhone() is not accessible. Show us the particular fragment of code to which error is pointing.
 
Last edited:
  • Like
Reactions: KerryWood34

KerryWood34

Senior Member
Aug 16, 2012
391
163
I will be starting work at 3 and won't be back home until about 12:30am. I will post the code then. I don't have the error window open anymore but I will just open the SatusBarSettings.java file and post the code from there.
 

KerryWood34

Senior Member
Aug 16, 2012
391
163
Here is the section of code where the error seems to be taking place.

Code:
// Quick settings category
        // Quick Settings pull down
        mQuickPulldown = (ListPreference) getPreferenceScreen().findPreference(QUICK_PULLDOWN);
        // only show on phones
        if (!Utils.isPhone(getActivity())) {
            if (mQuickPulldown != null)
                mStatusBarGeneralCategory.removePreference(mQuickPulldown);
        } else {
            mQuickPulldown.setOnPreferenceChangeListener(this);
            int quickPulldownValue = Settings.System.getInt(getActivity().getApplicationContext()
                    .getContentResolver(),
                    Settings.System.QS_QUICK_PULLDOWN, 0);
            mQuickPulldown.setValue(String.valueOf(quickPulldownValue));
            mQuickPulldown.setSummary(mQuickPulldown.getEntry());

I am not sure if it is because I am trying to simply add native battery percentage and do not have quick pulldown or any other status bar mods implemented yet or what.

Also, I am not writing this code myself in case that wasn't clear. I did a cherry-pick of rascarlo's native battery percentage.

Thanks for the help
 
Last edited:

sumit77seo

Senior Member
Sep 28, 2012
175
54
34
New Delhi
This seems that isPhone() method is not accessible. Do u have the source code of Utils class? Check into the Utils class for isPhone() method.

Sent from my Micromax A120 using XDA Free mobile app
 
  • Like
Reactions: KerryWood34

KerryWood34

Senior Member
Aug 16, 2012
391
163
This seems that isPhone() method is not accessible. Do u have the source code of Utils class? Check into the Utils class for isPhone() method.

Sent from my Micromax A120 using XDA Free mobile app
Could you explain a little more in detail what I need to look for?I have downloaded source code and have been trying to just do a cherry pick. How do I check into the utils class for is phone() method?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Can you show us the code piece which is creating problem? I think u have missed something like semicolons. or that method isPhone() is not accessible. Show us the particular fragment of code to which error is pointing.
    1
    This seems that isPhone() method is not accessible. Do u have the source code of Utils class? Check into the Utils class for isPhone() method.

    Sent from my Micromax A120 using XDA Free mobile app