mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Improve type safety through the use of generics
This commit is contained in:
parent
16553cc5e1
commit
d8b7d5b438
6 changed files with 16 additions and 17 deletions
|
|
@ -59,9 +59,9 @@ public abstract class HandlerService<T> extends Service {
|
|||
threadHandler = new ServiceHandler(threadLooper);
|
||||
}
|
||||
|
||||
private void postMessage(int type, Object obj) {
|
||||
private void postMessage(int type, T t) {
|
||||
Message msg = threadHandler.obtainMessage(type);
|
||||
msg.obj = obj;
|
||||
msg.obj = t;
|
||||
threadHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue