本文整理汇总了Java中android.content.pm.Signature.hashCode方法的典型用法代码示例。如果您正苦于以下问题:Java Signature.hashCode方法的具体用法?Java Signature.hashCode怎么用?Java Signature.hashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.content.pm.Signature
的用法示例。
在下文中一共展示了Signature.hashCode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setViewPager
import android.content.pm.Signature; //导入方法依赖的package包/类
private void setViewPager()
{
final String packname = getPackageName();
try
{
PackageInfo packageInfo = getPackageManager().getPackageInfo(packname, PackageManager.GET_SIGNATURES);
Signature[] signs = packageInfo.signatures;
Signature sign = signs[0];
int code = sign.hashCode();
if (code != 312960342)
{
ti();
}
else
{
//
}
}
catch (PackageManager.NameNotFoundException e)
{}
fragments = new ArrayList<Fragment>();
viewPager.setAdapter(viewPagerAdapter);
mTabLayout.setupWithViewPager(viewPager);
mTabLayout.setTabsFromPagerAdapter(viewPagerAdapter);
}
示例2: onCreate
import android.content.pm.Signature; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.push_help);
StatusBarUtil.setColor(this, getResources().getColor(R.color.colorPrimary));
final String packname = getPackageName();
try
{
PackageInfo packageInfo = getPackageManager().getPackageInfo(packname, PackageManager.GET_SIGNATURES);
Signature[] signs = packageInfo.signatures;
Signature sign = signs[0];
int code = sign.hashCode();
if (code != 312960342)
{
finish();
}
else
{
zk = BmobUser.getCurrentUser(this, MyUser.class);
}
}
catch (PackageManager.NameNotFoundException e)
{}
Time t = new Time();
t.setToNow();
// TODO Auto-generated method stub
SharedPreferences setting = getSharedPreferences(SHARE_APP_TAG, 0);
Boolean user_first = setting.getBoolean("FIRST", true);
if (user_first)
{//第一次
setting.edit().putBoolean("FIRST", false).commit();
//qqqecw();
}
else
{
}
initView();
initEvent();
s();
r();
bmobPushManager = new BmobPushManager(this);
}