[starvation] add model for Display.getRealSize

Reviewed By: skcho

Differential Revision: D28001261

fbshipit-source-id: 9908c7240
master
Nikos Gorogiannis 4 years ago committed by Facebook GitHub Bot
parent 63ea040355
commit 38cef2df0b

@ -156,7 +156,8 @@ let may_do_ipc =
; { default with ; { default with
classname= "android.content.Context" classname= "android.content.Context"
; methods= ["checkPermission"; "checkSelfPermission"] } ; methods= ["checkPermission"; "checkSelfPermission"] }
; {default with classname= "android.net.wifi.WifiManager"; methods= ["getConnectionInfo"]} ]) ; {default with classname= "android.net.wifi.WifiManager"; methods= ["getConnectionInfo"]}
; {default with classname= "android.view.Display"; methods= ["getRealSize"]} ])
let is_monitor_wait = let is_monitor_wait =

@ -12,6 +12,7 @@ import android.net.wifi.WifiManager;
import android.os.Binder; import android.os.Binder;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.annotation.UiThread; import android.support.annotation.UiThread;
import android.view.Display;
class Binders { class Binders {
Binder b; Binder b;
@ -91,4 +92,9 @@ class Binders {
void doGetConnectionInfoBad(WifiManager w) { void doGetConnectionInfoBad(WifiManager w) {
w.getConnectionInfo(); w.getConnectionInfo();
} }
@UiThread
void doGetRealSizeBad(Display d) {
d.getRealSize(null);
}
} }

@ -1,14 +1,15 @@
codetoanalyze/java/starvation/AsyncTaskGet.java, AsyncTaskGet.lockOnUiThreadBad():void, 31, STARVATION, no_bucket, ERROR, [[Trace 1] `void AsyncTaskGet.lockOnUiThreadBad()`, locks `this.lock` in `class AsyncTaskGet`,[Trace 2] `void AsyncTaskGet.taskGetUnderLock()`, locks `this.lock` in `class AsyncTaskGet`,calls `Object AsyncTask.get()`] codetoanalyze/java/starvation/AsyncTaskGet.java, AsyncTaskGet.lockOnUiThreadBad():void, 31, STARVATION, no_bucket, ERROR, [[Trace 1] `void AsyncTaskGet.lockOnUiThreadBad()`, locks `this.lock` in `class AsyncTaskGet`,[Trace 2] `void AsyncTaskGet.taskGetUnderLock()`, locks `this.lock` in `class AsyncTaskGet`,calls `Object AsyncTask.get()`]
codetoanalyze/java/starvation/AsyncTaskGet.java, AsyncTaskGet.taskGetOnUiThreadBad():void, 20, STARVATION, no_bucket, ERROR, [`void AsyncTaskGet.taskGetOnUiThreadBad()`,calls `Object AsyncTask.get()`] codetoanalyze/java/starvation/AsyncTaskGet.java, AsyncTaskGet.taskGetOnUiThreadBad():void, 20, STARVATION, no_bucket, ERROR, [`void AsyncTaskGet.taskGetOnUiThreadBad()`,calls `Object AsyncTask.get()`]
codetoanalyze/java/starvation/Binders.java, Binders.annotationBad():void, 45, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.annotationBad()`,Method call: `void Binders.doTransact()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`] codetoanalyze/java/starvation/Binders.java, Binders.annotationBad():void, 46, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.annotationBad()`,Method call: `void Binders.doTransact()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`]
codetoanalyze/java/starvation/Binders.java, Binders.doCheckPermissionBad(android.content.Context):int, 82, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doCheckPermissionBad(Context)`,calls `int Context.checkPermission(String,int,int)`] codetoanalyze/java/starvation/Binders.java, Binders.doCheckPermissionBad(android.content.Context):int, 83, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doCheckPermissionBad(Context)`,calls `int Context.checkPermission(String,int,int)`]
codetoanalyze/java/starvation/Binders.java, Binders.doCheckSelfPermissionBad(android.content.Context):int, 87, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doCheckSelfPermissionBad(Context)`,calls `int Context.checkSelfPermission(String)`] codetoanalyze/java/starvation/Binders.java, Binders.doCheckSelfPermissionBad(android.content.Context):int, 88, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doCheckSelfPermissionBad(Context)`,calls `int Context.checkSelfPermission(String)`]
codetoanalyze/java/starvation/Binders.java, Binders.doGetConnectionInfoBad(android.net.wifi.WifiManager):void, 92, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.doGetConnectionInfoBad(WifiManager)`,calls `WifiInfo WifiManager.getConnectionInfo()`] codetoanalyze/java/starvation/Binders.java, Binders.doGetConnectionInfoBad(android.net.wifi.WifiManager):void, 93, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.doGetConnectionInfoBad(WifiManager)`,calls `WifiInfo WifiManager.getConnectionInfo()`]
codetoanalyze/java/starvation/Binders.java, Binders.doGetRingerModeBad(android.media.AudioManager):int, 77, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doGetRingerModeBad(AudioManager)`,calls `int AudioManager.getRingerMode()`] codetoanalyze/java/starvation/Binders.java, Binders.doGetRealSizeBad(android.view.Display):void, 98, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.doGetRealSizeBad(Display)`,calls `void Display.getRealSize(Point)`]
codetoanalyze/java/starvation/Binders.java, Binders.doGetStreamVolumeBad(android.media.AudioManager):int, 72, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doGetStreamVolumeBad(AudioManager)`,calls `int AudioManager.getStreamVolume(int)`] codetoanalyze/java/starvation/Binders.java, Binders.doGetRingerModeBad(android.media.AudioManager):int, 78, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doGetRingerModeBad(AudioManager)`,calls `int AudioManager.getRingerMode()`]
codetoanalyze/java/starvation/Binders.java, Binders.getActiveNetworkInfoBad(android.net.ConnectivityManager):void, 67, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.getActiveNetworkInfoBad(ConnectivityManager)`,calls `NetworkInfo ConnectivityManager.getActiveNetworkInfo()`] codetoanalyze/java/starvation/Binders.java, Binders.doGetStreamVolumeBad(android.media.AudioManager):int, 73, IPC_ON_UI_THREAD, no_bucket, WARNING, [`int Binders.doGetStreamVolumeBad(AudioManager)`,calls `int AudioManager.getStreamVolume(int)`]
codetoanalyze/java/starvation/Binders.java, Binders.interBad():void, 35, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.interBad()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`] codetoanalyze/java/starvation/Binders.java, Binders.getActiveNetworkInfoBad(android.net.ConnectivityManager):void, 68, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.getActiveNetworkInfoBad(ConnectivityManager)`,calls `NetworkInfo ConnectivityManager.getActiveNetworkInfo()`]
codetoanalyze/java/starvation/Binders.java, Binders.intraBad():void, 40, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.intraBad()`,Method call: `void Binders.doTransact()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`] codetoanalyze/java/starvation/Binders.java, Binders.interBad():void, 36, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.interBad()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`]
codetoanalyze/java/starvation/Binders.java, Binders.intraBad():void, 41, IPC_ON_UI_THREAD, no_bucket, WARNING, [`void Binders.intraBad()`,Method call: `void Binders.doTransact()`,calls `boolean Binder.transact(int,Parcel,Parcel,int)`]
codetoanalyze/java/starvation/Countdwn.java, Countdwn.awaitOnMainByAnnotBad():void, 21, STARVATION, no_bucket, ERROR, [`void Countdwn.awaitOnMainByAnnotBad()`,calls `void CountDownLatch.await()`] codetoanalyze/java/starvation/Countdwn.java, Countdwn.awaitOnMainByAnnotBad():void, 21, STARVATION, no_bucket, ERROR, [`void Countdwn.awaitOnMainByAnnotBad()`,calls `void CountDownLatch.await()`]
codetoanalyze/java/starvation/Countdwn.java, Countdwn.awaitOnMainByCallBad():void, 16, STARVATION, no_bucket, ERROR, [`void Countdwn.awaitOnMainByCallBad()`,calls `void CountDownLatch.await()`] codetoanalyze/java/starvation/Countdwn.java, Countdwn.awaitOnMainByCallBad():void, 16, STARVATION, no_bucket, ERROR, [`void Countdwn.awaitOnMainByCallBad()`,calls `void CountDownLatch.await()`]
codetoanalyze/java/starvation/FutureGet.java, FutureGet.getDirectBad():void, 21, STARVATION, no_bucket, ERROR, [`void FutureGet.getDirectBad()`,calls `Object Future.get()`] codetoanalyze/java/starvation/FutureGet.java, FutureGet.getDirectBad():void, 21, STARVATION, no_bucket, ERROR, [`void FutureGet.getDirectBad()`,calls `Object Future.get()`]

Loading…
Cancel
Save