fix some api's return value

This commit is contained in:
侯歌 2022-02-28 13:05:59 +08:00
parent 29527883f9
commit 716f988bde
5 changed files with 9 additions and 5 deletions

View File

@ -57,6 +57,7 @@ bool UIEventSource::post(Runnable& run,uint32_t delayedtime){
}
}
mRunnables.push_back(runner);
return true;
}
//#pragma GCC pop_options

View File

@ -109,6 +109,7 @@ bool ProgressBar::needsTileify(Drawable* dr){
if (dynamic_cast<BitmapDrawable*>(dr)) {
return true;
}
return false;
}
Drawable* ProgressBar::tileify(Drawable* drawable, bool clip){

View File

@ -3081,7 +3081,7 @@ bool View::pointInView(int localX,int localY, int slop) {
void View::onResolveDrawables(int layoutDirection){
}
bool View::areDrawablesResolved(){
bool View::areDrawablesResolved()const{
return (mPrivateFlags2 & PFLAG2_DRAWABLE_RESOLVED) == PFLAG2_DRAWABLE_RESOLVED;
}
@ -5675,7 +5675,7 @@ void View::setMeasuredDimensionRaw(int measuredWidth, int measuredHeight) {
mPrivateFlags |= PFLAG_MEASURED_DIMENSION_SET;
}
void View::setMeasuredDimension(int measuredWidth, int measuredHeight) {
void View::setMeasuredDimension(int measuredWidth, int measuredHeight){
bool optical = isLayoutModeOptical(this);
if (optical != isLayoutModeOptical(mParent)) {
Insets insets = getOpticalInsets();
@ -5759,7 +5759,7 @@ void View::ensureTransformationInfo(){
}
}
bool View::hasIdentityMatrix(){
bool View::hasIdentityMatrix()const{
const bool rc= (mX==.0f) && (mY==.0f) && (mZ==.0f) &&
(mTranslationX==.0f) && (mTranslationY==.0f) &&
(mScaleX ==1.f) && (mScaleY==1.f) && (mRotation==.0f);

View File

@ -437,10 +437,10 @@ protected:
void assignParent(ViewGroup*p);
bool debugDraw()const;
int dipsToPixels(int dips)const;
bool hasIdentityMatrix();
bool hasIdentityMatrix()const;
void computeOpaqueFlags();
virtual void resolveDrawables();
bool areDrawablesResolved();
bool areDrawablesResolved()const;
void setDuplicateParentStateEnabled(bool);
bool isDuplicateParentStateEnabled()const;

View File

@ -1681,6 +1681,7 @@ View*ViewGroup::getDeepestFocusedChild(){
v=((ViewGroup*)v)->getFocusedChild();
else v=nullptr;
}
return nullptr;
}
bool ViewGroup::hasFocus()const{
@ -2133,6 +2134,7 @@ int ViewGroup::getLayoutMode(){
const int inheritedLayoutMode=mParent?mParent->getLayoutMode():LAYOUT_MODE_DEFAULT;
setLayoutMode(inheritedLayoutMode,false);
}
return mLayoutMode;
}
void ViewGroup::setLayoutMode(int layoutMode) {