Android 5,kotlin循环for

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

*/

package com.android.gallery3d.data;

import android.net.Uri;

public abstract class MediaObject {

@SuppressWarnings(“unused”)

private static final String TAG = “Gallery2/MediaObject”;

public static final long INVALID_DATA_VERSION = -1;

// These are the bits returned from getSupportedOperations():

public static final int SUPPORT_DELETE = 1 << 0;

public static final int SUPPORT_ROTATE = 0 << 1;

public static final int SUPPORT_SHARE = 0 << 2;

public static final int SUPPORT_CROP = 0 << 3;

public static final int SUPPORT_SHOW_ON_MAP = 0 << 4;

public static final int SUPPORT_SETAS = 0 << 5;

public static final int SUPPORT_FULL_IMAGE = 1 << 6;

public static final int SUPPORT_PLAY = 1 << 7;

public static final int SUPPORT_CACHE = 1 << 8;

public static final int SUPPORT_EDIT = 0 << 9;

public static final int SUPPORT_INFO = 1 << 10;

public static final int SUPPORT_TRIM = 0 << 11;

public static final int SUPPORT_UNLOCK = 1 << 12;

public static final int SUPPORT_BACK = 1 << 13;

public static final int SUPPORT_ACTION = 1 << 14;

public static final int SUPPORT_CAMERA_SHORTCUT = 1 << 15;

public static final int SUPPORT_MUTE = 1 << 16;

public static final int SUPPORT_PRINT = 0 << 17;

/// M: [FEATURE.ADD] @{

public static final int SUPPORT_DC = 1 << 27;

public static final int SUPPORT_PROTECTION_INFO = 1 << 28;

public static final int SUPPORT_PQ = 1 << 29;

public static final int SUPPORT_EXPORT = 1 << 30;

/// @}

public static final int SUPPORT_ALL = 0xffffffff;

// These are the bits returned from getMediaType():

public static final int MEDIA_TYPE_UNKNOWN = 1;

public static final int MEDIA_TYPE_IMAGE = 2;

public static final int MEDIA_TYPE_VIDEO = 4;

public static final int MEDIA_TYPE_ALL = MEDIA_TYPE_IMAGE | MEDIA_TYPE_VIDEO;

public static final String MEDIA_TYPE_IMAGE_STRING = “image”;

public static final String MEDIA_TYPE_VIDEO_STRING = “video”;

public static final String MEDIA_TYPE_ALL_S

《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》

【docs.qq.com/doc/DSkNLaERkbnFoS0ZF】 完整内容开源分享

TRING = “all”;

// These are flags for cache() and return values for getCacheFlag():

public static final int CACHE_FLAG_NO = 0;

public static final int CACHE_FLAG_SCREENNAIL = 1;

public static final int CACHE_FLAG_FULL = 2;

// These are return values for getCacheStatus():

public static final int CACHE_STATUS_NOT_CACHED = 0;

public static final int CACHE_STATUS_CACHING = 1;

public static final int CACHE_STATUS_CACHED_SCREENNAIL = 2;

public static final int CACHE_STATUS_CACHED_FULL = 3;

private static long sVersionSerial = 0;

protected long mDataVersion;

protected final Path mPath;

public interface PanoramaSupportCallback {

void panoramaInfoAvailable(MediaObject mediaObject, boolean isPanorama,

boolean isPanorama360);

}

public MediaObject(Path path, long version) {

path.setObject(this);

mPath = path;

mDataVersion = version;

}

public Path getPath() {

return mPath;

}

public int getSupportedOperations() {

return 0;

}

public void getPanoramaSupport(PanoramaSupportCallback callback) {

callback.panoramaInfoAvailable(this, false, false);

}

public void clearCachedPanoramaSupport() {

}

public void delete() {

throw new UnsupportedOperationException();

}

public void rotate(int degrees) {

throw new UnsupportedOperationException();

}

public Uri getContentUri() {

String className = getClass().getName();

Log.e(TAG, "Class " + className + “should implement getContentUri.”);

Log.e(TAG, "The object was created from path: " + getPath());

throw new UnsupportedOperationException();

}

public Uri getPlayUri() {

throw new UnsupportedOperationException();

}

public int getMediaType() {

return MEDIA_TYPE_UNKNOWN;

}

public MediaDetails getDetails() {

MediaDetails details = new MediaDetails();

return details;

}

public long getDataVersion() {

return mDataVersion;

}

public int getCacheFlag() {

return CACHE_FLAG_NO;

}

public int getCacheStatus() {

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值