Code example for AccessibilityEvent

Methods: getPackageName, getParcelableData

0
	} 
 
 
	public Boolean performValidation(AccessibilityEvent event){
		 
		Notification n = (Notification) event.getParcelableData();
		 
		if(n == null || ((n.flags & Notification.FLAG_NO_CLEAR) == Notification.FLAG_NO_CLEAR) ||
        ((n.flags & Notification.FLAG_ONGOING_EVENT) == Notification.FLAG_ONGOING_EVENT)){
			return false; 
		} 
		 
		if(isForgroundApp(ctx, event.getPackageName().toString()) && isScreenOn()){
			return false; 
		} 
 
		String appMuteDate = SharedPreferenceUtils.getAppData(ctx, event.getPackageName().toString());
		 
		Log.d("Utils", "appMuteDate--" + appMuteDate);
 
		if(appMuteDate != null && appMuteDate.equals("--")){
			return false;