PowerManagement - wakelocks

by GPU » Mon, 22 Feb 2010 15:07:20 GMT


Sponsored Links
 Hi ,

PARTIAL_WAKE_LOCK
SCREEN_DIM_WAKE_LOCK
SCREEN_BRIGHT_WAKE_LOCK
FULL_WAKE_LOCK

In the above 4 wakelocks , only the PARTIAL_WAKE_LOCK  is calling
wakelock.c kernel API. How the other 3 wakelocks are handled
internally?

The other 3 wakelocks calling android_os_power.app -->
setScreenState(boolean).But its only make the sceen on/off
how the DIM/BRIGHT is handled?How its related to wakelock?

--



PowerManagement - wakelocks

by GPU » Mon, 22 Feb 2010 15:07:25 GMT


 Hi ,

PARTIAL_WAKE_LOCK
SCREEN_DIM_WAKE_LOCK
SCREEN_BRIGHT_WAKE_LOCK
FULL_WAKE_LOCK

In the above 4 wakelocks , only the PARTIAL_WAKE_LOCK  is calling
wakelock.c kernel API. How the other 3 wakelocks are handled
internally?

The other 3 wakelocks calling android_os_power.app -->
setScreenState(boolean).But its only make the sceen on/off
how the DIM/BRIGHT is handled?How its related to wakelock?

--


Sponsored Links


Other Threads

1. what is problem in this where clause?

Hi, I have a table RoomTable which have 3 columns as
1.RoomID (primary key),2.  RoomName 3. RoomSuffix

public void insertToRoomTable(String rName)
{
      try
        {
             sampleDB.execSQL("CREATE TABLE IF NOT EXISTS " +
                    ROOM_TABLE_NAME +
                    " (RoomID integer primary key
autoincrement,RoomName VARCHAR,RoomSuffix integer);");

                boolean roomExist = checkRoomExist(roomName);
                        System.out.println ("RoomExist is"+roomExist);
                        if (roomExist)
                        {
                                Cursor c4 = sampleDB.rawQuery("SELECT 
MAX(RoomSuffix) AS
MAX_SUFFIX FROM RoomTable WHERE RoomName = '"+roomName+"'",null);

                                if (c4 != null )
                        {
                                if  (c4.moveToFirst())
                                {
                                        System.out.println 
("??????????"+c4.getCount());
                                        do
                                        {
                                                System.out.println
(c4.getInt(c4.getColumnIndex("MAX_SUFFIX")));
                                                suf = 
c4.getInt(c4.getColumnIndex("MAX_SUFFIX"));
                                                suf++;
                                                System.out.println 
("!!!!!!!!!!!!"+suf);

                                        }
                                        while (c4.moveToNext());

                                }
                        }


                                roomName = roomName+suf;
                                c4.close();

                        }

                sampleDB.execSQL("INSERT INTO " +
                                ROOM_TABLE_NAME +
                                " Values (null,'"+roomName+"','"+suf+"');");

                System.out.println ("Inserted values into RoomTable
are"+roomName+":"+suf);

        }
                catch (Exception e)
                {
                        e.printStackTrace();
                }
  }

public boolean checkRoomExist(String name)
        {
                c = sampleDB.rawQuery("SELECT RoomName FROM " +ROOM_TABLE_NAME ,
null);
                if (c != null )
        {
                System.out.println ("%%%%%%%%%%%"+c.getCount());
                if  (c.moveToFirst())
                {
                        do
                        {
                                rname = 
c.getString(c.getColumnIndex("RoomName"));
                                System.out.println ("RoomName is"+rname);

                                if (rname.equalsIgnoreCase(name))
                                {
                                        System.out.println ("Room Exist");
                                        return true;
                                }


                        }
                        while (c.moveToNext());
                }
        }

        c.close();
        return false;

        }

Here what I want is - If suppose user insert first record as
1   Hall   0
and again if he insert record with same RoomName i.e Hall then
RoomName must be Hall1(i.e. RoomName+suffix)
2  Hall1   1
Third record must be
3   Hall2  2
If user enter other roomname thenit must be

4   Kitchen  0
again insert suppose Hall then

5   Hall   3 (Because last Hall suffix is 2)

Means I want different suffix for different RoomName. But using above
code I get output as

1   Hall     0
2   Hall 1  1
3   Hall1   1
4   Hall1   1

Each time I get Suffix as 1.
What is wrong in this code?  And if I remove where clause and write it
as

if (roomExist)                                                                  
                                                                        {
                                Cursor c4 = sampleDB.rawQuery("SELECT 
MAX(RoomSuffix) AS
MAX_SUFFIX FROM RoomTable ",null);

.....
}

Then here it is not maintaining different suffix for different
RoomName and I get output as

1  Hall            0
2  Hall1           1
3  Hall 2          2
4 Kitchen3       3

And what I want is
1  Hall     0
2  Hall1    1
3  Hall2    2
4 Kitchen  0

How to get This? Thanks in advance




-- 

2. problem with map overlays

i have taken the code for drawing  the oath on the google map, from
the google git..

but i m now stuck in some diff issue. i m unable to put a marker on
the start and end point of the path drawn.
pls suggest me..
actually in map activity in my project class is created by extending
com.google.android.maps.Overlay
but this class is used to draw the path on the map.
so please suggest me what should i need to do if i want to put marker
on start and end point of the map.

-- 

3. Aplikasi ghost radar

4. and it's Google Map again

5. sgs camera problem DXJPA

6. Can we Import contacts in List Preferences

7. Help - Gecoding is failing on a regular basis - does anyone else notice this?